Exemplo n.º 1
0
        private void Config_FormClosing(object sender, FormClosingEventArgs e)
        {
            Page = ConfigTabControl.SelectedIndex;

            if (!ResultOK)
            {
                // 退避した設定に戻す
                GHManager.Rollback(1);
                Skin.LoadSkinImages();
            }
            else
            {
                for (int i = 0; i < ListViewShortcut.Items.Count; ++i)
                {
                    if (ListViewShortcut.Items[i].ForeColor == Color.Red)
                    {
                        ConfigTabControl.SelectedIndex = 1;
                        e.Cancel = true;
                        ResultOK = false;
                        return;
                    }
                }
                // 現在の設定を保存
                GHManager.UnregistHotKey(GHManager.Launcher.Handle);
                GHManager.RegistHotKey(GHManager.Launcher.Handle);
                GHManager.SaveSetting();
            }

            GHManager.SaveClear();
        }
Exemplo n.º 2
0
 /// <summary>
 /// ランチャーが終了する時のイベント (後処理)
 /// </summary>
 private void Launcher_FormClosing(object sender, FormClosingEventArgs e)
 {
     // フックを解除
     Dll.EndHook();
     MysetManager.SaveMyset();
     GHManager.SaveSetting();
     GHManager.UnregistHotKey(Handle);
 }