Exemple #1
0
        /// <summary>
        /// Handler for Logging Out event before closing the agent window.
        /// </summary>
        /// <param name="sender">Object raising event.</param>
        /// <param name="e">Event Arguments.</param>
        private void AgentLoggedOutBeforeClosing(object sender, AgentStatusChangeEventArgs e)
        {
            // Close agent
            this.CloseAgentWithKeyboardShortcut();

            // Unhook event handler
            this.AgentLoggedOut -= AgentLoggedOutBeforeClosing;
        }
Exemple #2
0
 private void SwitchFromNotReadyToReadyAfterLoggingIn(object sender, AgentStatusChangeEventArgs e)
 {
     // Wait for 2 seconds
     Thread.Sleep(2000);
     // Switch to Ready
     this.SwitchToReady();
     // Unhook handler
     this.AgentNotReady -= SwitchFromNotReadyToReadyAfterLoggingIn;
 }
Exemple #3
0
        /// <summary>
        /// Handler for agent's startup event. This occurs after this application launches the Cisco agent and waits until the login dialog shows up.
        /// </summary>
        /// <param name="sender">Object raising event.</param>
        /// <param name="e">Event arguments.</param>
        private void AgentStartupEventHandler(object sender, AgentStatusChangeEventArgs e)
        {
            // This event handler will find the Login Dialog and type in password to log in.
            // Type in password to log in
            this.TypeInPasswordToLogIn(Settings.Default.CiscoPassword);

            // Unhook the event handler
            this.AgentLoggedOut -= AgentStartupEventHandler;
        }
Exemple #4
0
 /// <summary>
 /// Handler for the AgentMonitor's AgentStatusChange event.
 /// </summary>
 /// <param name="sender">Object raising event.</param>
 /// <param name="e">Event Arguments.</param>
 private void AgentMonitor_AgentStatusChange(object sender, AgentStatusChangeEventArgs e)
 {
     this.Records.Add(e);
 }