コード例 #1
0
 private void SaveConfig()
 {
     _modifiedConfig.SwitchSystemProxy     = SwitchSystemProxyTextBox.Text;
     _modifiedConfig.SwitchSystemProxyMode = SwitchProxyModeTextBox.Text;
     _modifiedConfig.SwitchAllowLan        = SwitchAllowLanTextBox.Text;
     _modifiedConfig.ShowLogs       = ShowLogsTextBox.Text;
     _modifiedConfig.ServerMoveUp   = ServerMoveUpTextBox.Text;
     _modifiedConfig.ServerMoveDown = ServerMoveDownTextBox.Text;
     _controller.SaveHotkeyConfig(_modifiedConfig);
 }
コード例 #2
0
 private void SaveConfig()
 {
     _modifiedConfig.SwitchSystemProxy = SwitchSystemProxyTextBox.Text;
     _modifiedConfig.ChangeToPac       = ChangeToPacTextBox.Text;
     _modifiedConfig.ChangeToGlobal    = ChangeToGlobalTextBox.Text;
     _modifiedConfig.SwitchAllowLan    = SwitchAllowLanTextBox.Text;
     _modifiedConfig.ShowLogs          = ShowLogsTextBox.Text;
     _modifiedConfig.ServerMoveUp      = ServerMoveUpTextBox.Text;
     _modifiedConfig.ServerMoveDown    = ServerMoveDownTextBox.Text;
     _controller.SaveHotkeyConfig(_modifiedConfig);
 }
コード例 #3
0
 private void SaveConfig()
 {
     _modifiedConfig.SwitchSystemProxy     = SwitchSystemProxyTextBox.Text;
     _modifiedConfig.SwitchSystemProxyMode = SwitchSystemProxyModeTextBox.Text;
     _modifiedConfig.SwitchAllowLan        = SwitchAllowLanTextBox.Text;
     _modifiedConfig.ShowLogs       = ShowLogsTextBox.Text;
     _modifiedConfig.ServerMoveUp   = ServerMoveUpTextBox.Text;
     _modifiedConfig.ServerMoveDown = ServerMoveDownTextBox.Text;
     _modifiedConfig.AddCurrentChromeDomaintoPAC = AddCurrentChromeDomaintoPACTextBox.Text;
     _modifiedConfig.AddCurrentChromeURLtoPAC    = AddCurrentChromeURLtoPACTextBox.Text;
     _modifiedConfig.ScanQR = ScanQRTextBox.Text;
     _controller.SaveHotkeyConfig(_modifiedConfig);
 }
コード例 #4
0
        private void RegisterAllAndUpdateStatus(bool save = false)
        {
            HotkeySystemProxyStatus = HotkeyReg.RegHotkeyFromString(HotkeySystemProxy, "SwitchSystemProxyCallback") ? "✔" : "❌";
            HotkeyProxyModeStatus   = HotkeyReg.RegHotkeyFromString(HotkeyProxyMode, "SwitchSystemProxyModeCallback") ? "✔" : "❌";
            HotkeyAllowLanStatus    = HotkeyReg.RegHotkeyFromString(HotkeyAllowLan, "SwitchAllowLanCallback") ? "✔" : "❌";
            HotkeyOpenLogsStatus    = HotkeyReg.RegHotkeyFromString(HotkeyOpenLogs, "ShowLogsCallback") ? "✔" : "❌";
            HotkeySwitchPrevStatus  = HotkeyReg.RegHotkeyFromString(HotkeySwitchPrev, "ServerMoveUpCallback") ? "✔" : "❌";
            HotkeySwitchNextStatus  = HotkeyReg.RegHotkeyFromString(HotkeySwitchNext, "ServerMoveDownCallback") ? "✔" : "❌";

            if (HotkeySystemProxyStatus == "✔" &&
                HotkeyProxyModeStatus == "✔" &&
                HotkeyAllowLanStatus == "✔" &&
                HotkeyOpenLogsStatus == "✔" &&
                HotkeySwitchPrevStatus == "✔" &&
                HotkeySwitchNextStatus == "✔" && save)
            {
                _controller.SaveHotkeyConfig(GetHotkeyConfig);
                _menuViewController.CloseHotkeysWindow();
            }
        }
コード例 #5
0
 private void SaveConfig()
 {
     _controller.SaveHotkeyConfig(_modifiedHotkeyConfig);
 }