Exemplo n.º 1
0
 private void ShowSplashScreen(Entities.JobProgress progress = null)
 {
     try
     {
         Presentation.Controllers.SplashScreen.Show(progress);
         Application.DoEvents();
     }
     catch { /*Splash screen failed. No problem. */ }
 }
Exemplo n.º 2
0
        public JobProgress(Entities.JobProgress Progress)
        {
            InitializeComponent();

            this.appUpdAsyncHelper = new AsyncCalls();

            job = Progress;
            if (job != null)
            {
                job.PropertyChanged += new PropertyChangedEventHandler(job_PropertyChanged);
            }
        }
Exemplo n.º 3
0
        internal static void Show(Entities.JobProgress progress = null)
        {
            if (frmSplash == null)
            {
                frmSplash = new FrmSplashScreen();
            }

            frmSplash.Progress = progress;
            frmSplash.Show();

            System.Windows.Forms.Application.DoEvents();
        }
Exemplo n.º 4
0
        private void Update(Entities.JobProgress info)
        {
            // Ensure inside UI thread
            if (!this.appUpdAsyncHelper.Execute(
                    this, new UpdateDelegate(Update), info))
            {
                return;
            }

            if (this.InvokeRequired)
            {
                return;
            }

            switch (info.Status)
            {
            case Entities.JobProgress.JobStatus.InProgress:
                if (!this.Visible)
                {
                    this.Visible = true;
                }
                break;

            case Entities.JobProgress.JobStatus.Idle:
            case Entities.JobProgress.JobStatus.Done:
                if (this.Visible)
                {
                    this.Visible = false;
                }
                break;
            }

            this.lblJobName.Text  = info.JobName;
            this.pgsMainBar.Value = info.Percent;
            Application.DoEvents();
        }
Exemplo n.º 5
0
 void job_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     Entities.JobProgress progress = (Entities.JobProgress)sender;
     Update(progress);
 }