예제 #1
0
        public RunningJobsCtl(JobLauncher _jobLauncher)
        {
            InitializeComponent();

            jobLauncherCtl = _jobLauncher;

            treeView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular);
            CreateSubMenus();
        }
예제 #2
0
		public RunOnceDialog(JobLauncher _jobLauncher)
		{
			InitializeComponent();
			jobsLauncher = _jobLauncher;

			if (!this.InvokeRequired)
				GetUsers();
			else
			{
				this.BeginInvoke(new ThreadStart(GetUsers), null);
			}
		}
예제 #3
0
파일: MainForm.cs 프로젝트: BrianGoff/BITS
        private void NewJobLauncher()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                JobLauncher jobLauncher = null;
                if (FormsManagerProxy.DataViewerControls.ContainsKey("JobLauncher"))
                {
                    jobLauncher = (JobLauncher)FormsManagerProxy.DataViewerControls["JobLauncher"];
                    FormsManagerProxy.DataViewerControls.Remove("JobLauncher");
                    if (jobLauncher != null)
                    {
                        jobLauncher.LogViewerThreadEnd();
                        if (jobLauncher.cc != null)
                        {
                            ((ControlContainer)jobLauncher.cc).Close();
                            jobLauncher.cc = null;
                        }
                        jobLauncher = null;
                    }
                }

                jobLauncher = new JobLauncher(this);
                this.Controls.Add(jobLauncher);

                jobLauncher.cc = new ControlContainer(jobLauncher, "Job Launcher", this);
                FormsManagerProxy.DataViewerControls["JobLauncher"] = jobLauncher;
                FormsManagerProxy.JobLauncher = jobLauncher;
                jobLauncher.cc.WindowState = FormWindowState.Maximized;
                jobLauncher.cc.Show();
                jobLauncher.cc.BringToFront();
                jobLauncher.Visible = true;

            }
            catch (Exception ex)
            {
                MessageBox.Show("Error encountered.  Please contact support.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                log.Error(ex);
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }