private void newFolderToolStripMenuItem_Click(object sender, EventArgs e) { ListView lv = currentListView; ListViewTag lvt = (ListViewTag)lv.Tag; PopupTextEntry popup = new PopupTextEntry(); popup.Text = "Enter Folder Name"; popup.setTextBoxText("New Folder"); if (popup.ShowDialog() != DialogResult.OK) { return; } DockedItem folder = new DockedItem(popup.getTextBoxText()); Image di = Properties.Resources.defaultIcon; setDockedItemImage(di, folder); folder.folder = true; lvt.item.docklist.Add(folder); Save(lv); }
private void renameFolderToolStripMenuItem_Click(object sender, EventArgs e) { DockedItem item = (DockedItem)((ListViewTag)itemHoverItem.Tag).item; // Let the user enter a new (non-empty) name PopupTextEntry popup = new PopupTextEntry(); popup.Text = "Enter Item Name"; popup.ShowDialog(); if (popup.getTextBoxText() != "") { item.name = popup.getTextBoxText(); } Save(itemHoverItem.ListView); }
private void Settings() { // Temporary method that asks for certain settings on startup // These will eventually go in either the settings window or be selected at install PopupTextEntry p = new PopupTextEntry(); p.Text = "Enter Directory for Icon Storage"; p.setLabelText("Doesn't check access."); p.setTextBoxText(DocketApp.Properties.Settings.Default.iconFolder); if (p.ShowDialog() != DialogResult.Cancel) { DocketApp.Properties.Settings.Default.iconFolder = p.getTextBoxText(); } DocketApp.Properties.Settings.Default.Save(); DocketApp.Properties.Settings.Default.Reload(); }