コード例 #1
0
ファイル: EditActions.cs プロジェクト: Auer111/RegexFR
        private void CREATE_button_save_Click(object sender, EventArgs e)
        {
            DataManager.actionData mad = new DataManager.actionData();

            mad.actionName         = CREATE_textbox_name.Text;
            mad.actionType         = CREATE_dropdown_type.SelectedItem.ToString();
            mad.scopeLimitingREGEX = CREATE_dropdown_scope.SelectedItem.ToString();
            mad.fileName           = CREATE_dropdown_file.SelectedItem.ToString();
            mad.actionDescription  = CREATE_textbox_description.Text;

            currentFormattingAction = new FormattingAction(mad);

            Auer_Find_Replace.allFormattingActions.Add(currentFormattingAction);
            DataManager.SerializeActions();
            ResetForm();
        }
コード例 #2
0
ファイル: EditActions.cs プロジェクト: Auer111/RegexFR
        private void UIInsertActionData()
        {
            DataManager.actionData mad = currentFormattingAction.myActionData;

            READ_labelval_name.Text  = mad.actionName;
            READ_labelval_type.Text  = mad.actionType;
            READ_labelval_file.Text  = mad.fileName;
            READ_labelval_scope.Text = mad.scopeLimitingREGEX;
            READ_labelval_desc.Text  = mad.actionDescription;

            EDIT_textbox_name.Text           = mad.actionName;
            EDIT_type_dropdown.SelectedItem  = mad.actionType;
            EDIT_scope_dropdown.SelectedItem = mad.scopeLimitingREGEX;
            EDIT_file_dropdown.SelectedItem  = mad.fileName;
            EDIT_textbox_description.Lines   = Regex.Split(mad.actionDescription, "\r\n|\r|\n");

            DELETE_label_name.Text = mad.actionName;
            DELETE_label_desc.Text = mad.actionDescription;
        }
コード例 #3
0
        public Logger(DataManager.actionData actionData)
        {
            myActionData = actionData;
            allchangelog = new List <List <string> >()
            {
                new List <string>()
                {
                    myActionData.actionName + " ==== " + myActionData.actionType
                }
            };
            filechangelog = new List <string>();

            switch (actionData.actionType)
            {
            case "Find": _myLogType = LogType.Find; return;

            case "Nested Replace": _myLogType = LogType.Replace; return;

            case "Delete Scope": _myLogType = LogType.Delete; return;
            }
            descriptor = Descriptor();
        }
コード例 #4
0
 //Start - save json data to this action
 public FormattingAction(DataManager.actionData jsa)
 {
     myActionData = jsa;
 }