void FormImageFiles_FormClosing(object sender, FormClosingEventArgs e) { try { Singleton = null; } catch (Exception ex) { Utility.ReportException(ex); } }
public static void OpenImageFile(string path, string variable) { try { if (Singleton == null) { Singleton = new FormImageFiles(); Gui.Docking.ShowDockContent(Singleton, Gui.Docking.DockFiles); } Singleton.AddImageFile(path); } catch (Exception ex) { Utility.ReportException(ex); } }
public static void OpenImageFile(string path, string variable) { try { if (Singleton == null) { Singleton = new FormImageFiles(); Gui.Docking.ShowDockContent(Singleton, Gui.Docking.DockFiles, ContentCategory.Others); } Singleton.timerShowLastDroppedFile.Start(); Singleton.BringToFront(); Singleton.AddImageFile(path); } catch (Exception ex) { Utility.ReportException(ex); } }
void FormImageFiles_FormClosing(object sender, FormClosingEventArgs e) { try { foreach (ListViewItem item in listViewImages.Items) { PathVariable tag = (PathVariable)item.Tag; if (Gui.Scripting.Variables[tag.Variable] == Gui.ImageControl.Image) { Gui.ImageControl.Image = null; break; } } Singleton = null; } catch (Exception ex) { Utility.ReportException(ex); } }