C# Class IBE.EDDB_Data.EDMilkyway

ファイルを表示 Open project: Duke-Jones/ED-IBE

Public Methods

Method Description
EDMilkyway ( ) : System

creates a new Milkyway :-)

calculateAveragePrices ( ) : MarketData>.Dictionary

calculates the min, max and average market price for supply and demand of each commodity

calculateNewPriceLimits ( string FileName = "" ) : void

calculating the market prices and save them as min and max values for new OCR_ed data, if "FileName" is not nothing the new data will is saves in this file

cloneCommodities ( ) : List

returns a cloned list of the commodities

cloneStations ( enDataType Stationtype ) : List

returns a cloned list of the stations

cloneSystems ( enDataType Systemstype ) : List

returns a cloned list of the systems

existSystem ( string Systemname ) : bool

check if there's a system with this name

getCommodities ( ) : List

returns all commodities

getCommodity ( int CommodityId ) : EDCommoditiesExt

returns the base data of a commodity

getCommodity ( string commodityName ) : EDCommoditiesExt

returns the base data of a commodity

getStation ( string systemName, string stationName ) : EDStation

returns a station in a system by name

getStation ( string systemName, string stationName, EDSystem &System ) : EDStation

returns a station in a system by name

getStationDistance ( string systemName, string stationName ) : Int32

returns distance of a station to the star

getStationNames ( string Systemname ) : string[]

get all for stationnames a system

getStations ( enDataType Stationtype ) : List

returns all stations

getStations ( string Systemname ) : List

get all stations for a system from the main list

getStations ( string Systemname, enDataType wantedType ) : List

get all stations for a system from a particular list

getSystem ( string Systemname ) : EDSystem

get the data of a system

getSystemCoordinates ( string Systemname ) : System.Windows.Forms.DataVisualization.Charting.Point3D

get coordinates of a system

getSystems ( enDataType Systemtype ) : List

returns all systems

loadStationData ( string Filename, enDataType Stationtype, bool createNonExistingFile ) : void

loads the stationsdata from a file

loadSystemData ( string Filename, enDataType Systemtype, bool createNonExistingFile ) : void

loads the systemsdata from a file

mergeData ( ) : bool

merging EDDB and own data to one big list

saveRNCommodityData ( string Filename, bool BackupOldFile ) : void

saves the RN-specific commodity data to a file

saveStationData ( string Filename, enDataType Stationtype, bool BackupOldFile ) : void

saves the stationsdata to a file

saveSystemData ( string Filename, enDataType Systemtype, bool BackupOldFile ) : void

loads the systemsdata to a file

setCommodities ( List newList ) : void

Private Methods

Method Description
ChangeAddStation ( string Systemname, EDStation m_currentStationdata, string oldStationName = null ) : void

changes or adds a station to the "own" list and to the merged list EDDB basedata will not be changed

ChangeAddSystem ( EDSystem m_currentSystemdata, string oldSystemName = null ) : void

changes or adds a system to the "own" list and to the merged list EDDB basedata will not be changed

checkStations ( EDSystem ownSystem, EDSystem existingEDDNSystem, bool &SystemCanBeDeleted, bool &StationsChanged ) : void

check if the stations of two stations are equal if the system exists in the EDDB data and in the own data

copyStationsForNewSystem ( EDSystem newSystem ) : void

go and get station clones from the own data for a new station and adds them to the merged data

getSystemStation ( string Systemname, string StationName ) : EDStation
loadCommodityData ( string EDDBCommodityDatafile, string RNCommodityDatafile, bool createNonExistingFile, bool CheckOnly = false ) : bool

loads the commodity data from the files

rotateSaveFiles ( string Filename, string newFile, string backupFile, bool BackupOldFile ) : void

Method Details

EDMilkyway() public method

creates a new Milkyway :-)
public EDMilkyway ( ) : System
return System

calculateAveragePrices() public method

calculates the min, max and average market price for supply and demand of each commodity
public calculateAveragePrices ( ) : MarketData>.Dictionary
return MarketData>.Dictionary

calculateNewPriceLimits() public method

calculating the market prices and save them as min and max values for new OCR_ed data, if "FileName" is not nothing the new data will is saves in this file
public calculateNewPriceLimits ( string FileName = "" ) : void
FileName string name of the file to save to
return void

cloneCommodities() public method

returns a cloned list of the commodities
public cloneCommodities ( ) : List
return List

cloneStations() public method

returns a cloned list of the stations
public cloneStations ( enDataType Stationtype ) : List
Stationtype enDataType
return List

cloneSystems() public method

returns a cloned list of the systems
public cloneSystems ( enDataType Systemstype ) : List
Systemstype enDataType
return List

existSystem() public method

check if there's a system with this name
public existSystem ( string Systemname ) : bool
Systemname string
return bool

getCommodities() public method

returns all commodities
public getCommodities ( ) : List
return List

getCommodity() public method

returns the base data of a commodity
public getCommodity ( int CommodityId ) : EDCommoditiesExt
CommodityId int
return EDCommoditiesExt

getCommodity() public method

returns the base data of a commodity
public getCommodity ( string commodityName ) : EDCommoditiesExt
commodityName string
return EDCommoditiesExt

getStation() public method

returns a station in a system by name
public getStation ( string systemName, string stationName ) : EDStation
systemName string
stationName string
return EDStation

getStation() public method

returns a station in a system by name
public getStation ( string systemName, string stationName, EDSystem &System ) : EDStation
systemName string
stationName string
System EDSystem
return EDStation

getStationDistance() public method

returns distance of a station to the star
public getStationDistance ( string systemName, string stationName ) : Int32
systemName string
stationName string
return System.Int32

getStationNames() public method

get all for stationnames a system
public getStationNames ( string Systemname ) : string[]
Systemname string
return string[]

getStations() public method

returns all stations
public getStations ( enDataType Stationtype ) : List
Stationtype enDataType
return List

getStations() public method

get all stations for a system from the main list
public getStations ( string Systemname ) : List
Systemname string
return List

getStations() public method

get all stations for a system from a particular list
public getStations ( string Systemname, enDataType wantedType ) : List
Systemname string
wantedType enDataType
return List

getSystem() public method

get the data of a system
public getSystem ( string Systemname ) : EDSystem
Systemname string
return EDSystem

getSystemCoordinates() public method

get coordinates of a system
public getSystemCoordinates ( string Systemname ) : System.Windows.Forms.DataVisualization.Charting.Point3D
Systemname string
return System.Windows.Forms.DataVisualization.Charting.Point3D

getSystems() public method

returns all systems
public getSystems ( enDataType Systemtype ) : List
Systemtype enDataType
return List

loadStationData() public method

loads the stationsdata from a file
public loadStationData ( string Filename, enDataType Stationtype, bool createNonExistingFile ) : void
Filename string
Stationtype enDataType
createNonExistingFile bool
return void

loadSystemData() public method

loads the systemsdata from a file
public loadSystemData ( string Filename, enDataType Systemtype, bool createNonExistingFile ) : void
Filename string
Systemtype enDataType
createNonExistingFile bool
return void

mergeData() public method

merging EDDB and own data to one big list
public mergeData ( ) : bool
return bool

saveRNCommodityData() public method

saves the RN-specific commodity data to a file
public saveRNCommodityData ( string Filename, bool BackupOldFile ) : void
Filename string
BackupOldFile bool
return void

saveStationData() public method

saves the stationsdata to a file
public saveStationData ( string Filename, enDataType Stationtype, bool BackupOldFile ) : void
Filename string
Stationtype enDataType
BackupOldFile bool
return void

saveSystemData() public method

loads the systemsdata to a file
public saveSystemData ( string Filename, enDataType Systemtype, bool BackupOldFile ) : void
Filename string
Systemtype enDataType
BackupOldFile bool
return void

setCommodities() public method

public setCommodities ( List newList ) : void
newList List
return void