コード例 #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));
        }
コード例 #2
0
 /// <summary>
 /// 写入配置
 /// </summary>
 /// <param name="strFilePath"></param>
 private void GameExpedition_WritePlacement(string strFilePath)
 {
     OperINI.WriteIni("远征海域", "远征队伍2", (this.GameExpedition_ExpeditionNumber2_comboBox.SelectedIndex + 1).ToString(), strFilePath);
     OperINI.WriteIni("远征海域", "远征队伍3", (this.GameExpedition_ExpeditionNumber3_comboBox.SelectedIndex + 1).ToString(), strFilePath);
     OperINI.WriteIni("远征海域", "远征队伍4", (this.GameExpedition_ExpeditionNumber4_comboBox.SelectedIndex + 1).ToString(), strFilePath);
     // 远征设置
     OperINI.WriteIni("远征海域", "远征单发", (ExpeditionSetting.IsSingleDepart).ToString(), strFilePath);
     OperINI.WriteIni("远征海域", "远征单发等待间隔", ExpeditionSetting.SingleDepartWaitTime.ToString(), strFilePath);
     OperINI.WriteIni("远征海域", "远征归来等待时间", ExpeditionSetting.ExpeditionWaitTime.ToString(), strFilePath);
     OperINI.WriteIni("远征海域", "远征归来等待随机时间", ExpeditionSetting.ExpeditionRanWaitTime.ToString(), strFilePath);
 }
コード例 #3
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));
        }
コード例 #4
0
        /// <summary>
        /// 写入配置
        /// </summary>
        /// <param name="strFilePath"></param>
        private void GameAttack_WritePlacement(string strFilePath)
        {
            var temp = "1";

            if (this.GameAttack_Placement1_radioButton.Checked)
            {
                temp = "1";
            }
            if (this.GameAttack_Placement2_radioButton.Checked)
            {
                temp = "2";
            }
            if (this.GameAttack_Placement3_radioButton.Checked)
            {
                temp = "3";
            }
            OperINI.WriteIni("出击", "选定的出击配置", temp, strFilePath);
            //GameAttack_SavePlacement_combobox_Click(null, null);
            // 出击设置
            OperINI.WriteIni("出击", "出击前置等待时间", AttackSetting.PreWaitTime.ToString(), strFilePath);
        }
コード例 #5
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);
        }
コード例 #6
0
        /// <summary>
        /// 存储当前配置页到文件
        /// </summary>
        /// <param name="num"></param>
        private void WritePlacement(int num)
        {
            string strFilePath = Application.StartupPath + @"\配置文件.ini";

            OperINI.WriteIni($"出击配置{num}", "出击海域", (this.GameAttack_Seas_combobox.SelectedIndex + 1).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "出击地图", (this.GameAttack_Map_combobox.SelectedIndex + 1).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗发生判定1", (this.GameAttack_Battle1_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗1阵型", (this.GameAttack_Formation1_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗发生判定2", (this.GameAttack_Battle2_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗2阵型", (this.GameAttack_Formation2_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗发生判定3", (this.GameAttack_Battle3_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗3阵型", (this.GameAttack_Formation3_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗发生判定4", (this.GameAttack_Battle4_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗4阵型", (this.GameAttack_Formation4_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗发生判定5", (this.GameAttack_Battle5_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "战斗5阵型", (this.GameAttack_Formation5_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "是否入渠", (this.GameAttack_IsDock_checkBox.Checked).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "撤退条件", (this.GameAttack_DetectionStatus_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "入渠基准", (this.GameAttack_DockBenchmark_comboBox.SelectedIndex).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "出击次数", (this.GameAttack_Frequency_numericUpDown.Value).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "等待固定时间", (this.GameAttack_WaitTime_textBox.Text).ToString(), strFilePath);
            OperINI.WriteIni($"出击配置{num}", "等待随机时间", (this.GameAttack_WaitTimeRan_textBox.Text).ToString(), strFilePath);
        }
コード例 #7
0
 private void GameWindow_WritePlacement(string strFilePath)
 {
     OperINI.WriteIni("游戏窗口", "手动偏移X", GlobalObject.ClickOffsetXY.X.ToString(), strFilePath);
     OperINI.WriteIni("游戏窗口", "手动偏移Y", GlobalObject.ClickOffsetXY.Y.ToString(), strFilePath);
 }
コード例 #8
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)));
 }