public LogisticProperties( DashboardHelper dashboardHelper, IGadget gadget, LogisticParameters parameters ) { InitializeComponent(); this.DashboardHelper = dashboardHelper; this.Gadget = gadget; this.Parameters = parameters; List<string> fields = new List<string>(); List<FieldInfo> items = new List<FieldInfo>(); List<string> crosstabFields = new List<string>(); List<string> strataFields = new List<string>(); crosstabFields.Add(string.Empty); items.Add(new FieldInfo() { Name = "", DataType = "", VariableCategory = VariableCategory.Field }); foreach (string fieldName in DashboardHelper.GetFieldsAsList()) { items.Add(new FieldInfo() { Name = fieldName, DataType = DashboardHelper.GetColumnDbType(fieldName).ToString(), VariableCategory = VariableCategory.Field }); fields.Add(fieldName); crosstabFields.Add(fieldName); strataFields.Add(fieldName); } fields.Sort(); crosstabFields.Sort(); cbxFieldOutcome.ItemsSource = fields; cbxFieldWeight.ItemsSource = fields; cbxFieldMatch.ItemsSource = crosstabFields; // lbxOtherFields.ItemsSource = strataFields; cbxFields.ItemsSource = fields; CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(cbxFieldOutcome.ItemsSource); PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory"); view.GroupDescriptions.Add(groupDescription); RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as LogisticRegressionControl).DataFilters, true); RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; panelFilters.Children.Add(RowFilterControl); }
protected override void Construct() { if (!string.IsNullOrEmpty(CustomOutputHeading) && !CustomOutputHeading.Equals("(none)")) { headerPanel.Text = CustomOutputHeading; } Parameters = new LogisticParameters(); this.IsProcessing = false; this.GadgetStatusUpdate += new GadgetStatusUpdateHandler(RequestUpdateStatusMessage); this.GadgetCheckForCancellation += new GadgetCheckForCancellationHandler(IsCancelled); cbxFields.SelectionChanged += new SelectionChangedEventHandler(cbxFields_SelectionChanged); mnuSendToBack.Click += new RoutedEventHandler(mnuSendToBack_Click); mnuClose.Click += new RoutedEventHandler(mnuClose_Click); // Init gadget parameters with default values GadgetOptions = new GadgetParameters(); GadgetOptions.ShouldIncludeFullSummaryStatistics = true; GadgetOptions.ShouldIncludeMissing = false; GadgetOptions.ShouldSortHighToLow = false; GadgetOptions.ShouldUseAllPossibleValues = false; GadgetOptions.StrataVariableNames = new List<string>(); base.Construct(); }