static CiscoObjectsWindow() { //System.Windows.Forms.Application.OpenForms[0].Invoke(() => //{ This = new CiscoObjectsWindow(); ElementHost.EnableModelessKeyboardInterop(This); //}); }
internal void Delete() { Deleting(); CiscoObjectsWindow.DeleteFromTable(this); //lock (notifications) //{ // notifications.Remove(this); //} DeleteTime = DateTime.Now; CiscoObjectsWindow.EnableRestore(true); }
protected void add2collection() { lock (cisco_objects) { cisco_objects.Add(this); } CiscoObjectsWindow.AddToTable(this); Activate(); forget_old(); }
static internal void RestoreLastDeleted() { CiscoObject n; lock (cisco_objects) { n = cisco_objects.Where(x => x.Deleted).OrderByDescending(x => x.DeleteTime).FirstOrDefault(); if (n == null) { CiscoObjectsWindow.EnableRestore(false); return; } } n.DeleteTime = DateTime.MinValue; CiscoObjectsWindow.AddToTable(n); CiscoObjectsWindow.EnableRestore(cisco_objects.Where(x => x.Deleted).Count() > 0); }
public static void Main(string[] args) { try { CiscoObjectsWindow.Initialize(); Application.Run(SysTray.This); } catch (Exception e) { Message.Error(e); } finally { Exit(); } }
private void Notifications_Click(object sender, EventArgs e) { CiscoObjectsWindow.Display(); }