Пример #1
0
        private void SetEnbled(bool result)
        {
            if (NewBaseTextBox.InvokeRequired)
            {
                Enableddelegate en = SetEnbled;
                NewBaseTextBox.Invoke(en, result);
            }
            else
            {
                NewBaseTextBox.Enabled = result;
            }

            if (projectComboBox.InvokeRequired)
            {
                Enableddelegate en = SetEnbled;
                projectComboBox.Invoke(en, result);
            }
            else
            {
                projectComboBox.Enabled = result;
            }

            if (QuickSwitch.InvokeRequired)
            {
                Enableddelegate en = SetEnbled;
                QuickSwitch.Invoke(en, result);
            }
            else
            {
                QuickSwitch.Enabled = result;
            }

            if (useSwitch.InvokeRequired)
            {
                Enableddelegate en = SetEnbled;
                useSwitch.Invoke(en, result);
            }
            else
            {
                useSwitch.Enabled = result;
            }


            if (restSwitch.InvokeRequired)
            {
                Enableddelegate en = SetEnbled;
                restSwitch.Invoke(en, result);
            }
            else
            {
                restSwitch.Enabled = result;
            }

            if (ScriptTextBox.InvokeRequired)
            {
                Enableddelegate en = SetEnbled;
                ScriptTextBox.Invoke(en, result);
            }
            else
            {
                ScriptTextBox.Enabled = result;
            }

            if (startButton.InvokeRequired)
            {
                Enableddelegate en = SetEnbled;
                startButton.Invoke(en, result);
            }
            else
            {
                startButton.Enabled = result;
            }
        }
Пример #2
0
        /// <summary>
        /// 根据项目设置刷库开关
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void projectComboBox_SelectionChangeCommitted(object sender, EventArgs e)
        {
            NewBaseTextBox.Clear();

            switch (projectComboBox.Text)
            {
            case "简体魔域  my":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"pcmy_autotest{TimeStamp()}";
                _oldBase            = @"my";
                break;

            case "先锋魔域  xf":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"pcmy_autotestxf{TimeStamp()}";
                _oldBase            = @"xfmy";
                break;

            case "英文魔域  enmy":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"enmy_autotest{TimeStamp()}";
                _oldBase            = @"enmy";
                break;


            case "魔域互通 my":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"myht_autotest{TimeStamp()}";
                _oldBase            = @"my";
                break;


            case "手机魔域  init_ndsdk":
                QuickSwitch.开关状态    = DS开关.状态.OFF;
                useSwitch.开关状态      = DS开关.状态.OFF;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"sjmy_again{TimeStamp()}";
                _oldBase            = @"sjmy_autotest_init_ndsdk";
                break;

            case "西山居魔域  init_xsj":
                QuickSwitch.开关状态    = DS开关.状态.OFF;
                useSwitch.开关状态      = DS开关.状态.OFF;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"sjmy_again{TimeStamp()}";
                _oldBase            = @"sjmy_autotest_init_xsj";
                break;

            case "简体征服 cnzf":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"cnzfauto{TimeStamp()}";
                _oldBase            = @"cnzf";
                break;

            case "怀旧魔域 hjmy":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"hjmy_autotest{TimeStamp()}";
                _oldBase            = @"hjmy";
                break;

            case "魔域时间版 sjbmy":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"sjbmy_autotest{TimeStamp()}";
                _oldBase            = @"sjbmy";
                break;

            case "boos版魔域 bossmy":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"bossmy_autotest{TimeStamp()}";
                _oldBase            = @"bossmy";
                break;

            case "幻兽特色服 tsfhs":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"tsfhs_autotest{TimeStamp()}";
                _oldBase            = @"tsfhs";
                break;

            case "千面特色服 tsfqm":
                QuickSwitch.开关状态    = DS开关.状态.OFF;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"tsfqm_autotest{TimeStamp()}";
                _oldBase            = @"tsfqm";
                break;

            case "战士特色服 myzs":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"myzs_autotest{TimeStamp()}";
                _oldBase            = @"myzs";
                break;

            case "新服特色服 new":
                QuickSwitch.开关状态    = DS开关.状态.ON;
                useSwitch.开关状态      = DS开关.状态.ON;
                restSwitch.开关状态     = DS开关.状态.ON;
                NewBaseTextBox.Text = $@"new_autotest{TimeStamp()}";
                _oldBase            = @"my";
                break;
            }
        }