Exemple #1
0
 private void AddTagButton_Click(object sender, EventArgs e)
 {
     if (FolderController.checkForInvalidChars(AddTagTextBox.Text) == false && AddTagTextBox.Text.Length > 0)
     {
         Boolean contains = false;
         for (int i = 0; i < tagList.Length; i++)
         {
             if (tagList[i].ToLower().Equals(AddTagTextBox.Text.ToLower()))
             {
                 MessageBox.Show("Tag list already contains the tag: " + AddTagTextBox.Text);
                 contains = true;
             }
         }
         if (contains == false)
         {
             //Add the tag to the tagList.txt file.
             File.AppendAllText(tagFilePath, AddTagTextBox.Text + "\n");
             tagList = File.ReadAllLines(tagFilePath);
             displayTags(tagList);
         }
     }
     else
     {
         MessageBox.Show("Tag is empty or contains invalid characters");
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {//Ok Button
            String newName = textBox1.Text;

            if (task == "create")
            {
                MessageBox.Show(node.FullPath + "<--path");
                FolderController.CreateNewFolder(node, newName);
            }
            else if (task == "rename")
            {
                FolderController.RenameFolder(node, newName);
            }
            this.Dispose();
            this.Close();
        }