Exemplo n.º 1
0
        private void biMatchSelectedJob_Click(object sender, EventArgs e)
        {
            if (!MatchWarn())
            {
                return;
            }
            pbProgress.Visible  = true;
            lblProgress.Visible = true;
            DataGridViewRow row = GetSelectedRowFromCell(this.gridJobs);

            if (row != null)
            {
                JobsBO       jbo       = (JobsBO)SingletonManager.GetSingleton(typeof(JobsBO));
                JobContainer container = jbo.FindByName(row.Cells[0].Value.ToString());
                if (container != null)
                {
                    SynchronizeBO bo = (SynchronizeBO)SingletonManager.GetSingleton(typeof(SynchronizeBO));
                    bo.aSynchronizeDirectory(
                        container.SourceDirectory,
                        container.SourceDirectory,
                        container.DestinationDirectory,
                        container.WatchSubDirectories,
                        true);
                    //RefreshFiles();
                }
            }
            else
            {
                MessageForm frm = new MessageForm();
                frm.Msg = "No job was selected, please select a job by click on its name and try again.";
                frm.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void SynchronizeAll()
        {
            pbProgress.Visible  = true;
            lblProgress.Visible = true;
            SynchronizeBO bo = (SynchronizeBO)SingletonManager.GetSingleton(typeof(SynchronizeBO));

            bo.aSynchronizeAll();
        }
Exemplo n.º 3
0
        public void SynchronizeFile(string oFile)
        {
            this.timerCheckReporter.Start();
            SynchronizeBO sbo = (SynchronizeBO)SingletonManager.GetSingleton(typeof(SynchronizeBO));

            sbo.FinishedSynch += new EventHandler(this.HandleSynchFinished);
            sbo.aSynchronizeFile(oFile);
            this.ShowDialog();
        }
Exemplo n.º 4
0
        private void MatchAll()
        {
            if (!MatchWarn())
            {
                return;
            }
            pbProgress.Visible  = true;
            lblProgress.Visible = true;
            SynchronizeBO bo = (SynchronizeBO)SingletonManager.GetSingleton(typeof(SynchronizeBO));

            bo.aMatchAll();
        }
Exemplo n.º 5
0
        private void Form1_Load(object sender, EventArgs e)
        {
            VersionBO vbo = (VersionBO)SingletonManager.GetSingleton(typeof(VersionBO));

            this.Text = vbo.ProgramName + " v" + vbo.Version;
            LoadJobs();
            //RefreshFiles();
            ConfigurationBO bo  = (ConfigurationBO)SingletonManager.GetSingleton(typeof(ConfigurationBO));
            ListenerBO      lbo = (ListenerBO)SingletonManager.GetSingleton(typeof(ListenerBO));

            if (bo.CContainer.AutoStart)
            {
                lbo.StartListeners();
            }
            lbo.StatusChanged += new EventHandler(lbo_StatusChanged);
            lbo_StatusChanged(lbo, EventArgs.Empty);
            SynchronizeBO sbo = (SynchronizeBO)SingletonManager.GetSingleton(typeof(SynchronizeBO));

            sbo.Synchronized  += new SynchEventHandler(sbo_Synchronized);
            sbo.FinishedSynch += new EventHandler(sbo_FinishedSynch);
        }
Exemplo n.º 6
0
        private void timerCheckReporter_Tick(object sender, System.EventArgs e)
        {
            SynchronizeBO sbo = (SynchronizeBO)SingletonManager.GetSingleton(typeof(SynchronizeBO));

            WriteReport(sbo.Reporter);
        }