Пример #1
0
 public static void Start(SymbologyTestPlan testPlan,
     string rootFolder, bool overwriteFiles,
     bool flattenHierarchy)
 {
     Start (testPlan, rootFolder, overwriteFiles,
         flattenHierarchy, 30);
 }
Пример #2
0
 public static void Start(SymbologyTestPlan testPlan,
                          string rootFolder, bool overwriteFiles,
                          bool flattenHierarchy)
 {
     Start(testPlan, rootFolder, overwriteFiles,
           flattenHierarchy, 30);
 }
Пример #3
0
        private void OnOpenTestPlan(object sender, EventArgs e)
        {
            if (SaveModified() &&
                openFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                // Open XML file reader
                // TODO: Incorporate schema based validation
                XmlReaderSettings readerConfig = new XmlReaderSettings();
                readerConfig.CloseInput       = true;
                readerConfig.ConformanceLevel = ConformanceLevel.Document;
                readerConfig.IgnoreComments   = true;

                using (XmlReader xmlReader = XmlReader.Create(
                           new FileStream(openFileDialog.FileName, FileMode.Open,
                                          FileAccess.Read, FileShare.Read), readerConfig))
                {
                    // Pass to XmlSerializer
                    XmlSerializer xmlSerializer = new XmlSerializer(
                        typeof(SymbologyTestPlan),
                        new Type[] { typeof(SymbologyTestGroup),
                                     typeof(SymbologyTestItem) });
                    _testPlan = (SymbologyTestPlan)xmlSerializer.Deserialize(xmlReader);

                    // Close xml reader and cache name
                    xmlReader.Close();
                    _testPlanPathName = openFileDialog.FileName;
                }

                // Refresh tree clear modified and update title
                RefreshTree();
                ClearTestPlanModified();
                UpdateTitle();
            }
        }
Пример #4
0
        private void AddTestCase(BarcodeSymbology symbology, string text)
        {
            if (_testPlan == null)
            {
                _testPlan = new SymbologyTestPlan();
            }
            _testPlan.AddTestCase(symbology, text);
            SetTestPlanModified();

            RefreshTree();
        }
Пример #5
0
 private void OnNewTestPlan(object sender, EventArgs e)
 {
     // Ensure pending changes are saved
     if (SaveModified())
     {
         _testPlan         = new SymbologyTestPlan("default");
         _testPlanPathName = null;
         RefreshTree();
         ClearTestPlanModified();
         UpdateTitle();
     }
 }
Пример #6
0
        public static void Start(SymbologyTestPlan testPlan, 
            string rootFolder, bool overwriteFiles,
            bool flattenHierarchy, int maxBarHeight)
        {
            ExportWorkerState state = new ExportWorkerState ();
            state.TestPlan = testPlan;
            state.Folder = rootFolder;
            state.OverwriteFiles = overwriteFiles;
            state.FlattenHierarchy = flattenHierarchy;
            state.MaxBarHeight = maxBarHeight;

            new Thread (new ParameterizedThreadStart (WorkerThread)).Start (state);
        }
Пример #7
0
        public static void Start(SymbologyTestPlan testPlan,
                                 string rootFolder, bool overwriteFiles,
                                 bool flattenHierarchy, int maxBarHeight)
        {
            ExportWorkerState state = new ExportWorkerState();

            state.TestPlan         = testPlan;
            state.Folder           = rootFolder;
            state.OverwriteFiles   = overwriteFiles;
            state.FlattenHierarchy = flattenHierarchy;
            state.MaxBarHeight     = maxBarHeight;

            new Thread(new ParameterizedThreadStart(WorkerThread)).Start(state);
        }