Exemplo n.º 1
0
 private static void SplashForm()
 {
     DummyForm1 dummy = new DummyForm1();
     SplashScreen splash = new SplashScreen() {
         Owner = dummy
     };
     splash.ShowDialog();
     splash.Dispose();
     dummy.Dispose();
 }
Exemplo n.º 2
0
        private static void SplashForm()
        {
            DummyForm1   dummy  = new DummyForm1();
            SplashScreen splash = new SplashScreen()
            {
                Owner = dummy
            };

            splash.ShowDialog();
            splash.Dispose();
            dummy.Dispose();
        }
Exemplo n.º 3
0
Arquivo: Snap.cs Projeto: sysr-q/xcap
        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();
        }
Exemplo n.º 4
0
        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();
        }