📄 ssstatusreplaycontrol.cs
字号:
this.label8.Location = new Point(0x11, 0x97);
this.label8.Name = "label8";
this.label8.Size = new Size(0x69, 14);
this.label8.TabIndex = 11;
this.label8.Text = "当前自定义状态:";
this.label8.TextAlign = ContentAlignment.TopLeft;
this.label8.UseMnemonic = false;
this.chkAutoOffline.AutoSize = true;
this.chkAutoOffline.Location = new Point(0x10, 0x39);
this.chkAutoOffline.Name = "chkAutoOffline";
this.chkAutoOffline.Size = new Size(15, 14);
this.chkAutoOffline.TabIndex = 4;
this.chkAutoOffline.UseVisualStyleBackColor = true;
this.chkAutoOffline.CheckedChanged += new EventHandler(this.chkAutoOffline_CheckedChanged);
this.numAutoOffline.Location = new Point(0x22, 0x36);
int[] numArray4 = new int[4];
numArray4[0] = 0x18;
this.numAutoOffline.Maximum = new decimal(numArray4);
this.numAutoOffline.MaxLength = 0x7fff;
int[] numArray5 = new int[4];
numArray5[0] = 1;
this.numAutoOffline.Minimum = new decimal(numArray5);
this.numAutoOffline.Name = "numAutoOffline";
this.numAutoOffline.Size = new Size(0x2b, 20);
this.numAutoOffline.TabIndex = 5;
int[] numArray6 = new int[4];
numArray6[0] = 2;
this.numAutoOffline.Value = new decimal(numArray6);
this.label9.AutoEllipsis = false;
this.label9.AutoSize = true;
this.label9.BorderColor = Color.Black;
this.label9.BorderStyle = BorderStyle.None;
this.label9.ButtonBorderStyle = ButtonBorderStyle.Solid;
this.label9.Location = new Point(0x4e, 0x3b);
this.label9.Name = "label9";
this.label9.Size = new Size(0xee, 14);
this.label9.TabIndex = 6;
this.label9.Text = "小时键盘鼠标无动作自动切换到“离线”状态";
this.label9.TextAlign = ContentAlignment.TopLeft;
this.label9.UseMnemonic = false;
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.Controls.Add(this.label9);
base.Controls.Add(this.numAutoOffline);
base.Controls.Add(this.chkAutoOffline);
base.Controls.Add(this.label8);
base.Controls.Add(this.lstMainPresences);
base.Controls.Add(this.tbCustomTo);
base.Controls.Add(this.label7);
base.Controls.Add(this.btnModify);
base.Controls.Add(this.lbMainPresence);
base.Controls.Add(this.btnAdd);
base.Controls.Add(this.btnDel);
base.Controls.Add(this.lstCustomizedPresence);
base.Controls.Add(this.label5);
base.Controls.Add(label3);
base.Controls.Add(this.label4);
base.Controls.Add(this.dlReply);
base.Controls.Add(this.txtReply);
base.Controls.Add(this.chkAutoReply);
base.Controls.Add(this.nudAway);
base.Controls.Add(this.label2);
base.Controls.Add(label2);
base.Controls.Add(this.chkFullScreen);
base.Controls.Add(this.chkLock);
base.Controls.Add(this.chkNoAction);
base.Controls.Add(this.label1);
base.Controls.Add(label);
base.Name = "SsStatusReplayControl";
base.Size = new Size(0x16b, 0x1b1);
base.Load += new EventHandler(this.SsStatusReplayControl_Load);
this.nudAway.EndInit();
this.numAutoOffline.EndInit();
base.ResumeLayout(false);
base.PerformLayout();
}
private void InitPresences()
{
MainPresence[] presenceArray = new MainPresence[] { MainPresence.Online, MainPresence.Busy, MainPresence.BeRightBack, MainPresence.Away, MainPresence.InTheMeeting, MainPresence.OnThePhone, MainPresence.OutToLunch };
ValueNameDescList<MainPresence> list = new ValueNameDescList<MainPresence>(presenceArray.Length);
foreach (MainPresence presence in presenceArray)
{
list.Add(presence, MainPresenceHelper.MainPresence2Str(presence));
}
OptionsControlBase.InnerSetListControlDataSource(this.lstMainPresences, list);
}
private void lstCustomizedPresence_SelectedIndexChanged(object sender, EventArgs e)
{
UiErrorHelper.HandEventSafely(this._frameworkWnd, delegate {
ValueNameDesc<MainPresence> selectedItem = (ValueNameDesc<MainPresence>) this.lstCustomizedPresence.SelectedItem;
if (selectedItem == null)
{
this.tbCustomTo.Text = string.Empty;
this.lstMainPresences.ClearSelected();
}
else
{
this.tbCustomTo.Text = selectedItem.Name;
this.lstMainPresences.SelectedValue = selectedItem.Value;
}
});
}
private void SetLimitation()
{
ControlHelper.ForceControlImeHangul(this.tbCustomTo);
ControlHelper.ForceControlImeHangul(this.txtReply);
}
private void SsStatusReplayControl_Load(object sender, EventArgs e)
{
try
{
this.lstCustomizedPresence.DrawMode = DrawMode.OwnerDrawFixed;
this.lstCustomizedPresence.DrawMode = DrawMode.Normal;
this.lstMainPresences.DrawMode = DrawMode.OwnerDrawFixed;
this.lstMainPresences.DrawMode = DrawMode.Normal;
}
catch
{
}
}
private void txtReply_TextChanged(object sender, EventArgs e)
{
int selectedIndex = this.dlReply.SelectedIndex;
this._autoReply[selectedIndex] = this.txtReply.Text;
}
private void uiCustomizedPresence_DataChanged(object sender, EventArgs e)
{
try
{
this.EnableControls();
}
catch
{
}
}
private void uiData_Changed(object sender, EventArgs e)
{
UiErrorHelper.HandEventSafely(this._frameworkWnd, delegate {
base.Modified = true;
});
}
public override bool UpdateData(bool update)
{
try
{
if (update)
{
if (!this.CheckUserInput())
{
return false;
}
Suspender suspender = new Suspender(this.CurrentUser.Configuration.UserSetting);
try
{
string[] strArray = new string[5];
for (int i = 0; i < this._autoReply.Count; i++)
{
strArray[i] = this._autoReply[i].ToString();
}
this.CurrentUser.Configuration.UserSetting.AutoReplies = strArray;
}
finally
{
suspender.Dispose();
}
Suspender suspender2 = new Suspender(this.CurrentUser.Configuration.UserSetting.ConversationSetting);
try
{
this.CurrentUser.Configuration.UserSetting.ConversationSetting.AutoReplyIndex.ProposedValue = this.dlReply.SelectedIndex;
this.CurrentUser.Configuration.UserSetting.ConversationSetting.AutoReplyEnabled.ProposedValue = this.chkAutoReply.Checked;
}
finally
{
suspender2.Dispose();
}
Suspender suspender3 = new Suspender(this.CurrentUser.Configuration.UserSetting.SensorSetting);
try
{
this.CurrentUser.Configuration.UserSetting.SensorSetting.BusyOnFullScreen.ProposedValue = this.chkFullScreen.Checked;
this.CurrentUser.Configuration.UserSetting.SensorSetting.AwayOnScreenSaver.ProposedValue = this.chkLock.Checked;
this.CurrentUser.Configuration.UserSetting.SensorSetting.AwayOnIdle.ProposedValue = this.chkNoAction.Checked;
this.CurrentUser.Configuration.UserSetting.SensorSetting.AwayOnIdleMinutes.ProposedValue = Convert.ToInt32(this.nudAway.Value);
this.CurrentUser.Configuration.UserSetting.SensorSetting.OfflineOnIdle.ProposedValue = this.chkAutoOffline.Checked;
this.CurrentUser.Configuration.UserSetting.SensorSetting.OfflineOnIdleHours.ProposedValue = (int) this.numAutoOffline.Value;
}
finally
{
suspender3.Dispose();
}
if (this._customizedPresencesChanged)
{
this.CurrentUser.Configuration.UserSetting.CustomPresences.Clear();
foreach (ValueNameDesc<MainPresence> desc in this.lstCustomizedPresence.Items)
{
this.CurrentUser.Configuration.UserSetting.CustomPresences.TryAdd(desc.Name, desc.Value);
}
}
}
else
{
this.chkAutoReply.Checked = (bool) this.CurrentUser.Configuration.UserSetting.ConversationSetting.AutoReplyEnabled;
this.dlReply.SelectedIndex = (int) this.CurrentUser.Configuration.UserSetting.ConversationSetting.AutoReplyIndex;
this.chkFullScreen.Checked = (bool) this.CurrentUser.Configuration.UserSetting.SensorSetting.BusyOnFullScreen;
this.chkLock.Checked = (bool) this.CurrentUser.Configuration.UserSetting.SensorSetting.AwayOnScreenSaver;
this.chkNoAction.Checked = (bool) this.CurrentUser.Configuration.UserSetting.SensorSetting.AwayOnIdle;
this.nudAway.Value = (decimal) this.CurrentUser.Configuration.UserSetting.SensorSetting.AwayOnIdleMinutes;
this.chkAutoOffline.Checked = (bool) this.CurrentUser.Configuration.UserSetting.SensorSetting.OfflineOnIdle;
this.numAutoOffline.Value = (decimal) this.CurrentUser.Configuration.UserSetting.SensorSetting.OfflineOnIdleHours;
this.dlReply.Enabled = this.chkAutoReply.Checked;
this.txtReply.Enabled = this.chkAutoReply.Checked;
this.nudAway.Enabled = this.chkNoAction.Checked;
this.tbCustomTo.Text = string.Empty;
this.lstMainPresences.SelectedValue = MainPresence.Away;
this.FillCustomizedPresences(this.CurrentUser.Configuration.UserSetting.CustomPresences);
}
base.Modified = false;
this._customizedPresencesChanged = false;
this.EnableControls();
return true;
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
return false;
}
}
private Imps.Client.Core.User CurrentUser
{
get
{
return this._frameworkWnd.AccountManager.CurrentUser;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -