Beispiel #1
0
        public ZoomBoxDialog(ImageFramework.Utility.Color color, int borderSize)
        {
            this.initialColor = color;
            initialBorderSize = borderSize;
            InitializeComponent();

            ColorPicker.SelectedColor = System.Windows.Media.Color.FromScRgb(1.0f, color.Red, color.Green, color.Blue);
            BorderSizeBox.Value       = borderSize;
        }
        public WindowModel(MainWindow window)
        {
            Window        = window;
            AssemblyPath  = System.Reflection.Assembly.GetExecutingAssembly().Location;
            ExecutionPath = System.IO.Path.GetDirectoryName(AssemblyPath);

            window.Loaded += WindowOnLoaded;

            windowStack.Push(window);

            var bgBrush  = (SolidColorBrush)Window.FindResource("BackgroundBrush");
            var tmpColor = new ImageFramework.Utility.Color(bgBrush.Color.ScR, bgBrush.Color.ScG, bgBrush.Color.ScB, 1.0f);

            ThemeColor = tmpColor.ToSrgb();
        }
 public static System.Windows.Media.SolidColorBrush ToBrush(this Color c)
 {
     return(new SolidColorBrush(c.ToMediaColor()));
 }
Beispiel #4
0
 public Element(ImageFramework.Utility.Color color, int id, bool alpha)
 {
     this.color   = color;
     this.imageId = id;
     this.alpha   = alpha;
 }
 public static System.Windows.Media.Color ToMediaColor(this Color c)
 {
     return(System.Windows.Media.Color.FromScRgb(c.Alpha, c.Red, c.Green, c.Blue));
 }