Пример #1
0
 private void btnRunSetup_Click(object sender, EventArgs e)
 {
     if (QDLib.RunQDriveSetup())
     {
         this.Close();
     }
 }
Пример #2
0
        private void QDrive_Load(object sender, EventArgs e)
        {
            // Check if the setup has been completed yet
            if (!QDLib.IsQDConfigured())
            {
                QDLib.RunQDriveSetup();
                this.Close();
            }

            // Load QD-Data
            LoadQDData();

            // If always-prompt-password is set
            if (promptPassword)
            {
                QDriveManager.QDriveManager managerLogin = new QDriveManager.QDriveManager()
                {
                    AutostartLogin = true
                };

                if (managerLogin.ShowDialog() != DialogResult.OK)
                {
                    this.Close();
                }

                Username = managerLogin.uUsername;
                Password = managerLogin.uPassword;
                UserID   = managerLogin.userID;
            }

            driveList = QDLib.CreateDriveList(localConnection, UserID, Password, dbData);

            if (localConnection)
            {
                pbxQDriveSplash.Image = Properties.Resources.QDSplashLocal;
                QDLib.ConnectQDDrives("", "", dbData, logUserActions, true, driveList);
            }
            else
            {
                pbxQDriveSplash.Image = Properties.Resources.QDSplashOnline;
                QDLib.ConnectQDDrives(UserID, Password, dbData, logUserActions, true, driveList);

                if (!localConnection)
                {
                    QDLib.LogUserConnection(UserID, QDLogAction.QDSystemAutostartFinished, dbData, logUserActions);
                }
            }
        }