public SearchWindow(IGlycoPeptideSearchEngine engine) { InitializeComponent(); this.engine = engine; StartScan = MinScan = engine.GetFirstScan(); EndScan = MaxScan = engine.GetLastScan(); start.Text = StartScan.ToString(); end.Text = EndScan.ToString(); }
private void Start_TextChanged(object sender, TextChangedEventArgs e) { int value = -1; if (Int32.TryParse(start.Text, out value)) { if (value <= MaxScan && value >= MinScan) { StartScan = value; } } else { start.Text = StartScan.ToString(); } }