public void Start(IApplicationController applicationController, SingleInstanceApplication app)
        {
            _applicationController = applicationController;

            if (_app == null && _applicationController != null)
            {
                _app = app;
                _app.StartupNextInstance += _app_StartNewInstance;
                _app.Startup             += _app_Startup;
                _app.Shutdown            += _app_Shutdown;

                if (_settings.IsSettingsRequireSetValues())
                {
                    _messagesProvider.Info(InformationResources.MESSAGE_PARAMETERS_NEED_BE_INSTALLED);
                    InitSettingsForm();
                }

                if (_settings.IsSettingsRequireSetValues())
                {
                    _messagesProvider.Warn(InformationResources.MESSAGE_PARAMETERS_NOT_INSTALLED);
                    return;
                }

                InitMainForm();
                _app.Run(Environment.GetCommandLineArgs());
            }
        }
コード例 #2
0
        public bool PopulateApplicaitonControlMap()
        {
            _upsManagerMap      = (UpsManagerMap)_cache.Get(ShipmentApplicaotinHelperType.UpsManagerMap, _mainWindow);
            _upsManagerShellMap = (UpsManagerShellMap)_cache.Get(ShipmentApplicaotinHelperType.UpsManagerShellMap, _mainWindow);
            _upsManagerShellMap.ClearUIForStartInput();

            _upsManagerMap.Map();

            if (NeedClearing(_upsManagerMap.ShipmentAutomationControls))
            {
                _messagesProvider.Info(InformationResources.WARN_CURRENT_SHIPMENT_SCREEN_ISNOT_EMPTY);
                return(false);
            }

            _messagesProvider.Log(InformationResources.INFO_UPS_INIT_CONTROL_MAP);
            return(true);
        }
 private void View_OnTestLoginClick()
 {
     try
     {
         View.TestButton.Enabled = false;
         _acumaticaNetworkProvider.TestNetworkSettings();
         _messagesProvider.Info(InformationResources.INFO_CHECK_NETWORK_PARAMETERS);
     }
     catch (Exception e)
     {
         _messagesProvider.Warn(string.Format(InformationResources.ERROR_CHECK_NETWORK_PARAMETERS, InformationResources.Warn_Invalid_credentials_or_URL_string, e.Message));
     }
     finally
     {
         View.TestButton.Enabled = true;
     }
 }
コード例 #4
0
        public bool PopulateApplicaitonControlMap()
        {
            //Try set UI for input shipment
            _fedExShipMahagerShellMap = (FedExShipMahagerShellMap)_cache.Get(ShipmentApplicaotinHelperType.FedExShipManagerShellMap, _mainWindow);
            _fedExShipMahagerShellMap.ClearUIForStartInput();

            //Find and map UI controls
            _fedexShipManagerMap = (FedexShipManagerMap)_cache.Get(ShipmentApplicaotinHelperType.FedexShipManagerMap, _mainWindow);
            _fedexShipManagerMap.Map();

            if (NeedClearing(_fedexShipManagerMap.ShipmentAutomationControls))
            {
                _messagesProvider.Info(InformationResources.WARN_CURRENT_SHIPMENT_SCREEN_ISNOT_EMPTY);
                return(false);
            }
            _fedExShipMahagerShellMap.BottomToolboxControl?.GetButtons()?[0].Click();
            _messagesProvider.Log(InformationResources.INFO_FEDEX_INIT_CONTROL_MAP);
            return(true);
        }