Exemplo n.º 1
0
 public TestWorkerClass(int duration, int minTime, int maxTime, List<string> sourcePaths, List<string> destPaths, TestInfo testInfo, BackgroundWorker bgWorker, DoWorkEventArgs e, List<string> filters, bool burstMode)
 {
     _sourcePaths = sourcePaths;
     _destPaths = destPaths;
     _testInfo = testInfo;
     _duration = duration;
     _bgWorker = bgWorker;
     _minTime = minTime * 1000;
     _maxTime = burstMode ? maxTime : maxTime * 1000;
     _e = e;
     _filters = filters;
     _burstMode = burstMode;
     StartTest();
 }
Exemplo n.º 2
0
        private void buttonVerifyMetadata_Click(object sender, EventArgs e)
        {
            if (listBoxDestPaths.Items.Count > 0)
            {
                if (_testInfo == null)
                {
                    _testInfo = new TestInfo();
                    _testInfo.Propagated = true;
                }

                _testState = VerifyWorkerClass.TesterState.VerifyMeta;

                backgroundWorker1.RunWorkerAsync(_testInfo);
                Cursor = Cursors.WaitCursor;
            }
        }
Exemplo n.º 3
0
        private void ProcessVerifierResults(TestInfo info)
        {
            AppendLog("----- START OF VERIFICATION -----");
            AppendLog(DateTime.Now.ToString());
            if (info.Passed.HasValue)
                AppendLog("RESULTS: " + ((bool)info.Passed ? "PASSED." : "FAILED"));

            if (!(bool)info.Passed)
            {
                foreach (LazyFileCompare file in info.FileResults)
                    AppendLog(file.ToString());

                foreach (LazyFolderCompare folder in info.FolderResults)
                    AppendLog(folder.ToString());
            }
            AppendLog("----- END OF VERIFICATION -----");
            AppendLog(string.Empty);
        }
Exemplo n.º 4
0
 public List<string> AddToFilter(string s)
 {
     _testInfo = null;
     _filters.Add(s);
     return _filters;
 }
Exemplo n.º 5
0
 public List<string> AddToDest(string s)
 {
     _testInfo = null;
     _destPaths.Add(s);
     return _destPaths;
 }
Exemplo n.º 6
0
 public List<string> AddToSource(string s)
 {
     _testInfo = null;
     _sourcePaths.Add(s);
     return _sourcePaths;
 }
Exemplo n.º 7
0
        private void buttonPropagate_Click(object sender, EventArgs e)
        {
            try
            {
                if (listBoxSourcePaths.Items.Count > 0 && listBoxDestPaths.Items.Count > 0 &&
                    Convert.ToInt32(textBoxDuration.Text) > 0 && Convert.ToInt32(textBoxMinWaitTime.Text) >= 0 && (checkBoxBurst.Checked ? Convert.ToInt32(textBoxMaxWaitTime.Text) >= 0 : (Convert.ToInt32(textBoxMaxWaitTime.Text) >= Convert.ToInt32(textBoxMinWaitTime.Text))))
                {
                    ToggleAllControls(Action.Propagate);
                    _testInfo = new TestInfo();
                    backgroundWorker1.RunWorkerAsync(_testInfo);
                }

            }
            catch (FormatException) { }
            catch (OverflowException) { }
        }