Example #1
0
        /// <summary>
        /// Load the device.
        /// </summary>
        /// <exception cref="IOException"></exception>
        public void Load()
        {
            if (LSRetailPosis.Settings.HardwareProfiles.DualDisplay.Active == false)
            {
                return;
            }

            try
            {
                NetTracer.Information("Peripheral [DualDisplay] - Load");

                dualDisplayForm = new DualDisplayForm();
                dualDisplayForm.ShowFormOnDualDisplay();
            }
            catch (PosStartupException ex)
            {
                NetTracer.Information("Peripheral [DualDisplay] - Load - Pos Startup Exception: {0}", ex.Message);

                Unload();
                throw;
            }
            catch (Exception ex)
            {
                NetTracer.Information("Peripheral [DualDisplay] - Load - Exception: {0}", ex.Message);
            }

            IsActive = true;
        }
Example #2
0
        /// <summary>
        /// Unload the device.
        /// </summary>
        public void Unload()
        {
            if (IsActive && dualDisplayForm != null)
            {
                NetTracer.Information("Peripheral [DualDisplay] - Device Released");

                dualDisplayForm.Dispose();
                dualDisplayForm = null;
                IsActive        = false;
            }
        }