Example #1
0
        private void StartStopSchedule()
        {
            TaskBase task = CurrentTask;

            if (task == null)
            {
                return;
            }
            bool start = !task.Schedule.Enabled;

            if (start)
            {
                System.Diagnostics.Debug.Assert(task.State == TaskState.Ready);
                if (task.Check(true))
                {
                    task.Schedule.Enabled = true;
                }
                else
                {
                    WinUtil.ShowError(string.Format("Could not start schedule - task has errors: {0}", task.Message));
                }
            }
            else
            {
                task.Schedule.Enabled = false;
            }
        }
Example #2
0
        private void CheckCurrentTask()
        {
            TaskBase task = CurrentTask;

            if (task != null)
            {
                task.Check(true);
                statusTextTask.Text = task.Message;
            }
        }
Example #3
0
        private void PreviewCurrentTask()
        {
            TaskBase task = CurrentTask;

            if (!CurrentTaskIsReady || !task.Check(false))
            {
                return;
            }
            C1.Win.C1Preview.C1PrintPreviewDialog pview = new C1.Win.C1Preview.C1PrintPreviewDialog();
            pview.Show(this);
            pview.Document = task.Document;
        }