Beispiel #1
0
 public static void AllWindowClose()
 {
     while (puw.Count > 0)
     {
         PopUpWindow pw = puw.Pop();
         pw.Dispatcher.Invoke(new Action(delegate { pw.Close(); }));
     }
 }
Beispiel #2
0
        public ImageEditor()
        {
            PopUpWindow.AllWindowClose();
            InitializeComponent();
            Editor.ImageEditMode = EditMode.SizeChange;

            EditBtn1.Click += EditBtnClick;
            EditBtn2.Click += EditBtnClick;
            //EditBtn3.Click += EditBtnClick;

            RatioCB.SelectionChanged += SelectionChanging;

            Editor.RatioChanged     += Editor_RatioChanged;
            Editor.ImageSizeChanged += Editor_ImageSizeChanged;

            double[] Ratios = { 12.5, 25.0, 33.33, 50.0, 66.67, 100.0, 150.0, 200.0, 400.0, 800.0, 1600.0, 3200.0 };

            foreach (double Ratio in Ratios)
            {
                RatioCB.Items.Add(Math.Round(Ratio, 2) + "%");
            }

            this.Activate();
        }