Beispiel #1
0
        /// <summary>
        /// 读取配置
        /// </summary>
        /// <param name="strFilePath"></param>
        private void GameAttack_ReadPlacement(string strFilePath)
        {
            switch (OperINI.ReadIni("出击", "选定的出击配置", 1.ToString(), strFilePath))
            {
            case "1":
                this.GameAttack_Placement1_radioButton.Checked = true;
                break;

            case "2":
                this.GameAttack_Placement2_radioButton.Checked = true;
                break;

            case "3":
                this.GameAttack_Placement3_radioButton.Checked = true;
                break;

            default:
                this.GameAttack_Placement1_radioButton.Checked = true;
                break;
            }
            GameAttack_Placement_radioButton_CheckedChanged(null, null);

            // 出击设置
            AttackSetting.PreWaitTime = int.Parse(OperINI.ReadIni("出击", "出击前置等待时间", 0.ToString(), strFilePath));
        }
Beispiel #2
0
        /// <summary>
        /// 读取配置
        /// </summary>
        /// <param name="strFilePath"></param>
        private void GameExpedition_ReadPlacement(string strFilePath)
        {
            this.GameExpedition_ExpeditionNumber2_comboBox.SelectedIndex = -1;
            this.GameExpedition_ExpeditionNumber3_comboBox.SelectedIndex = -1;
            this.GameExpedition_ExpeditionNumber4_comboBox.SelectedIndex = -1;
            this.GameExpedition_ExpeditionNumber2_comboBox.SelectedIndex = Convert.ToInt32(OperINI.ReadIni("远征海域", "远征队伍2", 2.ToString(), strFilePath)) - 1;
            this.GameExpedition_ExpeditionNumber3_comboBox.SelectedIndex = Convert.ToInt32(OperINI.ReadIni("远征海域", "远征队伍3", 5.ToString(), strFilePath)) - 1;
            this.GameExpedition_ExpeditionNumber4_comboBox.SelectedIndex = Convert.ToInt32(OperINI.ReadIni("远征海域", "远征队伍4", 6.ToString(), strFilePath)) - 1;

            // 远征设置
            ExpeditionSetting.IsSingleDepart        = bool.Parse(OperINI.ReadIni("远征海域", "远征单发", false.ToString(), strFilePath));
            ExpeditionSetting.SingleDepartWaitTime  = int.Parse(OperINI.ReadIni("远征海域", "远征单发等待间隔", 0.ToString(), strFilePath));
            ExpeditionSetting.ExpeditionWaitTime    = int.Parse(OperINI.ReadIni("远征海域", "远征归来等待时间", 0.ToString(), strFilePath));
            ExpeditionSetting.ExpeditionRanWaitTime = int.Parse(OperINI.ReadIni("远征海域", "远征归来等待随机时间", 0.ToString(), strFilePath));
        }
Beispiel #3
0
        /// <summary>
        /// 读取文件中的配置
        /// </summary>
        /// <param name="num"></param>
        private void ReadPlacement(int num)
        {
            string strFilePath = Application.StartupPath + @"\配置文件.ini";

            this.GameAttack_Seas_combobox.SelectedIndex            = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "出击海域", 1.ToString(), strFilePath)) - 1;
            this.GameAttack_Map_combobox.SelectedIndex             = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "出击地图", 1.ToString(), strFilePath)) - 1;
            this.GameAttack_Battle1_comboBox.SelectedIndex         = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗发生判定1", 0.ToString(), strFilePath));
            this.GameAttack_Formation1_comboBox.SelectedIndex      = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗1阵型", 0.ToString(), strFilePath));
            this.GameAttack_Battle2_comboBox.SelectedIndex         = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗发生判定2", 0.ToString(), strFilePath));
            this.GameAttack_Formation2_comboBox.SelectedIndex      = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗2阵型", 0.ToString(), strFilePath));
            this.GameAttack_Battle3_comboBox.SelectedIndex         = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗发生判定3", 0.ToString(), strFilePath));
            this.GameAttack_Formation3_comboBox.SelectedIndex      = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗3阵型", 0.ToString(), strFilePath));
            this.GameAttack_Battle4_comboBox.SelectedIndex         = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗发生判定4", 0.ToString(), strFilePath));
            this.GameAttack_Formation4_comboBox.SelectedIndex      = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗4阵型", 0.ToString(), strFilePath));
            this.GameAttack_Battle5_comboBox.SelectedIndex         = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗发生判定5", 0.ToString(), strFilePath));
            this.GameAttack_Formation5_comboBox.SelectedIndex      = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "战斗5阵型", 0.ToString(), strFilePath));
            this.GameAttack_IsDock_checkBox.Checked                = Convert.ToBoolean(OperINI.ReadIni($"出击配置{num}", "是否入渠", true.ToString(), strFilePath));
            this.GameAttack_DetectionStatus_comboBox.SelectedIndex = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "撤退条件", 2.ToString(), strFilePath));
            this.GameAttack_DockBenchmark_comboBox.SelectedIndex   = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "入渠基准", 1.ToString(), strFilePath));
            this.GameAttack_Frequency_numericUpDown.Value          = Convert.ToInt32(OperINI.ReadIni($"出击配置{num}", "出击次数", 5.ToString(), strFilePath));
            this.GameAttack_WaitTime_textBox.Text    = OperINI.ReadIni($"出击配置{num}", "等待固定时间", 12.ToString(), strFilePath);
            this.GameAttack_WaitTimeRan_textBox.Text = OperINI.ReadIni($"出击配置{num}", "等待随机时间", 120.ToString(), strFilePath);
        }
Beispiel #4
0
 private void GameWindow_ReadPlacement(string strFilePath)
 {
     GlobalObject.ClickOffsetXY = new Point(
         Convert.ToInt32(OperINI.ReadIni("游戏窗口", "手动偏移X", 0.ToString(), strFilePath)),
         Convert.ToInt32(OperINI.ReadIni("游戏窗口", "手动偏移Y", 0.ToString(), strFilePath)));
 }