/// <summary> Initialize the server, and start necessary threads. </summary> private void Init() { serverWindow = ServerWindow.getForm(this); SetInitialNetworkStatusInLog(); serverWindow.Text = "Server " + "#IP Address: " + TcpNetworking.GetIP() + " " + "#Port: " + TcpConst.SERVER_PORT + " " + "#Online since: " + GetServerUpTimeStart(); NetworkChange.NetworkAvailabilityChanged += new NetworkAvailabilityChangedEventHandler(OnNetworkAvailabilityChanged); new SMTPClientWindow(this).ShowDialog(); if (!VerifySmtpClient(smtp_client_mail)) { MessageBox.Show("SMPT client autentication failed."); System.Environment.Exit(0); } ServerStart(); serverWindow.ShowDialog(); }
/// <summary> /// Creates a singleton instance of this class. /// </summary> /// <param name="reference">Reference to the calling server-class.</param> /// <returns>Pointer to singleton instance of this class.</returns> public static ServerWindow getForm(Server s) { return(singletonInstance = new ServerWindow(s)); }