Пример #1
0
        private void FormBatchModifyServerInfo_Shown(object sender, EventArgs e)
        {
            this.cboxMark.Items.Clear();
            foreach (var mark in servers.GetMarkList())
            {
                this.cboxMark.Items.Add(mark);
            }

            var firstCtrl = servers
                            .GetAllServersOrderByIndex()
                            .Where(s => s.GetCoreStates().IsSelected())
                            .FirstOrDefault();

            if (firstCtrl == null)
            {
                return;
            }

            var first = firstCtrl.GetCoreStates().GetAllRawCoreInfo();

            this.cboxInMode.SelectedIndex             = first.customInbType;
            this.tboxInIP.Text                        = first.inbIp;
            this.tboxInPort.Text                      = first.inbPort.ToString();
            this.cboxMark.Text                        = first.customMark;
            this.cboxAutorun.SelectedIndex            = first.isAutoRun ? 0 : 1;
            this.cboxImport.SelectedIndex             = first.isInjectImport ? 0 : 1;
            this.cboxIsInjectSkipCNSite.SelectedIndex = first.isInjectSkipCNSite ? 0 : 1;
        }
        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();
        }
Пример #3
0
        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);
            });
        }
Пример #4
0
 void UpdateMarkFilterItemList(ToolStripComboBox marker)
 {
     marker.Items.Clear();
     marker.Items.AddRange(servers.GetMarkList().ToArray());
 }