コード例 #1
0
 public JobPoller(VaultSync sync, VaultContext context, Func<bool> keepRunning, bool startActive)
 {
     Sync = sync;
     Context = context;
     KeepRunning = keepRunning;
     active = startActive;
 }
コード例 #2
0
        public CustomAppContext()
        {
            InitializeComponents(true);

            sync = new VaultSync(TimeSpan.MaxValue);
            sync.SynchronizingWithServer = false;
            sync.start();
        }
コード例 #3
0
        public CustomAppContext(TimeSpan duration, bool synchronizingWithServer, bool startPollerInactive)
        {
            InitializeComponents(false);

            sync = new VaultSync(duration);
            sync.RunCompleted += sync_RunCompleted;
            sync.SynchronizingWithServer = synchronizingWithServer;
            sync.StartPollerInactive = startPollerInactive;
            sync.start();
        }
コード例 #4
0
        void startSync_Click(object sender, EventArgs e)
        {
            bool starting = startSync.Text.EndsWith("Start");

            sync.stop();
            sync = new VaultSync(TimeSpan.MaxValue);

            sync.SynchronizingWithServer = starting;
            sync.StartPollerInactive = !listening;
            sync.start();

            listJobs.Enabled = starting;
            pauseResume.Enabled = starting;
        }