The data in Ri is XML-based and scattered in the following places:
Stocktraderri. modules. Market module:/data: Market. xml and markethistory. xml
Stocktraderri. modules. News Module:/data: News. xml
Stocktraderri. modules. Position Module:/data: accountpositions. xml
I will convert it to the same table in the dB. The relationship between them is as follows:
Note that, with the accountpositions table as the core, the foreign key is connected through the tickersymbol field, and the relationship between accountpositions and the market table is 1-to-1; the relationship with the markethistory and news tables is one-to-many.
Let's go backProgramNext, observe the module loading sequence in the shell main program (also refer ):
protected override imodulecatalog getmodulecatalog () { var catalog = New modulecatalog (); catalog. addmodule ( typeof ( marketmodule )). addmodule ( typeof ( positionmodule ), "marketmodule" ). addmodule ( typeof ( watchmodule )). addmodule ( typeof ( newsmodule )); return catalog ;}
That is to say, the loading of marketmodule is prior to positionmodule. This is because when the program is running, loading positionsummaryview first is beyond doubt. However, the first data is selected by default, so a corresponding amount of data must be displayed in the trendlineview, therefore, the loading of the marketmodule (that is, the trendlineview) is prior to the positionmodule.
Generally, If Ri is completed by a person, it will be implemented according to the user's operation sequence, the first thing to do is positionsummaryview and positionpiechartview of the Position Module (after all, they are the first to see the gridview and perform further operations based on the data ).
However, if I write and introduce Ri to you in this order, the advantages of prism will not be displayed, that is, each team can develop different modules independently, then it is seamlessly integrated. Therefore, in the following chapters, I will introduce and add modules one by one in the order of market à position à watch à news, describes how to perform unit tests in prism.