public EditRootSymbolWindow(UnderlyingSymbol symbol) { InitializeComponent(); DataContext = this; if (symbol == null) { TheSymbol = new UnderlyingSymbol { Rule = new ExpirationRule(), ID = -1 }; ModifyBtn.Content = "Add"; } else { _originalSymbol = symbol; TheSymbol = (UnderlyingSymbol)symbol.Clone(); ModifyBtn.Content = "Modify"; } //set the corrent radio box check if (TheSymbol.Rule.ReferenceDayIsLastBusinessDayOfMonth) { LastBusinessDayRadioBtn.IsChecked = true; } else if (TheSymbol.Rule.ReferenceUsesDays) { DaysBasedRefCheckBox.IsChecked = true; } else { WeeksBasedRefCheckBox.IsChecked = true; } }
public EditRootSymbolWindow(UnderlyingSymbol symbol) { InitializeComponent(); DataContext = this; if (symbol == null) { TheSymbol = new UnderlyingSymbol { Rule = new ExpirationRule(), ID = -1 }; ModifyBtn.Content = "Add"; } else { _originalSymbol = symbol; TheSymbol = (UnderlyingSymbol)symbol.Clone(); ModifyBtn.Content = "Modify"; } }