C# Class IBE.MTPriceAnalysis.PriceAnalysis

Datei anzeigen Open project: Duke-Jones/ED-IBE Class Usage Examples

Public Methods

Method Description
PriceAnalysis ( DBConnector ownDBConnector ) : System

constructor

calculateTradingRoutes ( ) : DataTable

calculating the best trading routes

createFilteredTable ( Int32 SystemID, Object Distance, Object DistanceToStar, Object minLandingPadSize, Program VisitedFilter, Object locationType ) : void

creates the filtered basetable of systems and stations

getFilteredSystemAndStationCount ( Int32 &StationCount, Int32 &SystemCount ) : void

gets the number of filtered systems and stations from the table "tmFilteredStations"

getPriceExtremum ( DataTable Result, System.Boolean OnlyTradedCommodities ) : DataTable

calculating the best prices of all station for each commoditiy

loadBestProfitStationCommodities ( dsEliteDB Data, int Station_From, int Station_To, List commodityFilter ) : void

loads all possible trading data from one to another station (one direction)

loadCommoditiesByStation ( DataTable Data, int Station ) : void

loads all possible trading data from one to another station (one direction)

registerExternalTool ( IBE ExternalDataInterface ) : void

register the external tool in the CommandersLog for the DataEvent

registerJournalScanner ( FileScanner journalScanner ) : void

register the LogfileScanner in the CommandersLog for the DataEvent

Protected Methods

Method Description
OnDataChanged ( DataChangedEventArgs e ) : void

Private Methods

Method Description
InitRetriever ( ) : int

initialization of the dataretriever object (for DGV virtual mode)

JournalEventRecieved ( object sender, FileScanner e ) : void

event-worker for JournalEventRecieved-event

LoadSystemsForBaseComboBox ( string systemString, DataTable currentDt, Program vFilter ) : void

loads only the systems matching the current input

loadCommodities ( DataTable Data ) : void

loads the list of all known commodities into the table

loadStationsByCommodity ( DataTable Data, int Commodity_ID ) : void

load all stationdata for a specific commodity

m_ExternalDataInterface_ExternalDataEvent ( object sender, IBE e ) : void

Method Details

OnDataChanged() protected method

protected OnDataChanged ( DataChangedEventArgs e ) : void
e DataChangedEventArgs
return void

PriceAnalysis() public method

constructor
public PriceAnalysis ( DBConnector ownDBConnector ) : System
ownDBConnector DBConnector
return System

calculateTradingRoutes() public method

calculating the best trading routes
public calculateTradingRoutes ( ) : DataTable
return System.Data.DataTable

createFilteredTable() public method

creates the filtered basetable of systems and stations
public createFilteredTable ( Int32 SystemID, Object Distance, Object DistanceToStar, Object minLandingPadSize, Program VisitedFilter, Object locationType ) : void
SystemID System.Int32
Distance Object
DistanceToStar Object
minLandingPadSize Object
VisitedFilter Program
locationType Object
return void

getFilteredSystemAndStationCount() public method

gets the number of filtered systems and stations from the table "tmFilteredStations"
public getFilteredSystemAndStationCount ( Int32 &StationCount, Int32 &SystemCount ) : void
StationCount System.Int32
SystemCount System.Int32
return void

getPriceExtremum() public method

calculating the best prices of all station for each commoditiy
public getPriceExtremum ( DataTable Result, System.Boolean OnlyTradedCommodities ) : DataTable
Result System.Data.DataTable
OnlyTradedCommodities System.Boolean
return System.Data.DataTable

loadBestProfitStationCommodities() public method

loads all possible trading data from one to another station (one direction)
public loadBestProfitStationCommodities ( dsEliteDB Data, int Station_From, int Station_To, List commodityFilter ) : void
Data dsEliteDB
Station_From int
Station_To int
commodityFilter List
return void

loadCommoditiesByStation() public method

loads all possible trading data from one to another station (one direction)
public loadCommoditiesByStation ( DataTable Data, int Station ) : void
Data System.Data.DataTable
Station int
return void

registerExternalTool() public method

register the external tool in the CommandersLog for the DataEvent
public registerExternalTool ( IBE ExternalDataInterface ) : void
ExternalDataInterface IBE
return void

registerJournalScanner() public method

register the LogfileScanner in the CommandersLog for the DataEvent
public registerJournalScanner ( FileScanner journalScanner ) : void
journalScanner FileScanner
return void