/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (Debugger.IsAttached) { // this.DebugSettings.EnableFrameRateCounter = true; } #endif var appVm = new AppVm(); var shell = Window.Current.Content as AppShell; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (shell == null) { // Create a AppShell to act as the navigation context and navigate to the first page shell = new AppShell(); // Set the default language shell.Language = ApplicationLanguages.Languages[0]; shell.AppFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } } // Place our app shell in the current Window Window.Current.Content = shell; if (shell.AppFrame.Content == null) { // When the navigation stack isn't restored, navigate to the first page // suppressing the initial entrance animation. shell.AppFrame.Navigate(typeof(NewSimPage), e.Arguments, new SuppressNavigationTransitionInfo()); } // Ensure the current window is active Window.Current.Activate(); }
public ViewPageVm(AppVm appModel) { AppVm = appModel; AppVm.OnReportReady.Subscribe(DisplaySim); InitUi(); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); MainWindow = new MainWindow(); AppVm = new AppVm(MainWindow); MainWindow.DataContext = AppVm; MainWindow.Show(); }
public CreateCliquePageVm(AppVm appModel) { AppVm = appModel; SetProps( AppVm.Current.GetVmData( VmConfigs.DefaultCreateCliqueE ) ); }
public CreateCliqueAPageVm(AppVm appModel) { AppVm = appModel; AppVm.StopSim(); SetProps( AppVm.Current.GetVmData( CliqueVmConfigs.DefaultCreateCliqueEa ) ); }
public CreateRingAPageVm(AppVm appModel) { AppVm = appModel; AppVm.StopSim(); SetProps( AppVm.Current.GetVmData( RingVmConfigs.DefaultCreateRingEa ) ); }
public SandboxVm(AppVm appModel) { AppVm = appModel; //ProjectionControlVm = new ProjectionControlVmD(); //GroupSelectorVm = new GroupSelectorVmD(); // GraphVmD = new GraphVmD(); //Hist1DvmD = new Hist1DvmD(); // Hist2DvmD = new Hist2DvmD(); //Grid2DVm = new Grid2DVmD(); Grid4DVm = new Grid4DVmD(); }
public ViewCPageVm(AppVm appModel) { AppVm = appModel; AppVm.OnReportReady.Subscribe(DisplaySim); var scse = (SimUtils.SimCliqueSetForEpoch)appModel.Sim; var ngM = scse.CliqueNetworkTr.NodeGroups; HistogramVm = new Hist1DVm(5); ProjectionControlVm = new ProjectionControlVm(Enumerable.Range(0, scse.Memories.ColumnCount)); InitUi(); }
public ViewHPageVm(AppVm appModel) { AppVm = appModel; AppVm.OnReportReady.Subscribe(DisplaySim); var scse = (SimUtils.SimCliqueSetForEpoch)appModel.Sim; var ngM = scse.CliqueNetworkTr.NodeGroups; HistogramVm = new Hist1DVm(2); //MatrixSfVm = new MatrixSfVm(1, ngM.ColumnCount, ngM.RowCount); LastRepIteration = 0; GraphVm = new GraphVm(); InitUi(); }
public App() { InitializeComponent(); ConfigureServices(); Vm = new AppVm(ModelDataService, NavigationService); var page = new MainPage(); page.BindingContext = Vm; var nav = new NavigationPage(page); MainPage = nav; }
public IActionResult Index() { var user = GetCurrentUser(); var account = AccountStore.GetAccount(user.Name); var vm = new AppVm(); if (account == null) { account = AccountStore.AddAccount(user.Name); vm.IsNewAccount = true; } vm.Wallet = account.Wallet; vm.Balance = AccountStore.GetBalance(account.Wallet.GetAccount(0).Address); return(View(vm)); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); // hier den Glue Code ergänzen (DataContext von MainWindow, // sowie ViewModels etc.): // ... Vm = new AppVm(); MainWindow = new MainWindow(); MainWindow.DataContext = Vm; MainWindow.Show(); // ... und nicht vergessen, im App.xaml die Property // StartupUri zu entfernen, falls das MainWindow hier // erzeugt und angezeigt wird (wie z.B. in Ü4). }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); // bei mehreren Services macht es Sinn, über das Auslagern // des Init-Codes in eine eigene Methode nachzudenken: ConfigureServices(); // hier den Glue Code ergänzen (DataContext von MainWindow, // sowie ViewModels etc.): // ... Vm = new AppVm(ModelDataService, NavigationService); MainWindow = new MainWindow(); MainWindow.DataContext = Vm; MainWindow.Show(); // ... und nicht vergessen, im App.xaml die Property // StartupUri zu entfernen, falls das MainWindow hier // erzeugt und angezeigt wird (wie z.B. in Ü4). }
public MainMenuPageVm(AppVm appModel) { AppVm = appModel; }
public NewSimPageVm(AppVm appModel) { AppVm = appModel; }