VsICoreAnalyzerConfiguration VsICoreAnalyzerPage.GetConfiguration() { VsEdgeDetectionConfiguration cfg = new VsEdgeDetectionConfiguration(); cfg.ThresholdStrong = this.trackBar1.Value; cfg.ThresholdWeak = this.trackBar2.Value; return(cfg); }
VsICoreAnalyzerConfiguration VsICoreAnalyzerPage.GetConfiguration() { VsEdgeDetectionConfiguration cfg = new VsEdgeDetectionConfiguration(); cfg.ThresholdStrong = this.trackBar1.Value; cfg.ThresholdWeak = this.trackBar2.Value; return cfg; }
void VsICoreAnalyzerDescription.SaveConfiguration(System.Xml.XmlTextWriter writer, VsICoreAnalyzerConfiguration config) { VsEdgeDetectionConfiguration cfg = (VsEdgeDetectionConfiguration)config; if (cfg != null) { writer.WriteAttributeString("ThresholdStrong", cfg.ThresholdStrong.ToString()); writer.WriteAttributeString("ThresholdWeak", cfg.ThresholdWeak.ToString()); } }
void VsICoreAnalyzerPage.SetConfiguration(VsICoreAnalyzerConfiguration config) { VsEdgeDetectionConfiguration cfg = (VsEdgeDetectionConfiguration)config; if (cfg != null) { this.trackBar1.Value = cfg.ThresholdStrong; this.trackBar2.Value = cfg.ThresholdWeak; } }
VsICoreAnalyzerConfiguration VsICoreAnalyzerDescription.LoadConfiguration(Hashtable reader) { VsEdgeDetectionConfiguration config = new VsEdgeDetectionConfiguration(); try { config.LoadConfiguration(reader); } catch (Exception) { } return(config); }
VsICoreAnalyzerConfiguration VsICoreAnalyzerDescription.LoadConfiguration(System.Xml.XmlTextReader reader) { VsEdgeDetectionConfiguration config = new VsEdgeDetectionConfiguration(); try { config.ThresholdStrong = int.Parse(reader.GetAttribute("ThresholdStrong")); config.ThresholdWeak = int.Parse(reader.GetAttribute("ThresholdWeak")); } catch (Exception) { } return(config); }
VsICoreAnalyzer VsICoreAnalyzerDescription.CreateAnalyser(long syncTimer, VsICoreAnalyzerConfiguration config) { VsEdgeDetectionConfiguration cfg = (VsEdgeDetectionConfiguration)config; if (cfg != null) { VsEdgeDetection analyser = new VsEdgeDetection(syncTimer); analyser.AnalyzerConfiguration = cfg.GetConfiguration(); return((VsEdgeDetection)analyser); } return(null); }
VsICoreAnalyzerConfiguration VsICoreAnalyzerDescription.LoadConfiguration(System.Xml.XmlTextReader reader) { VsEdgeDetectionConfiguration config = new VsEdgeDetectionConfiguration(); try { config.ThresholdStrong = int.Parse(reader.GetAttribute("ThresholdStrong")); config.ThresholdWeak = int.Parse(reader.GetAttribute("ThresholdWeak")); } catch (Exception) { } return config; }
VsICoreAnalyzerConfiguration VsICoreAnalyzerDescription.LoadConfiguration(Hashtable reader) { VsEdgeDetectionConfiguration config = new VsEdgeDetectionConfiguration(); try { config.LoadConfiguration(reader); } catch (Exception) { } return config; }