Ejemplo n.º 1
0
        public static void EnableServer(Server server)
        {
            if(server.Enabled)
                return;

            server.Enabled = true;
            server.StatusItem.BackColor = System.Drawing.Color.White;

            if(Global.m_Connected && !server.Connected)
                server.Connect();
        }
Ejemplo n.º 2
0
        public static void DisableServer(Server server)
        {
            if(!server.Enabled)
                return;

            if(server.Connected)
                server.Disconnect();

            server.Enabled = false;
            server.StatusItem.BackColor = System.Drawing.Color.Gray;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds a server to the group
 /// </summary>
 public Server AddServer( Server server)
 {
     server.ServerGroup = this;
     server.OnFailedSegment += OnFailedSegmentHandler;
     m_Servers.Add(server);
     return server;
 }
Ejemplo n.º 4
0
 public Server RemoveServer(Server server)
 {
     if(m_Servers.Contains(server) && server != null)
     {
         server.Disconnect();
         server.StatusItem.Remove();
         server.OnFailedSegment -= OnFailedSegmentHandler;
         server.ServerGroup = null;
         m_Servers.Remove(server);
     }
     return server;
 }
Ejemplo n.º 5
0
        public void SetServer(Server server)
        {
            this.Number_Group.Minimum = 1;
            this.Number_Group.Maximum = server.ServerGroup.ServerManager.m_ServerGroups.Count + 1;

            Number_Group.Value = server.ServerGroup.ServerManager.m_ServerGroups.IndexOf(server.ServerGroup) + 1;
            Box_Address.Text = server.Hostname;
            Number_Port.Value = server.Port;
            Number_Connections.Value = server.NoConnections;
            Check_Login.Checked = server.RequiresLogin;
            if(server.RequiresLogin)
            {
                Text_Login.Text = server.Username;
                Text_Password.Text = server.Password;
            }
            cbNeedsGroup.Checked = server.NeedsGroup;
            LastSetServer = server;
        }