/// <summary>
        /// Called just prior to displaying the list of commands to a user on a set of sessions.
        /// </summary>
        /// <param name="controller">The User Interface Controller for the current process</param><param name="sessionSummaries">Summaries of the selected sessions.</param>
        /// <remarks>
        /// <para>
        /// Use this method to change what commands are available or what their labels should be prior to being displayed.
        /// </para>
        /// <para>
        /// The controller should not be persisted or accessed between calls, it may change and
        ///             the same object may get calls from multiple controllers.
        /// </para>
        /// </remarks>
        public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList <ISessionSummary> sessionSummaries)
        {
            controller.UpdateCommand("export", "Save Session as Text", "Exports the session as a text file in all of its detail", true);

            //now we only want to enable our custom open command if there's exactly one session enabled.
            controller.UpdateCommand("openSession", sessionSummaries.Count == 1);

            controller.UpdateCommand("invisible", false);
        }
 /// <summary>
 /// Called just prior to displaying the list of commands to a user.
 /// </summary>
 /// <param name="controller">The User Interface Controller for the current process</param>
 /// <remarks>
 /// <para>
 /// Use this method to change what commands are available or what their labels should be prior to being displayed.
 /// </para>
 /// <para>
 /// The controller should not be persisted or accessed between calls, it may change and
 ///             the same object may get calls from multiple controllers.
 /// </para>
 /// </remarks>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller)
 {
     //make sure we have a server to connect to...
     if (string.IsNullOrEmpty(m_Controller.CommonConfiguration.Url))
     {
         controller.UpdateCommand(OpenSiteCommand, false);
     }
     else
     {
         controller.UpdateCommand(OpenSiteCommand, true);
     }
 }
 /// <summary>
 /// Called just prior to displaying the list of commands to a user.
 /// </summary>
 /// <param name="controller">The User Interface Controller for the current process</param>
 /// <remarks>
 /// <para>
 /// Use this method to change what commands are available or what their labels should be prior to being displayed.
 /// </para>
 /// <para>
 /// The controller should not be persisted or accessed between calls, it may change and 
 ///             the same object may get calls from multiple controllers.
 /// </para>
 /// </remarks>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller)
 {
     //make sure we have a server to connect to...
     if (string.IsNullOrEmpty(m_Controller.CommonConfiguration.Url))
     {
         controller.UpdateCommand(OpenSiteCommand, false);
     }
     else
     {
         controller.UpdateCommand(OpenSiteCommand, true);               
     }
 }
 /// <summary>
 /// Called just prior to displaying the list of commands to a user on a set of messages.
 /// </summary>
 /// <param name="controller"/><param name="messages">The selected messages.</param>
 /// <remarks>
 /// <para>
 /// Use this method to change what commands are available or what their labels should be prior to being displayed.
 /// </para>
 /// <para>
 /// If exactly one session is currently selected it will be provided so you can customize commands and labels.
 /// For performance reasons, if multiple sessions are selected they aren't provided (since some operations could 
 /// conceivably affect hundreds or thousands of sessions)
 /// </para>
 /// </remarks>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList<ILogMessage> messages)
 {
     string toolTip = (messages.Count > 1)
         ? "Use these messages to create a new defect"
         : "Use this message to create a new defect";
     controller.UpdateCommand(AddDefectCommandName, "Create New Defect...", toolTip, true);
 }
Beispiel #5
0
        /// <summary>
        /// Called just prior to displaying the list of commands to a user on a set of messages.
        /// </summary>
        /// <param name="controller"/><param name="messages">The selected messages.</param>
        /// <remarks>
        /// <para>
        /// Use this method to change what commands are available or what their labels should be prior to being displayed.
        /// </para>
        /// <para>
        /// If exactly one session is currently selected it will be provided so you can customize commands and labels.
        /// For performance reasons, if multiple sessions are selected they aren't provided (since some operations could
        /// conceivably affect hundreds or thousands of sessions)
        /// </para>
        /// </remarks>
        public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList <ILogMessage> messages)
        {
            string toolTip = (messages.Count > 1)
                ? "Use these messages to create a new defect"
                : "Use this message to create a new defect";

            controller.UpdateCommand(AddDefectCommandName, "Create New Defect...", toolTip, true);
        }
 /// <summary>
 /// Update command availability and text just prior to displaying a list of commands to the user.
 /// </summary>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList<ISessionSummary> sessionSummaries)
 {
     controller.UpdateCommand("scan", sessionSummaries.Count == 1 ? "Scan session for users" : "Scan sessions for users",
         "Scan for users associated with each session", true);
 }
 /// <summary>
 /// Called just prior to displaying the list of commands to a user on a set of sessions.
 /// </summary>
 /// <param name="controller">The User Interface Controller for the current process</param><param name="sessionSummaries">Summaries of the selected sessions.</param>
 /// <remarks>
 /// <para>
 /// Use this method to change what commands are available or what their labels should be prior to being displayed.
 /// </para>
 /// <para>
 /// The controller should not be persisted or accessed between calls, it may change and
 ///             the same object may get calls from multiple controllers.
 /// </para>
 /// </remarks>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList <ISessionSummary> sessionSummaries)
 {
     controller.UpdateCommand("scan", "Analyze Session", "Reports errors to FogBugz", true);
 }
 /// <summary>
 /// Called just prior to displaying the list of commands to a user on a set of sessions.
 /// </summary>
 /// <param name="controller">The User Interface Controller for the current process</param><param name="sessionSummaries">Summaries of the selected sessions.</param>
 /// <remarks>
 /// <para>
 /// Use this method to change what commands are available or what their labels should be prior to being displayed.
 /// </para>
 /// <para>
 /// The controller should not be persisted or accessed between calls, it may change and 
 ///             the same object may get calls from multiple controllers.
 /// </para>
 /// </remarks>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList<ISessionSummary> sessionSummaries)
 {
     controller.UpdateCommand("scan", "Analyze Session", "Reports errors to FogBugz", true);
 }
Beispiel #9
0
 /// <summary>
 /// Called just prior to displaying the list of commands to a user.
 /// </summary>
 /// <param name="controller">The User Interface Controller for the current process</param>
 /// <remarks>
 /// <para>
 /// Use this method to change what commands are available or what their labels should be prior to being displayed.
 /// </para>
 /// <para>
 /// The controller should not be persisted or accessed between calls, it may change and
 ///             the same object may get calls from multiple controllers.
 /// </para>
 /// </remarks>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller)
 {
     //suppress everything in the middle group
     controller.UpdateCommand("sample6", false);
     controller.UpdateCommand("sample7", false);
 }
 /// <summary>
 /// Called just prior to displaying the list of commands to a user.
 /// </summary>
 /// <param name="controller">The User Interface Controller for the current process</param>
 /// <remarks>
 /// <para>
 /// Use this method to change what commands are available or what their labels should be prior to being displayed.
 /// </para>
 /// <para>
 /// The controller should not be persisted or accessed between calls, it may change and 
 ///             the same object may get calls from multiple controllers.
 /// </para>
 /// </remarks>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller)
 {
     //suppress everything in the middle group
     controller.UpdateCommand("sample6", false);
     controller.UpdateCommand("sample7", false);
 }
Beispiel #11
0
 /// <summary>
 /// Update command availability and text just prior to displaying a list of commands to the user.
 /// </summary>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList <ISessionSummary> sessionSummaries)
 {
     controller.UpdateCommand("scan", sessionSummaries.Count == 1 ? "Scan session for users" : "Scan sessions for users",
                              "Scan for users associated with each session", true);
 }
 /// <summary>
 /// Update command availability and text just prior to displaying a list of commands to the user.
 /// </summary>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList<ISessionSummary> sessionSummaries)
 {
     controller.UpdateCommand("export", sessionSummaries.Count == 1 ? "Export Session" : "Export Sessions",
         "Export session data to text files in configured export folder", true);
     controller.UpdateCommand("edit", sessionSummaries.Count == 1);
 }
 /// <summary>
 /// Update command availability and text just prior to displaying a list of commands to the user.
 /// </summary>
 public void BeforeCommandsDisplay(IUserInterfaceContext controller, IList <ISessionSummary> sessionSummaries)
 {
     controller.UpdateCommand("export", sessionSummaries.Count == 1 ? "Export Session" : "Export Sessions",
                              "Export session data to text files in configured export folder", true);
     controller.UpdateCommand("edit", sessionSummaries.Count == 1);
 }