示例#1
0
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing)
                {
                    Logger.Info("LineDisplaySimulator", "Disposing class: " + this.ToString());

                    if (bt != null)
                    {
                        bt.Dispose();
                        bt = null;
                    }
                }

                // Release the native unmanaged resources
                // WindowThread needs to be treated as an unmanaged resource because
                // it is a class that contain threads and windows and won't get collected
                // by the GC
                if (Window != null)
                {
                    Window.Close();
                }
                Window = null;
            }
            finally
            {
                base.Dispose(disposing);
            }
        }
示例#2
0
        public override void Open()
        {
            // Device State checking done in base class
            base.Open();

            // Initialize the CheckHealthText property to an empty string
            checkhealthtext = "";

            // Set values for common statistics
            SetStatisticValue(StatisticManufacturerName, "Microsoft Corporation");
            SetStatisticValue(StatisticManufactureDate, "2004-05-23");
            SetStatisticValue(StatisticModelName, "LineDisplay Simulator");
            SetStatisticValue(StatisticMechanicalRevision, "1.0");
            SetStatisticValue(StatisticInterface, "Other");

            // show simulation window
            Window = new LineDisplaySimulatorWindow(this);

            Properties.BlinkRate = 1000;

            DrawLineDisplay(GetScreenModeIndex());

            // Create a timer for blinking
            bt = new BlinkTimerClass(this);
        }
示例#3
0
		protected override void Dispose(bool disposing)
		{
			try
			{
				if (disposing)
				{
					Logger.Info("LineDisplaySimulator", "Disposing class: " + this.ToString());

					if (bt != null)
					{
						bt.Dispose();
						bt = null;
					}
				}
				
				// Release the native unmanaged resources
				// WindowThread needs to be treated as an unmanaged resource because
				// it is a class that contain threads and windows and won't get collected
				// by the GC
				if (Window != null)
					Window.Close();
				Window = null;
			}
			finally
			{
				base.Dispose(disposing);
			}
		}
示例#4
0
		public override void Open()
		{
			// Device State checking done in base class
			base.Open();

			// Initialize the CheckHealthText property to an empty string
			checkhealthtext = "";

			// Set values for common statistics
			SetStatisticValue(StatisticManufacturerName, "Microsoft Corporation");
			SetStatisticValue(StatisticManufactureDate, "2004-05-23");
			SetStatisticValue(StatisticModelName, "LineDisplay Simulator");
			SetStatisticValue(StatisticMechanicalRevision, "1.0");
			SetStatisticValue(StatisticInterface, "Other");

			// show simulation window
			Window = new LineDisplaySimulatorWindow(this);
			
			Properties.BlinkRate = 1000;

			DrawLineDisplay(GetScreenModeIndex());

			// Create a timer for blinking
			bt = new BlinkTimerClass(this);
		}