Esempio n. 1
0
        private void StartAutoCopy_Click(object sender, EventArgs e)
        {
            if (!ValidPaths())
            {
                return;
            }

            StartAutoCopy.Enabled = false;
            CleanButton.Enabled   = false;
            CopyButton.Enabled    = false;

            _autoCopy = new AutoCopy(new TransferLocations(SourceTextBox.Text,
                                                           DestinationTextBox.Text,
                                                           Logging.Checked));
            //the timer value is in milliseconds, but the interval is in minutes
            _autoCopy.CopyInterval = (double)CopyInterval.Value * 60 * 1000;

            _autoCopy.StartIntervalCopy();

            StopAutoCopy.Enabled = true;
        }
Esempio n. 2
0
        private void StartAutoCopy_Click(object sender, EventArgs e)
        {
            if(!ValidPaths()) return;

            StartAutoCopy.Enabled = false;
            CleanButton.Enabled = false;
            CopyButton.Enabled = false;

            _autoCopy = new AutoCopy(new TransferLocations(SourceTextBox.Text,
                                                                     DestinationTextBox.Text,
                                                                     Logging.Checked));
            //the timer value is in milliseconds, but the interval is in minutes
            _autoCopy.CopyInterval = (double)CopyInterval.Value * 60 * 1000;

            _autoCopy.StartIntervalCopy();

            StopAutoCopy.Enabled = true;
        }