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;
            }
        }
Exemplo n.º 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.CurrentMeters = ((BMC.Presentation.POS.Views.CCurrentMeters)(target));

            #line 2 "..\..\..\Views\CCurrentMeters.xaml"
                this.CurrentMeters.Loaded += new System.Windows.RoutedEventHandler(this.MeterLife_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.lblStartDate = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.lblReadDate = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.lstView = ((Microsoft.Windows.Controls.DataGrid)(target));

            #line 36 "..\..\..\Views\CCurrentMeters.xaml"
                this.lstView.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.lstView_Loaded);

            #line default
            #line hidden
                return;

            case 6:
                this.pbMeters = ((System.Windows.Controls.ProgressBar)(target));
                return;

            case 7:
                this.btnRefresh = ((System.Windows.Controls.Button)(target));

            #line 47 "..\..\..\Views\CCurrentMeters.xaml"
                this.btnRefresh.Click += new System.Windows.RoutedEventHandler(this.btnRefresh_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.btnPrint = ((System.Windows.Controls.Button)(target));

            #line 48 "..\..\..\Views\CCurrentMeters.xaml"
                this.btnPrint.Click += new System.Windows.RoutedEventHandler(this.btnPrint_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.CurrentMeters = ((BMC.Presentation.POS.Views.CCurrentMeters)(target));
     
     #line 2 "..\..\..\Views\CCurrentMeters.xaml"
     this.CurrentMeters.Loaded += new System.Windows.RoutedEventHandler(this.MeterLife_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.grid1 = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.lblStartDate = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.lblReadDate = ((System.Windows.Controls.Label)(target));
     return;
     case 5:
     this.lstView = ((Microsoft.Windows.Controls.DataGrid)(target));
     
     #line 36 "..\..\..\Views\CCurrentMeters.xaml"
     this.lstView.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.lstView_Loaded);
     
     #line default
     #line hidden
     return;
     case 6:
     this.pbMeters = ((System.Windows.Controls.ProgressBar)(target));
     return;
     case 7:
     this.btnRefresh = ((System.Windows.Controls.Button)(target));
     
     #line 47 "..\..\..\Views\CCurrentMeters.xaml"
     this.btnRefresh.Click += new System.Windows.RoutedEventHandler(this.btnRefresh_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.btnPrint = ((System.Windows.Controls.Button)(target));
     
     #line 48 "..\..\..\Views\CCurrentMeters.xaml"
     this.btnPrint.Click += new System.Windows.RoutedEventHandler(this.btnPrint_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }