Example #1
0
        public void ShowColor()
        {
            if (GlobalVar.W == null || GlobalVar.H == null)
            {
                return;
            }
            Dispatcher?.Invoke(Hide);
            var w      = (int)GlobalVar.W;
            var h      = (int)GlobalVar.H;
            var bitmap = Yx.CopyScreen(0, 0, w, h);

            _cv = new ColorView(bitmap);
            _p  = new PM(bitmap, _cv);
            _cv.Show();
            _p.ShowDialog();
            if (_p.IsClose)
            {
                SetColor();
            }
            Dispatcher?.Invoke(Show);
            _isZt = false;
        }
Example #2
0
File: PM.cs Project: wei20050/Wdxx
 public PM(Image bitmap, ColorView cv)
 {
     _cv = cv;
     InitializeComponent();
     BackgroundImage = bitmap ?? throw new ArgumentNullException(nameof(bitmap));
 }