Пример #1
0
        //http://csharp.net-informations.com/communications/csharp-chat-server-programming.htm
        /// <summary>
        /// Initializes a new instance of the <see cref="MainForm"/> class.
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            Mini = new Minimize(notifyIcon1, this, shutdown.ShutdownTimer);

            visualTimer.Tick  += visual_Tick;
            notifyIcon1.Click += notifyIcon1_Click;

            serverThread = new Thread(server.ServerLoop);
            serverThread.Start();

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;

            consumer.RunWorkerAsync();

            mainInterface1.Execute.Click += Execute_Click;
        }
Пример #2
0
        //http://csharp.net-informations.com/communications/csharp-chat-server-programming.htm
        /// <summary>
        /// Initializes a new instance of the <see cref="MainForm"/> class.
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

             Mini = new Minimize(notifyIcon1,this,shutdown.ShutdownTimer);

            visualTimer.Tick += visual_Tick;
            notifyIcon1.Click += notifyIcon1_Click;

            serverThread = new Thread(server.ServerLoop);
            serverThread.Start();

            SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;

            consumer.RunWorkerAsync();

            mainInterface1.Execute.Click += Execute_Click;
        }