コード例 #1
0
ファイル: MainCropForm.cs プロジェクト: enriquein/Cropper
        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();
        }
コード例 #2
0
ファイル: MainCropForm.cs プロジェクト: enriquein/Cropper
        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();
        }
コード例 #3
0
ファイル: MainCropForm.cs プロジェクト: utkarshx/cropper
 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();
 }