Beispiel #1
0
        /// <summary>
        /// Loadイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainForm_Load(object sender, EventArgs e)
        {
            //設定データ
            this.SettingsParameters = new SettingsParameters();


            //バージョン取得
            System.Diagnostics.FileVersionInfo fvInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(
                System.Reflection.Assembly.GetExecutingAssembly().Location
                );
            //フォームタイトル設定
            this.Text = fvInfo.ProductName + " - Ver." + fvInfo.ProductVersion;

            //キャンセルボタン設定
            //処理実行と同じ場所に設定し、非表示にする
            this.CancelTranslationButton.Top     = this.TranslationButton.Top;
            this.CancelTranslationButton.Left    = this.TranslationButton.Left;
            this.CancelTranslationButton.Width   = this.TranslationButton.Width;
            this.CancelTranslationButton.Height  = this.TranslationButton.Height;
            this.CancelTranslationButton.Visible = false;

            this.LogMessageListBox.Items.Clear();

            //プログレスバー初期設定
            this.TranslationProgressBar.Value   = 0;
            this.TranslationProgressBar.Minimum = 0;
            this.TranslationProgressBar.Maximum = 100;



            //処理後にフォルダを開く
            this.IsAfterOpenFolderCheckBox.Checked = this.SettingsParameters.IsAfterOpenFolder;

            //初期値(前回の値)を設定
            //保存フォルダ名
            this.SaveFolderNameTextBox.Text = this.ConfirmationSaveFolderName(this.SettingsParameters.SaveFolderName);

            //コンボボックスへセットする
            foreach (string path in this.SettingsParameters.GameDataPathList)
            {
                if (!path.Equals(""))
                {
                    this.TargetFolderComboBox.Items.Add(path);
                }
            }
            if (this.TargetFolderComboBox.Items.Count > this.SettingsParameters.LastSelectedGameDataPathIndex &&
                this.SettingsParameters.LastSelectedGameDataPathIndex >= 0)
            {
                this.TargetFolderComboBox.SelectedIndex = this.SettingsParameters.LastSelectedGameDataPathIndex;
            }
            else if (this.TargetFolderComboBox.Items.Count > 0)
            {
                this.TargetFolderComboBox.SelectedIndex = 1;
            }
            else
            {
                this.TargetFolderComboBox.SelectedIndex = -1;
            }

            //ログファイル保存
            this.IsSaveLogFileCheckBox.Checked = this.SettingsParameters.IsSaveLogFile;

            //ボタン類のコントロール有効/無効切り替え
            this.ChangeEnabledControl(true);

            //閉じるボタンを選択
            this.CloseButton.Select();
        }
Beispiel #2
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public SettingsForm(SettingsParameters settingsParameters)
        {
            InitializeComponent();

            this.SettingsParameters = settingsParameters;
        }