Example #1
0
 /// <summary>
 ///     開始ボタン押下時の処理
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnStartButtonClick(object sender, EventArgs e)
 {
     if (!File.Exists(PatchController.TargetFileName))
     {
         return;
     }
     saveButton.Enabled = PatchController.AutoMode ? PatchController.AutoProcess() : PatchController.Patch();
 }
Example #2
0
        public static void Main()
        {
            if (!PatchController.CheckDll())
            {
                return;
            }
            if (PatchController.ParseCommandLine())
            {
                PatchController.AutoProcess();
            }
            else
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                Application.Run(new MainForm());
            }
        }
Example #3
0
        /// <summary>
        ///     参照ボタン押下時の処理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnBrowseButtonClick(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();

            if (dialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            pathTextBox.Text = dialog.FileName;
            // 自動判別処理
            if (typeComboBox.SelectedIndex == 0)
            {
                PatchController.DetectGameType(pathTextBox.Text);
                typeComboBox.SelectedIndex = PatchController.GetGameIndex();
            }
            // 自動処理モード
            if (PatchController.AutoMode)
            {
                saveButton.Enabled = PatchController.AutoProcess();
            }
        }
Example #4
0
        /// <summary>
        ///     ファイルをドロップした時の処理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnFormDragDrop(object sender, DragEventArgs e)
        {
            string fileName = ((string[])e.Data.GetData(DataFormats.FileDrop, false))[0];

            // フォルダをドロップした場合はその下の実行ファイルを対象とする
            if (Directory.Exists(fileName))
            {
                fileName = PatchController.DetectExeFileName(fileName);
            }
            pathTextBox.Text = fileName;
            // 自動判別処理
            if (typeComboBox.SelectedIndex == 0)
            {
                PatchController.DetectGameType(pathTextBox.Text);
                typeComboBox.SelectedIndex = PatchController.GetGameIndex();
            }
            // 自動処理モード
            if (PatchController.AutoMode)
            {
                saveButton.Enabled = PatchController.AutoProcess();
            }
        }