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