Beispiel #1
0
 public ServerWindow()
 {
     InitializeComponent();
     Closing                 += ServerWindow_Closing;
     isConfigured             = false;
     isConnected              = false;
     isServerActive           = false;
     passwordChanged          = false;
     notifyServer             = new System.Windows.Forms.NotifyIcon();
     notifyServer.MouseClick += new System.Windows.Forms.MouseEventHandler(notifyServer_mouseClickEvent);
     notifyServer.MouseMove  += new System.Windows.Forms.MouseEventHandler(notifyServer_MouseMove);
     path = Directory.GetCurrentDirectory().Remove(Directory.GetCurrentDirectory().Length - 9);
     notifyServer.Icon            = new System.Drawing.Icon(path + "\\Punto_rosso.ico");
     status                       = new StatusWindow(this);
     this.WindowState             = WindowState.Normal;
     this.ShowInTaskbar           = true; //cosi non compare l'icona
     notifyServer.Visible         = true;
     notifyServer.BalloonTipTitle = "Server AVVIATO";
     notifyServer.BalloonTipText  = "Caricate le impostazioni di default\nPremi START per mettere il server in attesa di connessioni";
     notifyServer.ShowBalloonTip(300);
     connectionParameter = new ConnectionParameter();
     dispatcherTimer     = new System.Windows.Threading.DispatcherTimer();
     //questo metodo mi serve per inserire tutti gli indirizzi presente sulla macchina server
     caricaInfoIndirizzoServer();
     caricaInfoTextBox();
     stopButton.IsEnabled = false;
     stateLabel.Content   = NON_CONNESSO;
     contHour             = 0;
     contMin = 0;
     contSec = 0;
 }
 public ServerWindow()
 {
     InitializeComponent();
     Closing += ServerWindow_Closing;
     isConfigured = false;
     isConnected = false;
     isServerActive = false;
     passwordChanged = false;
     notifyServer = new System.Windows.Forms.NotifyIcon();
     notifyServer.MouseClick += new System.Windows.Forms.MouseEventHandler(notifyServer_mouseClickEvent);
     notifyServer.MouseMove += new System.Windows.Forms.MouseEventHandler(notifyServer_MouseMove);
     path = Directory.GetCurrentDirectory().Remove(Directory.GetCurrentDirectory().Length - 9);
     notifyServer.Icon = new System.Drawing.Icon(path + "\\Punto_rosso.ico");
     status = new StatusWindow(this);
     this.WindowState = WindowState.Normal;
     this.ShowInTaskbar = true; //cosi non compare l'icona
     notifyServer.Visible = true;
     notifyServer.BalloonTipTitle = "Server AVVIATO";
     notifyServer.BalloonTipText = "Caricate le impostazioni di default\nPremi START per mettere il server in attesa di connessioni";
     notifyServer.ShowBalloonTip(300);
     connectionParameter = new ConnectionParameter();
     dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
     //questo metodo mi serve per inserire tutti gli indirizzi presente sulla macchina server
     caricaInfoIndirizzoServer();
     caricaInfoTextBox();
     stopButton.IsEnabled = false;
     stateLabel.Content = NON_CONNESSO;
     contHour = 0;
     contMin = 0;
     contSec = 0;
 }