private static void SplashForm() { DummyForm1 dummy = new DummyForm1(); SplashScreen splash = new SplashScreen() { Owner = dummy }; splash.ShowDialog(); splash.Dispose(); dummy.Dispose(); }
public Snap() { /// Setup default keybinds. RegistryKey key_snap = Registry.CurrentUser.CreateSubKey(@"Software\xcap"); if (key_snap.GetValue("SNAP") == null) key_snap.SetValue("SNAP", "+--~"); if (key_snap.GetValue("FULL") == null) key_snap.SetValue("FULL", "+-+~"); if (key_snap.GetValue("URI") == null) key_snap.SetValue("URI", Settings.ServerUrl.ToString()); if (key_snap.GetValue("OWN_SERV") == null) key_snap.SetValue("OWN_SERV", Settings.UseOwnServer); form = new DummyForm(); form1 = new DummyForm1(); Settings.RefreshKeyBinds(); GenerateIconList(); icon = new NotifyIcon(); icon.Text = "xcap"; icon.Icon = form.Icon; icon.Visible = true; icon.ContextMenu = new ContextMenu(); MenuItem options = new MenuItem("Options"); options.Click += (sender, e) => { new Options().Show(); }; icon.ContextMenu.MenuItems.Add(options); icon.ContextMenu.MenuItems.Add("Exit", (sender, e) => { Application.Exit(); }); icon.DoubleClick += (sender, e) => { Take(); }; Application.Run(); form.Dispose(); form1.Dispose(); Settings.ghk_Snap.Unregister(); Settings.ghk_Full.Unregister(); icon.Visible = false; icon.Dispose(); }
public Snap() { /// Setup default keybinds. RegistryKey key_snap = Registry.CurrentUser.CreateSubKey(@"Software\xcap"); if (key_snap.GetValue("SNAP") == null) { key_snap.SetValue("SNAP", "+--~"); } if (key_snap.GetValue("FULL") == null) { key_snap.SetValue("FULL", "+-+~"); } if (key_snap.GetValue("URI") == null) { key_snap.SetValue("URI", Settings.ServerUrl.ToString()); } if (key_snap.GetValue("OWN_SERV") == null) { key_snap.SetValue("OWN_SERV", Settings.UseOwnServer); } form = new DummyForm(); form1 = new DummyForm1(); Settings.RefreshKeyBinds(); GenerateIconList(); icon = new NotifyIcon(); icon.Text = "xcap"; icon.Icon = form.Icon; icon.Visible = true; icon.ContextMenu = new ContextMenu(); MenuItem options = new MenuItem("Options"); options.Click += (sender, e) => { new Options().Show(); }; icon.ContextMenu.MenuItems.Add(options); icon.ContextMenu.MenuItems.Add("Exit", (sender, e) => { Application.Exit(); }); icon.DoubleClick += (sender, e) => { Take(); }; Application.Run(); form.Dispose(); form1.Dispose(); Settings.ghk_Snap.Unregister(); Settings.ghk_Full.Unregister(); icon.Visible = false; icon.Dispose(); }