/// <summary>
        /// Gets the next page.
        /// </summary>
        /// <param name="wizard">Wizard instance.</param>
        /// <returns>The next page.</returns>
        /// <remarks>
        /// This implementation uses the <see cref="WizardPage.NextPage"/> property of the <see cref="Wizard.CurrentPage"/> 
        /// as the next page. If the value of the property is <c>null</c> it uses the next page 
        /// in the <see cref="Wizard.Pages"/> collection.
        /// </remarks>
        public WizardPage GetNextPage(Wizard wizard)
        {
            var currentPage = wizard.CurrentPage;
            if (currentPage == null)
            {
                return wizard.Pages.Any() ? wizard.Pages.First() : null;
            }

            if (currentPage.NextPage != null)
            {
                return currentPage.NextPage;
            }

            return wizard.Pages.ElementAtOrDefault(wizard.Pages.IndexOf(currentPage) + 1);
        }
Example #2
0
 private static void UpdateFirstLastPage(Wizard wizard)
 {
     wizard.IsFirstPage = wizard.CurrentPage == wizard.Pages.FirstOrDefault();
     wizard.IsLastPage = wizard.CurrentPage == wizard.Pages.LastOrDefault() ||
                         (wizard.CurrentPage != null && wizard.CurrentPage.IsFinishPage);
 }
Example #3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this._grid = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.wizard = ((AvalonWizard.Wizard)(target));
     
     #line 13 "..\..\MainWindow.xaml"
     this.wizard.Cancelled += new System.Windows.RoutedEventHandler(this.Wizard_Cancelled);
     
     #line default
     #line hidden
     return;
     case 3:
     this.first = ((AvalonWizard.WizardPage)(target));
     
     #line 15 "..\..\MainWindow.xaml"
     this.first.Commit += new System.EventHandler<AvalonWizard.WizardPageConfirmEventArgs>(this.Wizard_Commit);
     
     #line default
     #line hidden
     return;
     case 4:
     this.lbSource = ((System.Windows.Controls.Label)(target));
     return;
     case 5:
     this.cmbSourceSwitcher = ((System.Windows.Controls.ComboBox)(target));
     
     #line 18 "..\..\MainWindow.xaml"
     this.cmbSourceSwitcher.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.SourceSwitch_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 6:
     this.txtSourceLocation = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.lbSourceAccount = ((System.Windows.Controls.Label)(target));
     return;
     case 8:
     this.txtSourceAccount = ((System.Windows.Controls.TextBox)(target));
     return;
     case 9:
     this.lbSourcePassword = ((System.Windows.Controls.Label)(target));
     return;
     case 10:
     this.pwdSource = ((System.Windows.Controls.PasswordBox)(target));
     return;
     case 11:
     this.imgSourceStatus = ((System.Windows.Controls.Image)(target));
     return;
     case 12:
     this.btnSourceValidateConn = ((System.Windows.Controls.Button)(target));
     
     #line 95 "..\..\MainWindow.xaml"
     this.btnSourceValidateConn.Click += new System.Windows.RoutedEventHandler(this.SourceValidateConn_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     this.chkSourceRemember = ((System.Windows.Controls.CheckBox)(target));
     
     #line 96 "..\..\MainWindow.xaml"
     this.chkSourceRemember.Click += new System.Windows.RoutedEventHandler(this.SourceRemember_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.lbSourceSummaryErrorMsg = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 15:
     this.second = ((AvalonWizard.WizardPage)(target));
     
     #line 105 "..\..\MainWindow.xaml"
     this.second.Commit += new System.EventHandler<AvalonWizard.WizardPageConfirmEventArgs>(this.Wizard_Commit);
     
     #line default
     #line hidden
     return;
     case 16:
     this.lbSourceDatabase = ((System.Windows.Controls.Label)(target));
     return;
     case 17:
     this.cmbSourceDatabases = ((System.Windows.Controls.ComboBox)(target));
     
     #line 109 "..\..\MainWindow.xaml"
     this.cmbSourceDatabases.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.SourceDatabases_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 18:
     this.lbSourceTables = ((System.Windows.Controls.Label)(target));
     return;
     case 19:
     this.lstSourceTables = ((System.Windows.Controls.ListBox)(target));
     return;
     case 20:
     this.third = ((AvalonWizard.WizardPage)(target));
     
     #line 124 "..\..\MainWindow.xaml"
     this.third.Commit += new System.EventHandler<AvalonWizard.WizardPageConfirmEventArgs>(this.Wizard_Commit);
     
     #line default
     #line hidden
     return;
     case 21:
     this.lbTargetLocation = ((System.Windows.Controls.Label)(target));
     return;
     case 22:
     this.cmbTargetSwitcher = ((System.Windows.Controls.ComboBox)(target));
     
     #line 127 "..\..\MainWindow.xaml"
     this.cmbTargetSwitcher.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.TargetSwitch_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 23:
     this.txtTargetLocation = ((System.Windows.Controls.TextBox)(target));
     return;
     case 24:
     this.lbTargetAccount = ((System.Windows.Controls.Label)(target));
     return;
     case 25:
     this.txtTargetAccount = ((System.Windows.Controls.TextBox)(target));
     return;
     case 26:
     this.lbTargetPassword = ((System.Windows.Controls.Label)(target));
     return;
     case 27:
     this.pwdTarget = ((System.Windows.Controls.PasswordBox)(target));
     return;
     case 28:
     this.imgTargetStatus = ((System.Windows.Controls.Image)(target));
     return;
     case 29:
     this.btnTargetValidateConn = ((System.Windows.Controls.Button)(target));
     
     #line 138 "..\..\MainWindow.xaml"
     this.btnTargetValidateConn.Click += new System.Windows.RoutedEventHandler(this.TargetValidateConn_Click);
     
     #line default
     #line hidden
     return;
     case 30:
     this.chkTargetRemember = ((System.Windows.Controls.CheckBox)(target));
     
     #line 139 "..\..\MainWindow.xaml"
     this.chkTargetRemember.Click += new System.Windows.RoutedEventHandler(this.TargetRemember_Click);
     
     #line default
     #line hidden
     return;
     case 31:
     this.lbTargetSummaryErrorMsg = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 32:
     this.fourth = ((AvalonWizard.WizardPage)(target));
     
     #line 147 "..\..\MainWindow.xaml"
     this.fourth.Commit += new System.EventHandler<AvalonWizard.WizardPageConfirmEventArgs>(this.Wizard_Commit);
     
     #line default
     #line hidden
     return;
     case 33:
     this.lbBackupDatabaseName = ((System.Windows.Controls.Label)(target));
     return;
     case 34:
     this.txtBackupDatabaseName = ((System.Windows.Controls.TextBox)(target));
     return;
     case 35:
     this.chkBackupDateRange = ((System.Windows.Controls.CheckBox)(target));
     
     #line 151 "..\..\MainWindow.xaml"
     this.chkBackupDateRange.Click += new System.Windows.RoutedEventHandler(this.BackupDateRange_Click);
     
     #line default
     #line hidden
     return;
     case 36:
     this.lbFrom = ((System.Windows.Controls.Label)(target));
     return;
     case 37:
     this.dpFrom = ((System.Windows.Controls.DatePicker)(target));
     return;
     case 38:
     this.lbTo = ((System.Windows.Controls.Label)(target));
     return;
     case 39:
     this.dpTo = ((System.Windows.Controls.DatePicker)(target));
     return;
     case 40:
     this.fifth = ((AvalonWizard.WizardPage)(target));
     
     #line 161 "..\..\MainWindow.xaml"
     this.fifth.Commit += new System.EventHandler<AvalonWizard.WizardPageConfirmEventArgs>(this.Wizard_Commit);
     
     #line default
     #line hidden
     return;
     case 41:
     this.pgbBackup = ((System.Windows.Controls.ProgressBar)(target));
     return;
     case 42:
     this.btnRunBackup = ((System.Windows.Controls.Button)(target));
     
     #line 165 "..\..\MainWindow.xaml"
     this.btnRunBackup.Click += new System.Windows.RoutedEventHandler(this.RunBackup_Click);
     
     #line default
     #line hidden
     return;
     case 43:
     this.lbBackupLog = ((System.Windows.Controls.Label)(target));
     return;
     }
     this._contentLoaded = true;
 }
Example #4
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 10 "..\..\..\Views\TicketsAddView.xaml"
     ((PetraERP.CRM.Views.TicketsAddView)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     
     #line 10 "..\..\..\Views\TicketsAddView.xaml"
     ((PetraERP.CRM.Views.TicketsAddView)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.CloseWindow);
     
     #line default
     #line hidden
     return;
     case 2:
     this.AddTicketWizard = ((AvalonWizard.Wizard)(target));
     
     #line 14 "..\..\..\Views\TicketsAddView.xaml"
     this.AddTicketWizard.CurrentPageChanged += new System.EventHandler<AvalonWizard.CurrentPageChangedEventArgs>(this.PageChanged);
     
     #line default
     #line hidden
     
     #line 14 "..\..\..\Views\TicketsAddView.xaml"
     this.AddTicketWizard.Cancelled += new System.Windows.RoutedEventHandler(this.AddTicketWizard_Cancelled);
     
     #line default
     #line hidden
     
     #line 14 "..\..\..\Views\TicketsAddView.xaml"
     this.AddTicketWizard.Finished += new System.Windows.RoutedEventHandler(this.create_ticket);
     
     #line default
     #line hidden
     return;
     case 3:
     this.tbSearch = ((AvalonWizard.WizardPage)(target));
     return;
     case 4:
     this.searchPanel = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 5:
     this.txtSearch = ((System.Windows.Controls.TextBox)(target));
     
     #line 26 "..\..\..\Views\TicketsAddView.xaml"
     this.txtSearch.KeyUp += new System.Windows.Input.KeyEventHandler(this.do_search);
     
     #line default
     #line hidden
     return;
     case 6:
     this.spinner = ((MahApps.Metro.Controls.ProgressRing)(target));
     return;
     case 7:
     this.optionsPanel = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 8:
     this.rdCustomerName = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 9:
     this.rdCompanyName = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 10:
     this.rdPetraID = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 11:
     this.rdSSNITNo = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 12:
     this.lblRecordsFound = ((System.Windows.Controls.Label)(target));
     return;
     case 13:
     this.dgFoundRecords = ((System.Windows.Controls.DataGrid)(target));
     
     #line 51 "..\..\..\Views\TicketsAddView.xaml"
     this.dgFoundRecords.PreviewMouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.dgFoundRecords_PreviewMouseDoubleClick);
     
     #line default
     #line hidden
     return;
     case 14:
     this.tbCustomerInfo = ((AvalonWizard.WizardPage)(target));
     return;
     case 15:
     this.txtFirstName = ((System.Windows.Controls.TextBox)(target));
     return;
     case 16:
     this.txtCustomerPetraID = ((System.Windows.Controls.TextBox)(target));
     return;
     case 17:
     this.txtSSN = ((System.Windows.Controls.TextBox)(target));
     return;
     case 18:
     this.txtEmail = ((System.Windows.Controls.TextBox)(target));
     return;
     case 19:
     this.txtContactNo = ((System.Windows.Controls.TextBox)(target));
     return;
     case 20:
     this.CustomerPreviousTickets = ((System.Windows.Controls.DataGrid)(target));
     
     #line 76 "..\..\..\Views\TicketsAddView.xaml"
     this.CustomerPreviousTickets.PreviewMouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.CustomerPreviousTickets_PreviewMouseDoubleClick);
     
     #line default
     #line hidden
     return;
     case 21:
     this.txtMiddleNames = ((System.Windows.Controls.TextBox)(target));
     return;
     case 22:
     this.txtSurname = ((System.Windows.Controls.TextBox)(target));
     return;
     case 23:
     this.cmbEmployers = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 24:
     this.tbCompanyInfo = ((AvalonWizard.WizardPage)(target));
     return;
     case 25:
     this.txtCompanyName = ((System.Windows.Controls.TextBox)(target));
     return;
     case 26:
     this.txtCompanyPetraID = ((System.Windows.Controls.TextBox)(target));
     return;
     case 27:
     this.txtCompanyRegNo = ((System.Windows.Controls.TextBox)(target));
     return;
     case 28:
     this.txtCompanyEmail = ((System.Windows.Controls.TextBox)(target));
     return;
     case 29:
     this.txtCompanyContactNo = ((System.Windows.Controls.TextBox)(target));
     return;
     case 30:
     this.CompanyPreviousTickets = ((System.Windows.Controls.DataGrid)(target));
     
     #line 113 "..\..\..\Views\TicketsAddView.xaml"
     this.CompanyPreviousTickets.PreviewMouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.CompanyPreviousTickets_PreviewMouseDoubleClick);
     
     #line default
     #line hidden
     return;
     case 31:
     this.txtCompanyContactPerson = ((System.Windows.Controls.TextBox)(target));
     return;
     case 32:
     this.txtMobileNo = ((System.Windows.Controls.TextBox)(target));
     return;
     case 33:
     this.tbTicketInfo = ((AvalonWizard.WizardPage)(target));
     
     #line 130 "..\..\..\Views\TicketsAddView.xaml"
     this.tbTicketInfo.Commit += new System.EventHandler<AvalonWizard.WizardPageConfirmEventArgs>(this.create_ticket);
     
     #line default
     #line hidden
     return;
     case 34:
     this.txtTicketID = ((System.Windows.Controls.TextBox)(target));
     return;
     case 35:
     this.rdPriorityLow = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 36:
     this.rdPriorityMedium = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 37:
     this.rdPriorityHigh = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 38:
     this.cmbTicketCorrespondence = ((System.Windows.Controls.ComboBox)(target));
     
     #line 146 "..\..\..\Views\TicketsAddView.xaml"
     this.cmbTicketCorrespondence.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cmbTicketCorrespondence_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 39:
     this.cmbTicketSubCorrespondence = ((System.Windows.Controls.ComboBox)(target));
     
     #line 147 "..\..\..\Views\TicketsAddView.xaml"
     this.cmbTicketSubCorrespondence.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cmbTicketSubCorrespondence_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 40:
     this.txtAssocaitedSLA = ((System.Windows.Controls.TextBox)(target));
     return;
     case 41:
     this.txtTicketSubject = ((System.Windows.Controls.TextBox)(target));
     return;
     case 42:
     this.cmbTicketCategory = ((System.Windows.Controls.ComboBox)(target));
     
     #line 155 "..\..\..\Views\TicketsAddView.xaml"
     this.cmbTicketCategory.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cmbTicketCategory_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 43:
     this.txtNotes = ((System.Windows.Controls.TextBox)(target));
     return;
     case 44:
     this.txtCustomerName = ((System.Windows.Controls.TextBox)(target));
     return;
     case 45:
     this.txtPetraID = ((System.Windows.Controls.TextBox)(target));
     return;
     case 46:
     this.cmbAssignTo = ((System.Windows.Controls.ComboBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
Example #5
0
 private static void UpdateFirstLastPage(Wizard wizard)
 {
     wizard.IsFirstPage = wizard.CurrentPage == wizard.Pages.FirstOrDefault();
     wizard.IsLastPage  = wizard.CurrentPage == wizard.Pages.LastOrDefault() ||
                          (wizard.CurrentPage != null && wizard.CurrentPage.IsFinishPage);
 }
Example #6
0
 public static void Create(Wizard wizard)
 {
     var delayedSetter = new DelayedSetter();
     wizard.Loaded += delayedSetter.OnWizardLoaded;
 }
Example #7
0
            public static void Create(Wizard wizard)
            {
                var delayedSetter = new DelayedSetter();

                wizard.Loaded += delayedSetter.OnWizardLoaded;
            }