Ejemplo n.º 1
0
        private void SetColors()
        {
            currentColorTable = (CropFormColorTable) colorTables[colorIndex];
            int areaAlpha = (int) (Configuration.Current.UserOpacity*255);

            if (Configuration.Current.UsePerPixelAlpha)
            {
                LayerOpacity = 1.0;
                currentColorTable.MainAlphaChannel = areaAlpha;
            }
            else
            {
                LayerOpacity = Configuration.Current.UserOpacity;
                currentColorTable.MainAlphaChannel = 255;
            }

            tabBrush.Color = currentColorTable.TabColor;
            areaBrush.Color = currentColorTable.FormColor;
            formTextBrush.Color = currentColorTable.FormTextColor;
            tabTextBrush.Color = currentColorTable.TabTextColor;
            outlinePen.Color = currentColorTable.LineColor;
            PaintLayeredWindow();
        }
Ejemplo n.º 2
0
        public MainCropForm()
        {
            Configuration.Current.ActiveCropWindow = this;
            imageCapture = new ImageCapture();
            ApplyConfiguration();

            points = new Point[]
            {
                new Point(TransparentMargin - TabHeight,
                          TransparentMargin - TabHeight),
                new Point(TransparentMargin + TabTopWidth,
                          TransparentMargin - TabHeight),
                new Point(TransparentMargin + TabBottomWidth,
                          TransparentMargin),
                new Point(TransparentMargin,
                          TransparentMargin),
                new Point(TransparentMargin,
                          TransparentMargin + TabBottomWidth),
                new Point(TransparentMargin - TabHeight,
                          TransparentMargin + TabTopWidth)
            };

            colorTables.Add(new CropFormBlueColorTable());
            colorTables.Add(new CropFormDarkColorTable());
            colorTables.Add(new CropFormLightColorTable());
            currentColorTable = (CropFormColorTable) colorTables[0];
            SetColors();
            SetUpForm();
            SetUpMenu();
            if (LimitMaxWorkingSet()) Process.GetCurrentProcess().MaxWorkingSet = (IntPtr) 5000000;
            SaveConfiguration();
        }
Ejemplo n.º 3
0
 public MainCropForm()
 {
     Configuration.Current.ActiveCropWindow = this;
     imageCapture = new ImageCapture();
     ApplyConfiguration();
     colorTables.Add(new CropFormBlueColorTable());
     colorTables.Add(new CropFormDarkColorTable());
     colorTables.Add(new CropFormLightColorTable());
     currentColorTable = (CropFormColorTable) colorTables[0];
     SetColors();
     SetUpForm();
     SetUpMenu();
     if (LimitMaxWorkingSet()) Process.GetCurrentProcess().MaxWorkingSet = (IntPtr) 5000000;
     SaveConfiguration();
 }