?? entrypointcontrol.cs
字號:
this.rbPublic.Location = new Point(3, 0xf1);
this.rbPublic.Name = "rbPublic";
this.rbPublic.Size = new Size(0x54, 0x11);
this.rbPublic.TabIndex = 3;
this.rbPublic.Text = "公共計算機";
this.rbPublic.UseVisualStyleBackColor = true;
this.rbPublic.CheckedChanged += new EventHandler(this.rbPublic_CheckedChanged);
this.InitStatus.BackColor = Color.White;
this.InitStatus.DisplayName = "";
this.InitStatus.DisplayNameFont = new Font("宋體", 9f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
this.InitStatus.DisplayNameForeColor = Color.Black;
this.InitStatus.DropDownButtonImage = (Image) manager.GetObject("InitStatus.DropDownButtonImage");
this.InitStatus.DropDownMenu = this.InitStatusMenu;
this.InitStatus.Location = new Point(70, 0xb8);
this.InitStatus.MouseDownBackColor = Color.White;
this.InitStatus.MouseDownBackgroundImage = null;
this.InitStatus.MouseDownBorderColor = Color.FromArgb(0x98, 200, 0xe8);
this.InitStatus.MouseOverBackColor = Color.White;
this.InitStatus.MouseOverBackgroundImage = null;
this.InitStatus.MouseOverBorderColor = Color.FromArgb(0x48, 0x90, 200);
this.InitStatus.Name = "InitStatus";
this.InitStatus.OnlineStatusText = "在線";
this.InitStatus.OnlineStatusTextFont = new Font("宋體", 9f);
this.InitStatus.OnlineStatusTextForeColor = Color.Black;
this.InitStatus.Size = new Size(120, 0x17);
this.InitStatus.TabIndex = 8;
this.InitStatus.ToolTipText = "";
this.InitStatusMenu.Name = "InitStatusMenu";
this.InitStatusMenu.Size = new Size(0x99, 0x1a);
this.InitStatusMenu.Opening += new CancelEventHandler(this.InitStatusMenu_Opening);
this.cmbId.BackColor = Color.White;
this.cmbId.Location = new Point(0x18, 0x75);
this.cmbId.MaxLength = 11;
this.cmbId.Name = "cmbId";
this.cmbId.Size = new Size(0x9d, 0x15);
this.cmbId.TabIndex = 0;
this.cmbId.TextChanged += new EventHandler(this.cmbId_TextChanged);
this.tbPassword.BackColor = Color.White;
this.tbPassword.BorderStyle = BorderStyle.FixedSingle;
this.tbPassword.Location = new Point(0x18, 0x9d);
this.tbPassword.MaxLength = 0x10;
this.tbPassword.Name = "tbPassword";
this.tbPassword.Size = new Size(0x9d, 20);
this.tbPassword.TabIndex = 1;
this.tbPassword.UseSystemPasswordChar = true;
this.tbPassword.TextChanged += new EventHandler(this.tbPassword_TextChanged);
this.btnLogin.BackColor = Color.Transparent;
this.btnLogin.Location = new Point(0x92, 0xdb);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new Size(0x4b, 0x19);
this.btnLogin.TabIndex = 2;
this.btnLogin.UseVisualStyleBackColor = false;
this.btnLogin.Click += new EventHandler(this.btnLogin_Click);
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
this.BackColor = Color.Transparent;
base.Controls.Add(this.InitStatus);
base.Controls.Add(this.rbPublic);
base.Controls.Add(this.rbPrivate);
base.Controls.Add(this.cmbId);
base.Controls.Add(this.cbAutoLogin);
base.Controls.Add(this.cbSavePassword);
base.Controls.Add(this.cbSaveAccount);
base.Controls.Add(this.tbPassword);
base.Controls.Add(this.btnLogin);
this.MinimumSize = new Size(100, 150);
base.Name = "EntryPointControl";
base.Size = new Size(0x10d, 370);
base.ResumeLayout(false);
base.PerformLayout();
}
private void InitializeWndlessComponent()
{
this.lblId = new WndlessLabel();
this.llNetSetting = new WndlessLinkLabel();
this.pbPortrait = new WndlessPictureBox();
this.llProvisioning = new WndlessLinkLabel();
this.llForgetPass = new WndlessLinkLabel();
this.llEraseInfo = new WndlessLinkLabel();
this.llReconnectAtOnce = new WndlessLinkLabel();
this.lblPassword = new WndlessLabel();
this.lblStep = new WndlessLabel();
this.lbInitStatus = new WndlessLabel();
this.lblPassword.AutoSize = true;
this.lblPassword.Size = new Size(0x42, 13);
this.lblPassword.Text = StringTable.User.EP_LabelPass;
this.lblId.AutoSize = true;
this.lblId.Location = new Point(0x15, 0x65);
this.lblId.Text = StringTable.User.EP_LabelId;
this.lbInitStatus.AutoSize = true;
this.lbInitStatus.Location = new Point(0x15, 0xbb);
this.lbInitStatus.Size = new Size(0x22, 13);
this.lbInitStatus.Text = "狀態(tài):";
this.lblStep.AutoSize = true;
this.lblStep.ForeColor = Color.Blue;
this.lblStep.Text = string.Empty;
this.llNetSetting.Text = StringTable.User.EP_LabelNetSetting;
this.llNetSetting.Click += new EventHandler(this.llNetSetting_LinkClicked);
this.llReconnectAtOnce.Text = StringTable.User.EP_LabelConnectNow;
this.llReconnectAtOnce.Click += new EventHandler(this.llReconnectAtOnce_Click);
this.llReconnectAtOnce.Visible = false;
this.pbPortrait.Image = ImpsPortrait.GetDefaultPortrait(0x60, 0x60);
this.pbPortrait.BorderStyle = BorderStyle.FixedSingle;
this.pbPortrait.Margin = new Padding(2);
this.pbPortrait.SizeMode = PictureBoxSizeMode.AutoSize;
this.llProvisioning.Text = StringTable.User.EP_LabelProvioning;
this.llProvisioning.Click += new EventHandler(this.llProvisioning_Click);
this.llForgetPass.Text = StringTable.User.EP_LabelForgetPass;
this.llForgetPass.Click += new EventHandler(this.llForgetPass_LinkClicked);
this.llEraseInfo.Text = StringTable.User.EP_LabelEraseInfo;
this.llEraseInfo.Click += new EventHandler(this.llEraseInfo_LinkClicked);
this._wndlessCtls = new WndlessControlCollection(this);
this._wndlessCtls.Add(this.lblId);
this._wndlessCtls.Add(this.lblPassword);
this._wndlessCtls.Add(this.lbInitStatus);
this._wndlessCtls.Add(this.lblStep);
this._wndlessCtls.Add(this.llNetSetting);
this._wndlessCtls.Add(this.pbPortrait);
this._wndlessCtls.Add(this.llProvisioning);
this._wndlessCtls.Add(this.llForgetPass);
this._wndlessCtls.Add(this.llEraseInfo);
this._wndlessCtls.Add(this.llReconnectAtOnce);
}
private void InitStatusMenu_Opening(object sender, CancelEventArgs e)
{
foreach (ToolStripItem item in this.InitStatusMenu.Items)
{
menu_radioitem _radioitem = item as menu_radioitem;
if (_radioitem != null)
{
CustomPresence tag = _radioitem.Tag as CustomPresence;
if (tag != null)
{
if (tag.BasicPresence == this._initPresence)
{
_radioitem.Radioed = true;
continue;
}
_radioitem.Radioed = false;
}
}
}
}
private void InitStatusMenuItems()
{
EventHandler handler = null;
ToolStripItem[] presenceMenuItems = this._manager.GetPresenceMenuItems(false, true);
for (int i = 0; i < (presenceMenuItems.Length - 4); i++)
{
this.InitStatusMenu.Items.Add(presenceMenuItems[i]);
if (handler == null)
{
handler = delegate (object sender, EventArgs e) {
ToolStripItem item = sender as ToolStripItem;
if (item != null)
{
CustomPresence tag = item.Tag as CustomPresence;
if (tag != null)
{
this.InitStatus.OnlineStatusText = MainPresenceHelper.MainPresence2Str(tag.BasicPresence);
this._initPresence = tag.BasicPresence;
}
}
};
}
presenceMenuItems[i].Click += handler;
}
}
private void InnerOnKeyPress(KeyPressEventArgs e)
{
try
{
if (base.Visible)
{
this.HideErrorTip();
switch (e.KeyChar)
{
case '\r':
this.DoLoginOrCancel();
break;
case '\x001b':
this.CancelLogin();
break;
}
}
}
catch
{
}
}
private static bool IsIdCompleted(string id)
{
return (id.Length == 11);
}
private void llEraseInfo_LinkClicked(object sender, EventArgs e)
{
try
{
string text = this.cmbId.Text;
if (text.Length > 0)
{
EraseAccountForm form = new EraseAccountForm(text);
if (ControlHelper.ShowDialogCenterOnParent(form, base.ParentForm) == DialogResult.OK)
{
if (UserAccounts.EraseAccountElement(text))
{
UserAccounts.SaveToLocal();
}
this.cmbId.Items.Remove(text);
this.cmbId.Text = string.Empty;
this.tbPassword.Text = string.Empty;
this.TryLoadPortrait(string.Empty);
this.TryFillRelatedInfo();
this.cmbId.Focus();
if (text.Length >= 11)
{
long mappedSid = UserAccounts.GetMappedSid(text);
if (mappedSid <= 0L)
{
return;
}
text = mappedSid.ToString();
}
if (form.RbAllMaterials.Checked)
{
this._manager.FrameworkWnd.PersistentManager.DelById(text);
}
else if (form.RbDetailOption.Checked)
{
if (form.CkChatHistory.Checked)
{
this._manager.FrameworkWnd.PersistentManager.DelChatHistoryById(text);
}
if (form.CkContactInfo.Checked)
{
this._manager.FrameworkWnd.PersistentManager.DelContactsInfoById(text);
}
if (form.CkCaches.Checked)
{
this._manager.FrameworkWnd.PersistentManager.DelUserInfoById(text);
this._manager.FrameworkWnd.PersistentManager.DelPortraitsById(text);
this._manager.FrameworkWnd.PersistentManager.DelPluginsCfgById(text);
this._manager.FrameworkWnd.PersistentManager.DelPortraitsById(text);
}
}
}
}
}
catch (Exception exception)
{
UiErrorHelper.HandExceptionSafely(this._manager.FrameworkWnd, exception);
}
}
private void llForgetPass_LinkClicked(object sender, EventArgs e)
{
try
{
new SetPasswordWizard(this._manager.FrameworkWnd).ShowDialog();
}
catch (Exception exception)
{
UiErrorHelper.HandExceptionSafely(this._manager.FrameworkWnd, exception);
}
}
private void llNetSetting_LinkClicked(object sender, EventArgs e)
{
try
{
this._manager.FrameworkWnd.ShowOptions("SsNet");
}
catch (Exception exception)
{
UiErrorHelper.HandExceptionSafely(this._manager.FrameworkWnd, exception);
}
}
private void llProvisioning_Click(object sender, EventArgs e)
{
try
{
this._manager.Register();
}
catch (Exception exception)
{
UiErrorHelper.HandExceptionSafely(this._manager.FrameworkWnd, exception);
}
}
private void llReconnectAtOnce_Click(object sender, EventArgs e)
{
this.autoReconnect.ConnectNow();
}
internal void LoadUserAccounts()
{
this.cmbId.Items.Clear();
try
{
string[] ids = UserAccounts.EnumAccounts();
SortIds(ids);
this.cmbId.Items.AddRange(ids);
this.cmbId.Text = UserAccounts.LatestId;
this.TryFillRelatedInfo();
}
catch (Exception exception)
{
ClientLogger.WriteGeneral(exception.ToString());
}
}
private void MainWindow_Activated(object sender, EventArgs e)
{
try
{
if (base.Visible)
{
this.cmbId.Focus();
}
}
catch
{
}
}
protected override void OnControlAdded(ControlEventArgs e)
{
e.Control.KeyPress += new KeyPressEventHandler(this.Child_KeyPress);
base.OnControlAdded(e);
}
protected override void OnControlRemoved(ControlEventArgs e)
{
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -