private void LoadScreen(PositionDetailsScreen detail, bool isRefresh) { try { #if SKIP_SAME_PAGE_LOAD if (_selectedScreen == detail) { LogManager.WriteLog("Same screen was selected again. Skipped loading.", LogManager.enumLogLevel.Info); return; } #endif if ((_selectedScreen != detail) && (detail == PositionDetailsScreen.Handpay)) { ((ICashDispenserStatusParent)this).ParentLoaded = false; } else { ((ICashDispenserStatusParent)this).ParentLoaded = true; } LogManager.WriteLog("Inside LoadScreen", LogManager.enumLogLevel.Info); this.DisposeChildren(true); this.DisposeViewHandPay(); _currentScreen = null; if (_SlotMachine.Status == SlotMachineStatus.EmptyPosition || _SlotMachine.Status == SlotMachineStatus.FloatCollection) return; switch (detail) { case PositionDetailsScreen.Handpay: //RefreshSlot(); ViewHandPayPageCaller(isRefresh); break; case PositionDetailsScreen.PlayerClub: CPositionDetailsPlayerClub PlayerClub = new CPositionDetailsPlayerClub(ucSlotMachine.InstallationNo); pnlContent.Children.Add(PlayerClub); PlayerClub.Margin = new Thickness(0); break; case PositionDetailsScreen.FieldService: CFieldService fieldService = new CFieldService(sBarPosName, lblAsset.Text.ToString(), lblGame.Text.ToString(), lblManufacturer.Text, lblSerialNo.Text); fieldService.Installation = _SlotMachine.InstallationNo; pnlContent.Children.Add(fieldService); fieldService.Margin = new Thickness(0); break; case PositionDetailsScreen.Events: CPositionDetailsEvents posDetailsEvents = new CPositionDetailsEvents(sBarPosName, _SlotMachine.InstallationNo); pnlContent.Children.Add(posDetailsEvents); posDetailsEvents.Margin = new Thickness(0); break; case PositionDetailsScreen.EnrollMachine: break; case PositionDetailsScreen.MachineMeters: CMeterLife meterLife = new CMeterLife(_SlotMachine.InstallationNo, dtInstallationStartDate); pnlContent.Children.Add(meterLife); meterLife.Margin = new Thickness(0); break; case PositionDetailsScreen.FillsCredits: break; case PositionDetailsScreen.CurrentMeters: CCurrentMeters currentMeters = new CCurrentMeters(_SlotMachine.InstallationNo, dtInstallationStartDateforCM); pnlContent.Children.Add(currentMeters); currentMeters.Margin = new Thickness(0); break; //case PositionDetailsScreen.MachineMaintenance: // CMachineMaintenanceView objMachineMaintenanceView = new CMachineMaintenanceView(sBarPosName, ucSlotMachine.InstallationNo); // objMachineMaintenanceView.Margin = new Thickness(0); // pnlContent.Children.Add(objMachineMaintenanceView); // break; default: break; } } catch (Exception ex) { ExceptionManager.Publish(ex); } finally { _selectedScreen = detail; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControl = ((BMC.Presentation.CFieldService)(target)); return; case 2: this.txtHeader = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.txtPage = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.lstFieldService = ((System.Windows.Controls.ListView)(target)); return; case 5: this.ColHeader = ((System.Windows.Controls.Image)(target)); return; case 6: this.ColHeaderEsc = ((System.Windows.Controls.Image)(target)); return; case 7: this.btnFirst = ((System.Windows.Controls.Button)(target)); #line 133 "..\..\..\Views\CFieldService.xaml" this.btnFirst.Click += new System.Windows.RoutedEventHandler(this.btnFirst_Click); #line default #line hidden return; case 8: this.btnPrev = ((System.Windows.Controls.Button)(target)); #line 134 "..\..\..\Views\CFieldService.xaml" this.btnPrev.Click += new System.Windows.RoutedEventHandler(this.btnPrev_Click); #line default #line hidden return; case 9: this.btnNext = ((System.Windows.Controls.Button)(target)); #line 135 "..\..\..\Views\CFieldService.xaml" this.btnNext.Click += new System.Windows.RoutedEventHandler(this.btnNext_Click); #line default #line hidden return; case 10: this.btnLast = ((System.Windows.Controls.Button)(target)); #line 136 "..\..\..\Views\CFieldService.xaml" this.btnLast.Click += new System.Windows.RoutedEventHandler(this.btnLast_Click); #line default #line hidden return; case 11: this.btnRequest = ((System.Windows.Controls.Button)(target)); #line 137 "..\..\..\Views\CFieldService.xaml" this.btnRequest.Click += new System.Windows.RoutedEventHandler(this.btnRequest_Click); #line default #line hidden return; case 12: this.btnClear = ((System.Windows.Controls.Button)(target)); #line 138 "..\..\..\Views\CFieldService.xaml" this.btnClear.Click += new System.Windows.RoutedEventHandler(this.btnClear_Click); #line default #line hidden return; case 13: this.btnReview = ((System.Windows.Controls.Button)(target)); #line 139 "..\..\..\Views\CFieldService.xaml" this.btnReview.Click += new System.Windows.RoutedEventHandler(this.btnReview_Click); #line default #line hidden return; case 14: this.btnEscalate = ((System.Windows.Controls.Button)(target)); #line 140 "..\..\..\Views\CFieldService.xaml" this.btnEscalate.Click += new System.Windows.RoutedEventHandler(this.btnEscalate_Click); #line default #line hidden return; } this._contentLoaded = true; }