Exemple #1
0
 private void btnReplicateAll_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem lvw in lvwLog.CheckedItems)
     {
         ReplicationTaskInfo job = lvw.Tag as ReplicationTaskInfo;
         Replicate(job);
     }
 }
        public EditJob(ReplicationTaskInfo JobEditting)
        {
            this.JobEditting = JobEditting;

            InitializeComponent();


            LoadData();
        }
Exemple #3
0
        private void AddJob()
        {
            ReplicationTaskInfo rti = new ReplicationTaskInfo("");
            EditJob             ej  = new EditJob(rti);

            ej.ShowDialog();

            if (rti != null)
            {
                AddJobToTheList(rti);
            }
        }
Exemple #4
0
        private void AddJobToTheList(ReplicationTaskInfo job)
        {
            ListViewItem item = lvwLog.Items.Add(job.Uid, job.JobName, 0);

            item.Tag = job;
            item.SubItems.Add("");
            item.SubItems.Add("0");

            /*
             * item.SubItems[1].Text = rt.Status;
             * item.SubItems[2].Text = Convert.ToDouble(rt.PbValue * 100 / (rt.PbMax + 0.1)).ToString("0.00");
             */
        }
Exemple #5
0
        private void Replicate(ReplicationTaskInfo job)
        {
            Replicator.AbortReplication = false;
            Thread thread = new Thread(() =>
            {
                Replicator rt = new Replicator(new MessageHandler(
                                                   windowsFormsContext, job, LogStatus, LogError
                                                   ));
                rt.Replicate(job);
            });

            thread.Name = "Replicator";
            thread.Start();
        }
 internal void ReplicationTaskInfo(ReplicationTaskInfo jobEditting)
 {
     replicationTaskInfo = jobEditting;
 }