Exemplo n.º 1
0
        public MainForm(Options startupOptions)
        {
            _startupOptions = startupOptions;

            FullscreenManager          = new FullscreenFormManager(this);
            _quickRegionDrawingHandler = new ThumbnailPanel.RegionDrawnHandler(HandleQuickRegionDrawn);

            //WinForms init pass
            InitializeComponent();

            //Store default values
            DefaultNonClickTransparencyKey = this.TransparencyKey;
            DefaultBorderStyle             = this.FormBorderStyle;

            //Thumbnail panel
            _thumbnailPanel = new ThumbnailPanel {
                Location = Point.Empty,
                Dock     = DockStyle.Fill
            };
            _thumbnailPanel.CloneClick += new EventHandler <CloneClickEventArgs>(Thumbnail_CloneClick);
            Controls.Add(_thumbnailPanel);

            //Set native renderer on context menus
            Asztal.Szótár.NativeToolStripRenderer.SetToolStripRenderer(
                menuContext, menuWindows, menuOpacity, menuResize, menuFullscreenContext
                );

            //Start timer
            InitializeTimer();

            //Set to Key event preview
            this.KeyPreview = true;

            Log.Write("Main form constructed");
        }
Exemplo n.º 2
0
        public MainForm(Options startupOptions)
        {
            _startupOptions = startupOptions;

            FullscreenManager = new FullscreenFormManager(this);
            _quickRegionDrawingHandler = new ThumbnailPanel.RegionDrawnHandler(HandleQuickRegionDrawn);

            //WinForms init pass
            InitializeComponent();

            //Store default values
            DefaultNonClickTransparencyKey = this.TransparencyKey;
            DefaultBorderStyle = this.FormBorderStyle;

            //Thumbnail panel
            _thumbnailPanel = new ThumbnailPanel {
                Location = Point.Empty,
                Dock = DockStyle.Fill
            };
            _thumbnailPanel.CloneClick += new EventHandler<CloneClickEventArgs>(Thumbnail_CloneClick);
            Controls.Add(_thumbnailPanel);

            //Set native renderer on context menus
            Asztal.Szótár.NativeToolStripRenderer.SetToolStripRenderer(
                menuContext, menuWindows, menuOpacity, menuResize, menuFullscreenContext
            );

            //Set to Key event preview
            this.KeyPreview = true;

            Log.Write("Main form constructed");
        }
Exemplo n.º 3
0
        public RegionPanel()
        {
            InitializeComponent();
            this.SuspendLayout();
            UpdateRegionLabels();
            this.ResumeLayout();

            _regionDrawnHandler = new ThumbnailPanel.RegionDrawnHandler(ThumbnailPanel_RegionDrawn);
        }
Exemplo n.º 4
0
        public RegionPanel()
        {
            InitializeComponent();

            Localize();

            //Copy settings into combo box
            if (Settings.Default.SavedRegions != null) {
                foreach (object o in Settings.Default.SavedRegions) {
                    comboRegions.Items.Add(o);
                }
            }

            _regionDrawnHandler = new ThumbnailPanel.RegionDrawnHandler(ThumbnailPanel_RegionDrawn);
        }
Exemplo n.º 5
0
        public RegionPanel()
        {
            InitializeComponent();

            Localize();

            //Copy settings into combo box
            if (Settings.Default.SavedRegions != null)
            {
                foreach (object o in Settings.Default.SavedRegions)
                {
                    comboRegions.Items.Add(o);
                }
            }

            _regionDrawnHandler = new ThumbnailPanel.RegionDrawnHandler(ThumbnailPanel_RegionDrawn);
        }