Example #1
0
        private void runSMServer()
        {
            try
            {
                if (server == null || !server.ServerActive)
                {
                    new PackageViaWireless();
                    try
                    {
                        server = new StorekeeperManagementServer.AramisTCPServer(ReceiveMessages.ReceiveMessage, PDTSettings.AllowedIPs(), Consts.ServerIP);
                    }
                    catch { }


                    if (server.ServerActive)
                    {
                        Func <List <KeyValuePair <Guid, int> > > method = server.CatchingConnection.GetPdtSessions;

                        UIConsts.SessionUpdated += () =>
                        {
                            method().ForEach(kvp => SystemAramis.UpdateSession(kvp.Key, kvp.Value));
                        };

                        showSuccessResultOfConnection();
                    }
                    else
                    {
                        showFailResultOfConnection();
                    }
                }
                //Якщо сервер запущено і цю дію робить Адмін - відкрити вікно симулювання читання штрих-коду
                else //if (SystemAramis.CurrentUser.Id == CatalogUsers.Admin.Id)
                {
                    SendToTCD sendForm = new SendToTCD(server);
                    sendForm.Show();
                }
            }
            catch (Exception exc)
            {
                server = null;
                exc.Message.WarningBox();
                showFailResultOfConnection();
            }
        }
Example #2
0
 private void barButtonItem31_ItemClick(object sender, ItemClickEventArgs e)
 {
     SystemAramis.SystemStop(true);
 }
Example #3
0
 public static void Main(string[] args)
 {
     SystemAramis.SystemStart(args, new DesktopUserInterfaceEngine(typeof(AramisMainWindow)));
 }