Exemple #1
0
 static void Main()
 {
     FormScan formscan = null;
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     formscan = new FormScan();
     if (!formscan.ExitRequested())
     {
         Application.Run(formscan);
     }
     formscan = null;
     Application.Exit();
 }
Exemple #2
0
        static void Main()
        {
            FormScan formscan = null;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            formscan = new FormScan();
            if (!formscan.ExitRequested())
            {
                Application.Run(formscan);
            }
            formscan = null;
            Application.Exit();
        }
        static void Main()
        {
            FormScan formscan = null;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            formscan = new FormScan();


            var server = new WebSocketServer("ws://0.0.0.0:8181");

            server.Start(socket =>
            {
                clientSocket     = socket;
                socket.OnOpen    = () => formscan.Invoke(new MethodInvoker(formscan.Show));
                socket.OnClose   = () => formscan.Invoke(new MethodInvoker(formscan.Hide));
                socket.OnMessage = message => socket.Send(message);
            });
            NotifyIcon notifyIcon1 = new NotifyIcon();

            notifyIcon1.Icon            = new System.Drawing.Icon(@"scanner.ico");
            notifyIcon1.Text            = "GC Scan Module";
            notifyIcon1.Visible         = true;
            notifyIcon1.BalloonTipIcon  = ToolTipIcon.Info;
            notifyIcon1.BalloonTipText  = "Module GC Scan est lancé !";
            notifyIcon1.BalloonTipTitle = "Information";
            notifyIcon1.ShowBalloonTip(1000);

            if (!formscan.ExitRequested())
            {
                Application.Run();
            }
            formscan = null;


            Application.Exit();
        }