示例#1
0
 /// <summary>
 /// 項目の編集を実行する
 /// </summary>
 private void EditRegexItem()
 {
     //
     using var regexInputForm = new RegexInputForm(GetButtonIndex());
     //
     if (regexInputForm.ShowDialog() == DialogResult.OK)
     {
         var items = _viewBox.Items;
         items[_viewBox.SelectedIndex] = regexInputForm.SelectedItem;
     }
     regexInputForm.Dispose();
     //
     _viewBox.Refresh();
 }
示例#2
0
 /// <summary>
 /// アイテムの新規作成を実行する
 /// </summary>
 private void EditRegexItem()
 {
     //
     using var regexInputForm = new RegexInputForm(RegexCategory.NewProject);
     //
     if (regexInputForm.ShowDialog() == DialogResult.OK)
     {
         var items = _regexBox.Items;
         items[_regexBox.SelectedIndex] = regexInputForm.SelectedItem;
     }
     regexInputForm.Dispose();
     //
     _regexBox.Refresh();
 }
示例#3
0
        /// <summary>
        /// 項目の追加を実行する
        /// </summary>
        private void AddNewRegexItem()
        {
            var regexInputForm = new RegexInputForm(GetButtonIndex());

            //
            if (regexInputForm.ShowDialog() == DialogResult.OK)
            {
                _viewBox.Items.Add(regexInputForm.SelectedItem);
                //ログ
                RenameLogger.WriteLog(LogMessageKind.Operation, new List <(LogMessageCategory category, string message)>
                {
                    (LogMessageCategory.SourceForm, Text),
                    (LogMessageCategory.Message, "新しい検索規則が追加されました。"),
                    (LogMessageCategory.SourcePath, "新規"),
                    (LogMessageCategory.DestinationPath, regexInputForm.SelectedItem)
                });
                regexInputForm.Dispose();
            }
        }
示例#4
0
 /// <summary>
 /// アイテムの新規作成を実行する
 /// </summary>
 private void AddNewRegex()
 {
     using var regexInputForm = new RegexInputForm(RegexCategory.NewProject);
     //
     if (regexInputForm.ShowDialog() == DialogResult.OK)
     {
         _regexBox.Items.Add(regexInputForm.SelectedItem);
         //ログ
         RenameLogger.WriteLog(LogMessageKind.ActionComplete
                               , new List <(LogMessageCategory category, string message)>
         {
             (LogMessageCategory.SourceForm, "Text"),
             (LogMessageCategory.Message, "新しい入力規則が追加されました。"),
             (LogMessageCategory.NewData, regexInputForm.SelectedItem)
         });
     }
     //
     regexInputForm.Dispose();
 }