void UpdateControls(VgcApis.Models.Datas.CoreServSettings coreServSettings) { var s = coreServSettings; tboxServerName.Text = s.serverName; tboxDescription.Text = s.serverDescription; cboxInboundMode.SelectedIndex = s.inboundMode; cboxInboundAddress.Text = s.inboundAddress; cboxMark.Text = s.mark; chkAutoRun.Checked = s.isAutorun; chkBypassCnSite.Checked = s.isBypassCnSite; chkGlobalImport.Checked = s.isGlobalImport; chkUntrack.Checked = s.isUntrack; }
void InitControls(ICoreServCtrl coreServ) { this.coreServ = coreServ; orgCoreServSettings = new VgcApis.Models.Datas.CoreServSettings(coreServ); var marks = servers.GetMarkList(); lbServerTitle.Text = coreServ.GetCoreStates().GetTitle(); cboxMark.Items.Clear(); cboxMark.Items.AddRange(marks); Misc.UI.ResetComboBoxDropdownMenuWidth(cboxMark); UpdateControls(orgCoreServSettings); AutoSelectShareLinkType(); UpdateShareLink(); }
VgcApis.Models.Datas.CoreServSettings GetterSettings() { var result = new VgcApis.Models.Datas.CoreServSettings(); result.serverName = tboxServerName.Text; result.serverDescription = tboxDescription.Text; result.inboundMode = cboxInboundMode.SelectedIndex; result.inboundAddress = cboxInboundAddress.Text; result.mark = cboxMark.Text; result.isAutorun = chkAutoRun.Checked; result.isBypassCnSite = chkBypassCnSite.Checked; result.isGlobalImport = chkGlobalImport.Checked; result.isUntrack = chkUntrack.Checked; return(result); }
void InitControls(ICoreServCtrl coreServ) { this.coreServ = coreServ; orgCoreServSettings = new VgcApis.Models.Datas.CoreServSettings(coreServ); var marks = servers.GetMarkList(); VgcApis.Misc.UI.Invoke(() => { tboxTitle.Text = coreServ.GetCoreStates().GetTitle(); cboxMark.Items.Clear(); foreach (var mark in marks) { cboxMark.Items.Add(mark); } Misc.UI.ResetComboBoxDropdownMenuWidth(cboxMark); UpdateControls(orgCoreServSettings); }); }