コード例 #1
0
        private void LinkState(IAppState appState, bool Link)
        {
            if (Link)
            {
                appState?.Load();

                if (appState.StateKeyboardLayout != null)
                {
                    keyboard?.AddRange(appState.StateKeyboardLayout);
                }
                //if (appState.GUI != null)
                //Myra.Graphics2D.UI.Desktop.Widgets.Add(appState.GUI);
            }
            else
            {
                appState?.Save();

                if (appState.StateKeyboardLayout != null)
                {
                    keyboard?.RemoveRange(appState.StateKeyboardLayout);
                }
                //if (appState.GUI != null)
                //Myra.Graphics2D.UI.Desktop.Widgets.Remove(appState.GUI ?? null);
            }
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: rmp135/RPForEachDB
 protected override void OnClosing(CancelEventArgs e)
 {
     _appState.Save();
 }
コード例 #3
0
 protected override void OnClosed(EventArgs e)
 {
     base.OnClosed(e);
     _appState.Save();
 }