/// <summary> /// 将时间写入窗口控件 /// </summary> /// <param name="Time"></param> private void SetUITime(TimeSpan Time) { if (GetMain_Form.InvokeRequired) { GetMain_Form.BeginInvoke(new Action <TimeSpan>(SetUITime), Time); } else { switch (_timerNumber) { case 2: GetMain_Form.GameExpedition_Timer2Hour_textBox.Text = GetHour(Time).ToString(); GetMain_Form.GameExpedition_Timer2Minute_textBox.Text = Time.Minutes.ToString(); GetMain_Form.GameExpedition_Timer2Second_textBox.Text = Time.Seconds.ToString(); break; case 3: GetMain_Form.GameExpedition_Timer3Hour_textBox.Text = GetHour(Time).ToString(); GetMain_Form.GameExpedition_Timer3Minute_textBox.Text = Time.Minutes.ToString(); GetMain_Form.GameExpedition_Timer3Second_textBox.Text = Time.Seconds.ToString(); break; case 4: GetMain_Form.GameExpedition_Timer4Hour_textBox.Text = GetHour(Time).ToString(); GetMain_Form.GameExpedition_Timer4Minute_textBox.Text = Time.Minutes.ToString(); GetMain_Form.GameExpedition_Timer4Second_textBox.Text = Time.Seconds.ToString(); break; default: break; } } }
/// <summary> /// 设置远征勾选框UI /// </summary> /// <param name="team">远征队伍编号(2,3,4)</param> /// <param name="check">设定是否勾选</param> private void Set_ChangeTeamChecked(int team, bool check) { if (GetMain_Form.InvokeRequired) { GetMain_Form.BeginInvoke(new Action <int, bool>(Set_ChangeTeamChecked), team, check); } else { switch (team) { case 2: GetMain_Form.GameExpedition_Team2Checked_checkBox.Checked = check; break; case 3: GetMain_Form.GameExpedition_Team3Checked_checkBox.Checked = check; break; case 4: GetMain_Form.GameExpedition_Team4Checked_checkBox.Checked = check; break; default: break; } } }
/// <summary> /// 修改Lua脚本状态栏 /// </summary> /// <param name="text">要改变的文字</param> /// <param name="fontColor">文字字体颜色</param> /// <param name="backColor">背景框颜色</param> /// <param name="bold">字体是否粗体</param> public void Set_ChangeStatus(string text, Color fontColor, Color backColor, bool bold = true) { if (GetMain_Form.InvokeRequired) { GetMain_Form.BeginInvoke(new Action <string, Color, Color, bool>(Set_ChangeStatus), text, fontColor, backColor, bold); } else { GetMain_Form.GameLuaScript_Status_textBox.Text = text; GetMain_Form.GameLuaScript_Status_textBox.ForeColor = fontColor; GetMain_Form.GameLuaScript_Status_textBox.BackColor = backColor; if (bold) { GetMain_Form.GameLuaScript_Status_textBox.Font = new Font(GetMain_Form.GameLuaScript_Status_textBox.Font, FontStyle.Bold); } else { GetMain_Form.GameLuaScript_Status_textBox.Font = new Font(GetMain_Form.GameLuaScript_Status_textBox.Font, FontStyle.Regular); } } }