Ejemplo n.º 1
0
        public static void ProgressWindowShow(object aProgressHolder)
        {
            ProgressHolder _ph = (ProgressHolder)aProgressHolder;
            ProgressWindow _pw = new ProgressWindow(_ph);

            _pw.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            _pw.Topmost = true;
            _pw.Show();
            System.Windows.Threading.Dispatcher.Run();
        }
Ejemplo n.º 2
0
        public ProgressWindow(ProgressHolder aProgressHolder)
        {
            InitializeComponent();

            this.FProgressHolder = aProgressHolder;
            this.FTimer.Elapsed += FTimer_Elapsed;
            this.FTimer.Start();

            if (aProgressHolder.IsCancelable)
            {
                this.btnCancel.Visibility = System.Windows.Visibility.Visible;
            }
        }