Exemplo n.º 1
0
        public static bool PowerAction(string action, int seconds)
        {
            bool ret = false;

            Application.Current.Dispatcher.Invoke(delegate
            {
                PowerStatusBox frm = new PowerStatusBox(action, seconds);
                frm.Status();
                ret = frm.ShowDialog() ?? false;
            });

            return(ret);
        }
        public static bool PowerAction(string action, int seconds)
        {
            bool ret = false;

            App.Current.Dispatcher.Invoke((Action) delegate
            {
                PowerStatusBox frm = new PowerStatusBox();

                frm.Action  = action;
                frm.Seconds = seconds;
                frm.Status();
                ret = (bool)frm.ShowDialog();
            });

            return(ret);
        }