//------------------------------------------------------------------------------------------ /// <summary> /// Initializer /// </summary> /// <param name="HostingShell">Host and provider of shell services</param> public static void Initialize(IShellProvider HostingShell) { General.ContractRequires(HostingShell != null); ShellHost = HostingShell; //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // VERY IMPORTANT! // Do not set AppTerminationConfirmation() as the CloseConfirmation action. //! ShellHost.CloseConfirmation = AppTerminationConfirmation; // Because this Lambda is entangled into serialized content (Still don't know from where) var Spheres = WorkSphereManagers; ShellHost.CloseConfirmation = () => { foreach (var Sphere in Spheres) { if (!Sphere.Discard()) { return(false); } } return(true); }; //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AppExec.LogRegistrationPolicy = AppExec.LOGREG_ALL; // NOT NEEDED // AppExec.LogMessage("ThinkComposer, by Instrumind. Copyright (C) Néstor Sánchez A., for Instrumind Software SpA..", "SYSTEM"); }
public OrderListViewModel(ISessionRegister sessionRegister, IShellProvider shellProvider, IOrderArchive orderArchive, IOptions <CurrencySettings> currencyOptions) : this() { _sessionRegister = sessionRegister; _shellProvider = shellProvider; _orderArchive = orderArchive; _currencySettings = currencyOptions.Value; }
public SessionViewModel(IShellProvider shellProvider, ISessionRegister sessionRegister, IOptions <BalanceRange> balanceRangeOptions) { _shellProvider = shellProvider; _sessionRegister = sessionRegister; _balanceRange = balanceRangeOptions.Value; Balance = _balanceRange.Start; }
public OrderDetailsViewModel(ISessionRegister sessionRegister, IShellProvider shellProvider, IBarcodeProducer barcodeProducer, IOptions <CurrencySettings> currencyOptions, IOrderArchive orderArchive) : this() { _sessionRegister = sessionRegister; _shellProvider = shellProvider; _barcodeProducer = barcodeProducer; _currencySettings = currencyOptions.Value; _orderArchive = orderArchive; }
public OrderCreationViewModel(ISessionRegister sessionRegister, IProductRack productRack, IWindowManager windowManager, IShoppingCart shoppingCart, IShellProvider shellProvider, IBarcodeProducer barcodeProducer, IOptions <CurrencySettings> currencyOptions) { _sessionRegister = sessionRegister; _productRack = productRack; _windowManager = windowManager; _shoppingCart = shoppingCart; _shellProvider = shellProvider; _barcodeProducer = barcodeProducer; _currencySettings = currencyOptions.Value; }
public ShellViewModel(IShellProvider shellProvider) { _shellProvider = shellProvider; }
/// <summary> /// Constructor /// </summary> /// <param name="ShellProvider">The provider of application shell services.</param> public WorkspaceManager(IShellProvider ShellProvider) { General.ContractRequiresNotNull(ShellProvider); this.ShellProvider = ShellProvider; }
public LoginViewModel(IUserStorage userStorage, ISessionRegister sessionRegister, IShellProvider shellProvider) { _userStorage = userStorage; _sessionRegister = sessionRegister; _shellProvider = shellProvider; }