Пример #1
0
		private void OnRaiseDisplaySettingsChanged(object sender, EventArgs e)
		{
			// change if changed
			if (SecondaryScreenAvailable && ScreenManager.SecondaryScreen == null) // true -> false
				SecondaryScreenAvailable = false;
			else if (!SecondaryScreenAvailable && ScreenManager.SecondaryScreen != null) // false -> true
				SecondaryScreenAvailable = true;
			else return; // false -> false || true -> true : no change
			
			// fire event
			var isavail = new SAvailableEventArgs(SecondaryScreenAvailable);
			EventHandler<SAvailableEventArgs> handler = SecondaryScreenAvailableChanged;
			if (handler != null)
				handler(this, isavail);
		}
Пример #2
0
        private void OnRaiseDisplaySettingsChanged(object sender, EventArgs e)
        {
            // change if changed
            if (SecondaryScreenAvailable && ScreenManager.SecondaryScreen == null)             // true -> false
            {
                SecondaryScreenAvailable = false;
            }
            else if (!SecondaryScreenAvailable && ScreenManager.SecondaryScreen != null)             // false -> true
            {
                SecondaryScreenAvailable = true;
            }
            else
            {
                return;              // false -> false || true -> true : no change
            }
            // fire event
            var isavail = new SAvailableEventArgs(SecondaryScreenAvailable);
            EventHandler <SAvailableEventArgs> handler = SecondaryScreenAvailableChanged;

            if (handler != null)
            {
                handler(this, isavail);
            }
        }