示例#1
0
        /// <summary>
        /// When the selected page changes, we update the buttons. Only occurs for suppression.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void rootMultiPanel_SelectionChange(object sender, EVEMon.Controls.MultiPanelSelectionChangeEventArgs args)
        {
            // When there are useless prereqs, we offer the user to remove them on a second page.
            // When there aren't any, we just have one page.

            // Guess whether we're on the final page (2/2 or 1/1)
            bool isFinal = false;

            if (rootMultiPanel.SelectedPage == uselessPrereqsSuppressionPage)
            {
                isFinal = true;
            }
            else
            {
                isFinal = (m_operation.RemovablePrerequisites.Count == 0);
            }

            // Final page ?
            if (isFinal)
            {
                nextButton.Text         = "OK";
                nextButton.DialogResult = DialogResult.OK;
                previousButton.Enabled  = true;
            }
            else
            {
                nextButton.Text         = "&Next >";
                nextButton.DialogResult = DialogResult.None;
                previousButton.Enabled  = false;
            }
        }
 /// <summary>
 /// When we switch panels, we update the "next", "previous" and "cancel" buttons.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 void multiPanel_SelectionChange(object sender, MultiPanelSelectionChangeEventArgs args)
 {
     if (args.NewPage == credentialsPage)
     {
         previousButton.Enabled = false;
         nextButton.Enabled = true;
         nextButton.Text = "&Next >";
     }
     else if (args.NewPage == waitingPage)
     {
         previousButton.Enabled = true;
         nextButton.Enabled = false;
         nextButton.Text = "&Next >";
     }
     else
     {
         nextButton.Enabled = !errorGuideLabel.Visible;
         previousButton.Enabled = true;
         nextButton.Text = (m_updateMode ? "Update" : "Import");
     }
 }