Пример #1
0
        public Form_certificates(ServerInfo _serverInfo, ConnManager _connMgr, CertManager _certMgr, Cert _masterCert, bool _connected, List <Cert> _certList)
        {
            InitializeComponent();

            serverInfo = _serverInfo;
            masterCert = _masterCert;
            certMgr    = _certMgr;
            connMgr    = _connMgr;
            connected  = _connected;
            certList   = _certList;

            driveDetector = new DriveDetector(this);
            driveDetector.DeviceArrived += new DriveDetectorEventHandler(OnDriveArrived);
            driveDetector.DeviceRemoved += new DriveDetectorEventHandler(OnDriveRemoved);

            UpdateDriveList();
            FillServerSettingsBoxes();

            if (!connected)
            {
                groupBoxAdmin.Enabled  = true;
                groupBoxPcLock.Enabled = false;
            }
            else if (masterCert.userType == "admin")
            {
                groupBoxAdmin.Enabled = true;
            }
            else
            {
                groupBoxAdmin.Enabled = false;
            }
        }
Пример #2
0
        public Form_certificates(ServerInfo _serverInfo, ConnManager _connMgr, CertManager _certMgr, Cert _masterCert, bool _connected, List<Cert> _certList)
        {
            InitializeComponent();

            serverInfo = _serverInfo;
            masterCert = _masterCert;
            certMgr = _certMgr;
            connMgr = _connMgr;
            connected = _connected;
            certList = _certList;

            driveDetector = new DriveDetector(this);
            driveDetector.DeviceArrived += new DriveDetectorEventHandler(OnDriveArrived);
            driveDetector.DeviceRemoved += new DriveDetectorEventHandler(OnDriveRemoved);

            UpdateDriveList();
            FillServerSettingsBoxes();

            if (!connected)
            {
                groupBoxAdmin.Enabled = true;
                groupBoxPcLock.Enabled = false;
            }
            else if (masterCert.userType == "admin")
            {
                groupBoxAdmin.Enabled = true;
            }
            else
            {
                groupBoxAdmin.Enabled = false;
            }
        }