protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            AppData = (AppSettingsModel)e.Parameter;

            SetColorTheme(AppData.ColorTheme);
        }
Exemple #2
0
        public async Task <bool> InitializeMainPage(AppSettingsModel appData)
        {
            AppData = appData;
            SetColorTheme(AppData.ColorTheme);
            AppData.PropertyChanged += AppDataPropertyChangedHandler;

            //bool loaded = await AppData.LoadSettingsFromXML();
            EnableNavViewItems(false);
            MainPageFrame.Navigate(typeof(WaitingForDataFilePage), appData, new DrillInNavigationTransitionInfo());
            return(true);

            //PositionsModel = await PositionsAnalyzerModel.CreateAsync("AllTrades.csv", AppData);
            //MainPageFrame.Navigate(typeof(SummaryPage), PositionsModel);
            //return true;
        }
Exemple #3
0
 public static async Task <PositionsAnalyzerModel> CreateAsync(AppSettingsModel appData)
 {
     return(await CreateAsync(appData.CsvFilePath, appData));
 }
Exemple #4
0
        public static async Task <PositionsAnalyzerModel> CreateAsync(string csvPath, AppSettingsModel appData)
        {
            PositionsAnalyzerModel model = new PositionsAnalyzerModel();

            model.AppData = appData;
            bool ret = await model.GeneratePositions(csvPath);

            model.CalcCumulativeRealizedPerformance();
            model.LoadPrices();
            model.Initialized = true;
            return(model);
        }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     AppData = (AppSettingsModel)e.Parameter;
     InitializeAppData();
 }
 public Position(List <Trade> trades, AppSettingsModel appData)
 {
     AppData = appData;
     Trades  = trades;
     InitializePosition();
 }