private void OK_Click(object sender, EventArgs e)
        {
            customPasteReplace = new CustomPasteReplace(NameTB.Text, RegexTB.Text, ReplaceTB.Text);
            string path = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "/";

            CMD_Compile.SafeWriteFile(path + "/setting/custompaste.json", JsonConvert.SerializeObject(customPasteReplaces));

            DialogResult = DialogResult.OK;
        }
Exemple #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            NewItem newItem = new NewItem();

            if (newItem.ShowDialog() == DialogResult.OK)
            {
                if (File.Exists(currentFile))
                {
                    CMD_Compile.SafeWriteFile(Path.GetDirectoryName(currentFile) + "/" + newItem.FileName, "");
                }
                else
                {
                    CMD_Compile.SafeWriteFile(currentFile + "/" + newItem.FileName, "");
                }
            }
        }