void thumb_DoubleClick(object sender, EventArgs e) { string filepath = ""; if (folderMode) { try { var box = sender as PictureBox; filepath = box.Tag as string; if (parentForm != null) { // changing form, save settings first parentForm.SaveFolderSettings(); parentForm.activeFolder = filepath.Split(Path.DirectorySeparatorChar).Last(); UpdateFolderBackgroundColor(); parentForm.LoadFolder(filepath); } } catch (Exception) { } } }
private void menu_deleteClicked(object sender, EventArgs e) { try { File.Delete(filename); mainForm.LoadFolder(); } catch (Exception exception) { Rhino.UI.Dialogs.ShowMessage(exception.Message, "Exception"); } }
private void buttonOK_Click(object sender, EventArgs e) { var item = this.listBox1.SelectedItem as RevertTableItem; bool backup = false; bool diffBackup = false; if (mainForm != null) { backup = mainForm.BackupMode; diffBackup = mainForm.DiffMode; } FileUtils.RevertFromBackup(item.backupFilename, item.destFilename, backup, diffBackup); if (mainForm != null) { mainForm.LoadFolder(); } }
protected override Result RunCommand(RhinoDoc doc, RunMode mode) { if (draftTableForm != null && !draftTableForm.IsDisposed) { if (!draftTableForm.Visible) { draftTableForm.Show(); } Restore(draftTableForm); return(Result.Success); } draftTableForm = new DraftTableForm(); draftTableForm.Show(); draftTableForm.LoadFolder(""); draftTableForm.LoadDraftTableFoldersThumbnails(); return(Result.Success); }