📄 sshotkeycontrol.cs
字号:
this.rbBossKey.TabIndex = 1;
this.rbBossKey.TabStop = true;
this.rbBossKey.set_UseVisualStyleBackColor(true);
this.rbBossKey.CheckedChanged += new EventHandler(this.rbBossKey_CheckedChanged);
this.rbNoBossKey.set_AutoSize(true);
this.rbNoBossKey.Checked = true;
this.rbNoBossKey.Location = new System.Drawing.Point(40, 0x27);
this.rbNoBossKey.Name = "rbNoBossKey";
this.rbNoBossKey.Size = new Size(14, 13);
this.rbNoBossKey.TabIndex = 0;
this.rbNoBossKey.TabStop = true;
this.rbNoBossKey.set_UseVisualStyleBackColor(true);
this.gbHKBossKey.Controls.Add(this.rbNoBossKey);
this.gbHKBossKey.Controls.Add(this.xHotKeyBoxBossKey);
this.gbHKBossKey.Controls.Add(this.rbBossKey);
this.gbHKBossKey.Controls.Add(this.lbUserHkBoss);
this.gbHKBossKey.Location = new System.Drawing.Point(5, 0xd8);
this.gbHKBossKey.Name = "gbHKBossKey";
this.gbHKBossKey.Size = new Size(0x19c, 110);
this.gbHKBossKey.TabIndex = 3;
this.gbHKBossKey.TabStop = false;
this.lbUserHkBoss.set_AutoSize(true);
this.lbUserHkBoss.BorderColor = Color.Empty;
this.lbUserHkBoss.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbUserHkBoss.Location = new System.Drawing.Point(0x10, 0x10);
this.lbUserHkBoss.Name = "lbUserHkBoss";
this.lbUserHkBoss.Size = new Size(0x4d, 12);
this.lbUserHkBoss.TabIndex = 0;
this.lbUserHkBoss.Text = "lbUserHkBoss";
this.lbUserHkBoss.UseMnemonic = false;
base.set_AutoScaleDimensions(new SizeF(6f, 12f));
base.set_AutoScaleMode(1);
base.Controls.Add(this.gbHKBossKey);
base.Controls.Add(this.gbHKCaptureScreen);
base.Controls.Add(this.gpHKSendMessage);
base.Controls.Add(this.gbHKShowMW);
base.Name = "SsHotKeyControl";
base.Size = new Size(420, 480);
base.Load += new EventHandler(this.SsHotKeyControl_Load);
this.gbHKShowMW.ResumeLayout(false);
this.gbHKShowMW.PerformLayout();
this.gpHKSendMessage.ResumeLayout(false);
this.gpHKSendMessage.PerformLayout();
this.gbHKCaptureScreen.ResumeLayout(false);
this.gbHKCaptureScreen.PerformLayout();
this.gbHKBossKey.ResumeLayout(false);
this.gbHKBossKey.PerformLayout();
base.ResumeLayout(false);
}
private void rbBossKey_CheckedChanged(object sender, EventArgs e)
{
this.xHotKeyBoxBossKey.Enabled = this.rbBossKey.Checked;
}
private void rbUserKey_CheckedChanged(object sender, EventArgs e)
{
this.xHotKeyBoxMainWnd.Enabled = this.rbUserKey.Checked;
}
private void SsHotKeyControl_Load(object sender, EventArgs e)
{
this.gbHKShowMW.Text = StringTable.Hotkey.gpShowMw;
this.gpHKSendMessage.Text = StringTable.Hotkey.gpSendMsg;
this.lbUseHk.Text = StringTable.Hotkey.lbUseHotKey;
this.lbUserHk2.Text = StringTable.Hotkey.lbUseHotKey;
this.rbUserKey.Text = StringTable.Hotkey.rbUseHotkey;
this.rbNoHotKey.Text = StringTable.Hotkey.rbNoHotKey;
this.rbSendByCtrlEnter.Text = StringTable.Hotkey.rbSendByCtrlEnter;
this.rbSendByEnter.Text = StringTable.Hotkey.rbSendByEnter;
this.gbHKCaptureScreen.Text = StringTable.Hotkey.gbCaptureScreen;
this.lbUseHK3.Text = StringTable.Hotkey.lbUseHotKey;
this.rbNoHotKeyCaptureScreen.Text = StringTable.Hotkey.rbNoHotKey;
this.rbUseHotKeyCaptureScreen.Text = StringTable.Hotkey.rbUseHotkey;
this.gbHKBossKey.Text = StringTable.Hotkey.gbHKBossKey;
this.lbUserHkBoss.Text = StringTable.Hotkey.lbUseHotKey;
this.rbNoBossKey.Text = StringTable.Hotkey.rbNoHotKey;
this.rbBossKey.Text = StringTable.Hotkey.rbUseHotkey;
}
private void uiData_Changed(object sender, EventArgs e)
{
UiErrorHelper.HandEventSafely(this._iFrameworkWindow, delegate {
base.Modified = true;
});
}
public override bool UpdateData(bool update)
{
Imps.Client.Core.ConversationSetting host = this.CurrentUser.Configuration.UserSetting.ConversationSetting;
Imps.Client.Core.MainWindowSetting mainWindowSetting = this.CurrentUser.Configuration.UserSetting.MainWindowSetting;
try
{
if (update)
{
if (!this.CheckUserInput())
{
return false;
}
Suspender suspender = new Suspender(mainWindowSetting);
try
{
if (this.rbNoHotKey.Checked)
{
mainWindowSetting.HotKeyShowMainwindow = 1;
}
else
{
mainWindowSetting.HotKeyShowMainwindow = this.xHotKeyBoxMainWnd.HotKey.LParam;
}
if (this.rbNoBossKey.Checked)
{
mainWindowSetting.HotKeyHideMainwindow = 0;
}
else
{
mainWindowSetting.HotKeyHideMainwindow = this.xHotKeyBoxBossKey.HotKey.LParam;
}
}
finally
{
suspender.Dispose();
}
Suspender suspender2 = new Suspender(host);
try
{
host.SendMessageByEnterKey.ProposedValue = this.rbSendByEnter.Checked;
}
finally
{
suspender2.Dispose();
}
}
else
{
if (mainWindowSetting.HotKeyShowMainwindow == 1)
{
this.rbNoHotKey.Checked = true;
}
else
{
this.xHotKeyBoxMainWnd.HotKey = new HotKey(mainWindowSetting.HotKeyShowMainwindow);
this.rbUserKey.Checked = true;
}
this.xHotKeyBoxMainWnd.Enabled = this.rbUserKey.Checked;
if (mainWindowSetting.HotKeyHideMainwindow == 0)
{
this.rbNoBossKey.Checked = true;
}
else
{
this.xHotKeyBoxBossKey.HotKey = new HotKey(mainWindowSetting.HotKeyHideMainwindow);
this.rbBossKey.Checked = true;
}
this.xHotKeyBoxBossKey.Enabled = this.rbBossKey.Checked;
if (host.SendMessageByEnterKey != null)
{
this.rbSendByEnter.Checked = true;
}
else
{
this.rbSendByCtrlEnter.Checked = true;
}
this.gpHKSendMessage.Enabled = this.CurrentUser.Status == UserAccountStatus.Logon;
}
base.Modified = false;
return true;
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
return false;
}
}
private void xHotKeyBoxBossKey_Enter(object sender, EventArgs e)
{
((MainForm) this._iFrameworkWindow)._disableHotKey = true;
}
private void xHotKeyBoxBossKey_KeyDown(object sender, KeyEventArgs e)
{
try
{
BalloonHelper.RemoveAll();
}
catch
{
}
}
private void xHotKeyBoxBossKey_KeyUp(object sender, KeyEventArgs e)
{
try
{
if (this.xHotKeyBoxBossKey.HotKey != null)
{
string text = this.xHotKeyBoxBossKey.HotKey.ToString();
if (!this.xHotKeyBoxBossKey.HotKey.IsValid)
{
BalloonHelper.ShowInputErrorBallon(this.xHotKeyBoxBossKey, string.Format(StringTable.Hotkey.MsgInvalidHotKey, text), StringTable.Options.TitleInvalidInput);
this.xHotKeyBoxBossKey.HotKey = new HotKey(this.CurrentUser.Configuration.UserSetting.MainWindowSetting.HotKeyHideMainwindow);
}
else
{
this.uiData_Changed(sender, null);
}
}
}
catch
{
}
}
private void xHotKeyBoxBossKey_Leave(object sender, EventArgs e)
{
((MainForm) this._iFrameworkWindow)._disableHotKey = false;
}
private void xHotKeyBoxMainWnd_Enter(object sender, EventArgs e)
{
((MainForm) this._iFrameworkWindow)._disableHotKey = true;
}
private void xHotKeyBoxMainWnd_KeyDown(object sender, KeyEventArgs e)
{
try
{
BalloonHelper.RemoveAll();
}
catch
{
}
}
private void xHotKeyBoxMainWnd_KeyUp(object sender, KeyEventArgs e)
{
try
{
if (this.xHotKeyBoxMainWnd.HotKey != null)
{
string text = this.xHotKeyBoxMainWnd.HotKey.ToString();
if (!this.xHotKeyBoxMainWnd.HotKey.IsValid)
{
BalloonHelper.ShowInputErrorBallon(this.xHotKeyBoxMainWnd, string.Format(StringTable.Hotkey.MsgInvalidHotKey, text), StringTable.Options.TitleInvalidInput);
this.xHotKeyBoxMainWnd.HotKey = new HotKey(this.CurrentUser.Configuration.UserSetting.MainWindowSetting.HotKeyShowMainwindow);
}
else
{
this.uiData_Changed(sender, null);
}
}
}
catch
{
}
}
private void xHotKeyBoxMainWnd_Leave(object sender, EventArgs e)
{
((MainForm) this._iFrameworkWindow)._disableHotKey = false;
}
private Imps.Client.Core.User CurrentUser
{
get
{
return this._iFrameworkWindow.AccountManager.CurrentUser;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -