Exemplo n.º 1
0
        private void createGroupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool  valid;
            Int64?ID = GroupFolders.GetSelectedGroupID(treeAction.SelectedNode, out valid);

            if (valid == false)
            {
                return;
            }
            frmCreateGroup frm = new frmCreateGroup(ID, ID == null ? "(Root)" : treeAction.SelectedNode.Text, false);

            if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                GroupFolders.UpdateTreeNode(treeAction.SelectedNode, true);
            }
        }
Exemplo n.º 2
0
        private void renameGroupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool  valid;
            Int64?ID = GroupFolders.GetSelectedGroupID(treeAction.SelectedNode, out valid);

            if (valid == false)
            {
                return;
            }
            if (ID == null)
            {
                MessageBox.Show(this, "Cannot rename the Root Group: " + Program.net.GetLastError(), Program.Title, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            frmCreateGroup frm = new frmCreateGroup(ID, ID == null ? "(Root)" : treeAction.SelectedNode.Text, true);

            if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                treeAction.SelectedNode.Text = frm.NewName.Trim();
            }
        }