Ejemplo n.º 1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (e.Parameter is Simulation handedSimulation)
            {
                Simulation = handedSimulation;
            }

            Bindings.Update();

            AutoSaver.Subscribe(this.Simulation);
        }
Ejemplo n.º 2
0
 private void AppBarToggleButton_AutoSave_Click(object sender, RoutedEventArgs e)
 {
     if ((bool)AppBarToggleButton_AutoSave.IsChecked)
     {
         InfoBar_DraftModus.IsOpen = false;
         AutoSaver.Subscribe(this.Simulation);
     }
     else
     {
         InfoBar_DraftModus.IsOpen = true;
         AutoSaver.Subscribe(null);
     }
 }
Ejemplo n.º 3
0
        public SimulationPage()
        {
            this.InitializeComponent();

            AutoSaver.Subscribe(this.Simulation);
        }
Ejemplo n.º 4
0
        private async void Page_Unloaded(object sender, RoutedEventArgs e)
        {
            await AutoSaver.SaveAsync();

            AutoSaver.Subscribe(null);
        }