Ejemplo n.º 1
0
 public void AddTerminal(string terminalDisplayName, string terminalAddress, string dbAddress, string dbPath)
 {
     CurrenTerminal = new Core.Model.Terminal()
     {
         DisplayName       = terminalDisplayName,
         TerminalName      = Environment.MachineName,
         TerminalIpAddress = terminalAddress,
         TerminalType      = TerminalType.Kitchen
     };
     DbTerminal.AddTerminal(CurrenTerminal);
     CurrentSettings = new Settings
     {
         TerminalType      = TerminalType.Kitchen,
         DbIpAddress       = dbAddress,
         DbPath            = dbPath,
         TerminalIpAddress = terminalAddress,
         DisplayName       = terminalDisplayName,
         RecallCount       = 5,
         CmFontSize        = 15
     };
     DbSettings.AddSettings(CurrentSettings, CurrenTerminal.TerminalId);
     LoadSettings();
     CurrentSettings.TerminalType      = TerminalType.Kitchen;
     CurrentSettings.DbIpAddress       = dbAddress;
     CurrentSettings.DbPath            = dbPath;
     CurrentSettings.TerminalIpAddress = terminalAddress;
     CurrentSettings.DisplayName       = terminalDisplayName;
     DbSettings.SaveSettings(CurrentSettings, CurrenTerminal.TerminalId);
     GetPageInformation();
 }
Ejemplo n.º 2
0
 public void Initialize()
 {
     _printer   = PrinterFactory.Instance.BuildPrinter();
     _formatter = new PrinterFormatter();
     if (ChefmateController.Instance.CurrentSettings.OutputTerminal > 0)
     {
         _outputTerminal = DbTerminal.GetTerminal(ChefmateController.Instance.CurrentSettings.OutputTerminal);
     }
 }