Пример #1
0
 public GameConsole(GameConsoleSetup settings)
 {
     try
     {
         splayer = new System.Media.SoundPlayer(PlayBoxMonitor.Properties.Resources.Ring01);
         settings.Properties.EndTime = new DateTime();
         timeControl   = new Timer();
         this.settings = settings;
         if (settings.ReportProperties.COSExR_Name == null)
         {
             settings.ReportProperties.COSExR_Name = " ";
         }
         if (settings.ReportProperties.CLINxR_Name == null)
         {
             settings.ReportProperties.CLINxR_Name = MainWindow.SetupConfiguration.CLINReportName;
         }
         InitializeComponent();
         InitializeControls();
         InitializeTimeControl();
         InitializePrePaidControl();
         InitializeCOSEReport();
         AddControls();
         DisplayExtraControls();
         DisplayConsumption();
         DisplayTime();
         ResumeStatus();
         Click += _GameConsoleControl_Click;
     } catch (Exception e)
     { MessageLogManager.LogMessage("PBM - GCC ::::> Error GC failed to build: " + e.Message); }
 }
Пример #2
0
        private string COSESessionLogPayload(string action, object data)
        {
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "start":    //Create and Start COSE Session Log
                return(Parse(new string[] {
                    consoleSettings.ReportProperties.COSExR_Id.ToString(),
                    consoleSettings.Properties.Status.ToString(),
                    consoleSettings.Properties.ExtraControls.ToString(),
                    consoleSettings.Properties.StartTime.ToString()
                }, '#'));

            case "end":    //End COSE Session Log
                return(Parse(new string[] {
                    consoleSettings.ReportProperties.COSExR_Id.ToString(),
                    consoleSettings.Properties.EndTime.ToString(),
                    consoleSettings.Properties.TempConsumption.ToString()
                }, '#'));

            default:
                return("");
            }
        }
Пример #3
0
        private void CLCOReportInterpreter(string[] response, string action, object data)
        {
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "updatelog":
                break;
            }
        }
Пример #4
0
 public void CopySettings(GameConsoleSetup outputSettings)//via output
 {
     try
     {
         outputSettings.Name        = Name;
         outputSettings.ColorID     = ColorID;
         outputSettings.NumberID    = NumberID;
         outputSettings.EditEnabled = EditEnabled;
         outputSettings.ClientData  = ClientData.Copy();
     } catch (Exception e)
     { MessageLogManager.LogMessage("PBM  - CS ::::> Error copy failed: " + e.Message); }
 }
Пример #5
0
        private void COSESessionLogInterpreter(string[] response, string action, object data)
        {
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "start":    //Create and Start COSE Session Log
                break;

            case "End":    //End COSE Session Log
                break;

            default:
                break;
            }
        }
Пример #6
0
        private void COSEReportInterpreter(string[] response, string action, object data)
        {
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "start":    //Load or Create COSE Report
                consoleSettings.ReportProperties.COSExR_Name = response[0];
                consoleSettings.ReportProperties.COSExR_Id   = uint.Parse(response[1]);
                consoleSettings.ReportProperties.COSExR_Flag = true;
                break;

            default:
                break;
            }
        }
Пример #7
0
        private string COSEReportPayload(string action, object data)
        {
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "start":    //Load or Create COSE Report
                return(Parse(new string[] {
                    consoleSettings.ReportProperties.COSExR_Name,
                    (consoleSettings.NumberID + 1).ToString(),
                    consoleSettings.Name
                }, '#'));

            default:
                return("");
            }
        }
Пример #8
0
 public void AddConsoles(int count, GameConsoleSetup cs) //Check if if statement really needed!!!!!!
 {
     try
     {
         if (setupConfiguration.AvailableNumberIDs.Count >= count)
         {
             CreateConsoles(count, cs);
             MessageBox.Show("\nAvailable Number IDs: " + setupConfiguration.AvailableNumberIDs.Count + "\nNumber Of Console To Create: " + count);
         }
         else if (setupConfiguration.AvailableNumberIDs.Count < count)
         {
             MessageBox.Show("You've reached the limit amount of Consoles");
         }
     } catch (Exception e)
     {
         MessageLogManager.LogMessage("PBM  - MW ::::> Error failed to add console: " + e.Message);
     }
 }
Пример #9
0
        private string COSESessionPayload(string action, object data)
        {
            string           temp;
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "start":    //Create and Start COSE Session
                return(Parse(new string[] {
                    consoleSettings.ReportProperties.COSExR_Id.ToString(),
                    consoleSettings.ClientData.Id.ToString(),
                    consoleSettings.Properties.StartTime.ToString()
                }, '#'));

            case "end":    //End COSE Session
                if (consoleSettings.Properties.PrePaid)
                {
                    temp = TimeSpan.FromSeconds(consoleSettings.Properties.PrePaidTime).ToString();
                }
                else
                {
                    temp = TimeSpan.FromSeconds(consoleSettings.Properties.LastTimeElapsed + consoleSettings.Properties.TimeElapsed).ToString();
                }
                return(Parse(new string[] {
                    consoleSettings.ReportProperties.COSExR_Id.ToString(),
                    consoleSettings.Properties.EndTime.ToString(),
                    temp,
                    consoleSettings.Properties.TempConsumption.ToString(),
                    consoleSettings.ReportProperties.CLINxR_Name
                }, '#'));

            case "copy":    //Copy COSE Session//*
                return(Parse(new string[] {
                    consoleSettings.ReportProperties.COSExR_Id.ToString(),
                    consoleSettings.ReportProperties.COSExR_InputReportId.ToString()
                }, '#'));

            case "deletelast":    //Delete COSE Session//*
                return(consoleSettings.ReportProperties.COSExR_InputReportId.ToString());

            default:
                return("");
            }
        }
Пример #10
0
        private void CLINReportInterpreter(string[] response, string action, object data)
        {
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "start":
                Setup temp = data as Setup;
                temp.CLINReportName = response[0];
                break;

            case "addclient":
                consoleSettings.ClientData.Id                = uint.Parse(response[0]);
                consoleSettings.ClientData.Name              = response[1];
                consoleSettings.ClientData.DocId             = response[2];
                consoleSettings.ClientData.PhoneNumber       = response[3];
                consoleSettings.ClientData.DateOfBirth       = response[4];
                consoleSettings.ReportProperties.CLINxR_Flag = true;
                break;
            }
        }
Пример #11
0
        private void COSESessionInterpreter(string[] response, string action, object data)
        {
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "start":    //Create and Start COSE Session
                break;

            case "End":    //End COSE Session
                break;

            case "copy":    //Copy COSE Session//*
                break;

            case "deletelast":    //Delete COSE Session//*
                break;

            default:
                break;
            }
        }
Пример #12
0
        private string CLINReportPayload(string action, object data)
        {
            GameConsoleSetup consoleSettings = data as GameConsoleSetup;

            switch (action)
            {
            case "start":
                Setup temp = data as Setup;
                return(temp.CLINReportName);

            case "addclient":
                return(Parse(new string[] {
                    consoleSettings.ReportProperties.CLINxR_Name,
                    consoleSettings.ClientData.Name,
                    consoleSettings.ClientData.DocId,
                    consoleSettings.ClientData.PhoneNumber,
                    consoleSettings.ClientData.DateOfBirth
                }, '#'));

            default:
                return("");
            }
        }
Пример #13
0
 private void CreateConsoles(int count, GameConsoleSetup consoleSettings)
 {
     try
     {
         for (int i = 0; i < count; i++)
         {
             GameConsoleSetup cs = new GameConsoleSetup();
             consoleSettings.CopySettings(cs);
             cs.NumberID = setupConfiguration.AvailableNumberIDs[0];
             setupConfiguration.ConsolesSetup.Add(cs);
             GameConsole gc = new GameConsole(cs);
             _consolesContainer.Controls.Add(gc);
             setupConfiguration.AvailableNumberIDs.Remove(setupConfiguration.AvailableNumberIDs[0]);
             setupConfiguration.NumberOfConsoles++;
         }
         MessageBox.Show(_consolesContainer.Controls.Count.ToString());
         _consolesContainer.Update();
         _consolesContainer.Refresh();
         _consolesContainer.PerformLayout();
         SaveSetup();
     } catch (Exception e)
     { MessageLogManager.LogMessage("PBM  - MW ::::> Error failed to create console: " + e.Message); }
 }
 public GameConsolePPClickWindow(GameConsoleSetup settings)
 {
     this.settings = settings;
     InitializeComponent();
 }
Пример #15
0
 public GameConsoleClickWindow(GameConsoleSetup settings)
 {
     InitializeComponent();
     this.settings = settings;
     LoadValues();
 }