예제 #1
0
        private void WindowSizeClosed(object sender, EventArgs e)
        {
            Trace.WriteLine("SizeSelectionWindow Closed");
            SizeSelectionWindow window = (SizeSelectionWindow)sender;

            UnregisterEvent(window);
            _screens.Remove(window);
            CloseAllWindow();
        }
예제 #2
0
        public void Show()
        {
            Trace.WriteLine("Show SizeSelectionWindow HotKey");
            if (_screens.Count != 0)
            {
                Trace.WriteLine("SizeSelectionWindows already opened");
                return;
            }
            foreach (Screen screen in Screen.AllScreens)
            {
                var window = new SizeSelectionWindow(screen, _settings.Theme.NbItemsPerRow, _settings.Theme.NbItemsPerColumn, _settings);
                window.Show();
                _screens.Add(window);
            }

            foreach (SizeSelectionWindow sizeSelectionWindow in _screens)
            {
                sizeSelectionWindow.Deactivated  += WindowDeactivated;
                sizeSelectionWindow.SizeSelected += WindowSizeSelected;
                sizeSelectionWindow.Closed       += WindowSizeClosed;
            }
        }
예제 #3
0
 private void UnregisterEvent(SizeSelectionWindow sizeSelectionWindow)
 {
     sizeSelectionWindow.Deactivated  -= WindowDeactivated;
     sizeSelectionWindow.SizeSelected -= WindowSizeSelected;
     sizeSelectionWindow.Closed       -= WindowSizeClosed;
 }