Ejemplo n.º 1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            _modified = true;
            ServerUnit s = new ServerUnit();

            s.CounterType = (Environment.OSVersion.Platform == PlatformID.Unix
                ? CounterType.BuiltIn
                : CounterType.System);
            _serverUnits.Add(s.UID, s);
            listServers.Items.Add(new ListViewItem(new[] { s.Name, s.UID }));
        }
Ejemplo n.º 2
0
 private void LoadUnit(ServerUnit unit)
 {
     txtName.Text = unit.Name;
     txtPort.Text = unit.Port.ToString();
     if (unit.V6Port < 1)
     {
         chkV6.Checked = false;
     }
     else
     {
         chkV6.Checked  = true;
         txtV6Port.Text = unit.V6Port.ToString();
     }
     txtDir.Text          = unit.RootDir;
     chkV6.Checked        = unit.V6Port > 0;
     txtV6Port.Text       = unit.V6Port.ToString();
     txtCer.Text          = unit.CertificatePath;
     _welcome             = unit.Welcome;
     _logIn               = unit.LogInWelcome;
     _logOut              = unit.LogOutWelcome;
     chkAnonymous.Checked = unit.AllowAnonymous;
     chkTLS.Checked       = unit.UseTls;
     SetCounterType(unit.CounterType);
 }