Ejemplo n.º 1
0
 private void connectButton_Click(object sender, EventArgs e)
 {
     if (!connected)
     {
         EncServerPass = Utils.EncryptPassword(serverPassTextBox.Text);
         ServerUser    = serverUserTextBox.Text;
         ServerIP      = serverIPtextBox.Text;
         Collection <Command> cmd          = ExchangeUtils.GetMailboxes();
         PSBGWorker           exportWorker = new PSBGWorker(ServerUser, Utils.DecryptPassword(EncServerPass), ServerIP, cmd, 0);
         exportWorker.Completed += ReceiveMBOXCompleted;
         exportWorker.InitTask();
         connectButton.Enabled     = false;
         connectButton.Text        = "Conectando";
         serverIPtextBox.Enabled   = false;
         serverUserTextBox.Enabled = false;
         serverPassTextBox.Enabled = false;
         saveServerConfig.Enabled  = false;
     }
     else
     {
         connected             = false;
         requestUpdate.Enabled = false;
         contentManager.TabPages.Remove(backupConfig);
         connectButton.Text        = "Conectar e Baixar Lista de Usuários";
         serverIPtextBox.Enabled   = true;
         serverUserTextBox.Enabled = true;
         serverPassTextBox.Enabled = true;
         saveServerConfig.Enabled  = true;
     }
 }
Ejemplo n.º 2
0
        private void cleanFailedRequests_Click(object sender, EventArgs e)
        {
            Collection <Command> cmd          = ExchangeUtils.CleanFailedRequests();
            PSBGWorker           exportWorker = new PSBGWorker(ServerUser, Utils.DecryptPassword(EncServerPass), ServerIP, cmd, 0);

            exportWorker.Completed += CleanCurrentRequestsCallback;
            exportWorker.InitTask();
            cleanCurrentRequests.Enabled = false;
        }
Ejemplo n.º 3
0
        private void requestUpdate_Tick(object sender, EventArgs e)
        {
            String     cmd          = "Get-MailboxExportRequest | Get-MailboxExportRequestStatistics";
            PSBGWorker exportWorker = new PSBGWorker(ServerUser, Utils.DecryptPassword(EncServerPass), ServerIP, cmd);

            exportWorker.Completed += ProcessRequestsOutput;
            exportWorker.InitTask();
            requestUpdate.Stop();
        }