public void SetFilter()
 {
     //--for filters
     rowfiltercontrol = new RowFilterControl(dashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, dashboardHelper.DataFilters, true);
     rowfiltercontrol.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
     rowfiltercontrol.VerticalAlignment   = System.Windows.VerticalAlignment.Top;
     if (HasFilter())
     {
         RemoveFilter();
     }
     panelFilter.Children.Add(rowfiltercontrol);
 }
        public PMCCProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            PMCCParameters parameters,
            List <Grid> strataGridList
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;

            List <string> fields       = new List <string>();
            List <string> weightFields = new List <string>();
            List <string> strataItems  = new List <string>();

            //Variable fields
            fields.Add(String.Empty);
            ColumnDataType columnDataType = ColumnDataType.Boolean | ColumnDataType.DateTime | ColumnDataType.Numeric | ColumnDataType.Text | ColumnDataType.UserDefined;

            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        fields.Add(fieldName);
                    }
                }
                else
                {
                    fields.Add(fieldName);
                }
            }

            if (fields.Contains("SYSTEMDATE"))
            {
                fields.Remove("SYSTEMDATE");
            }

            //Weight Fields
            //weightFields.Add(String.Empty);
            //columnDataType = ColumnDataType.Numeric | ColumnDataType.UserDefined;
            //foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            //{
            //    if (DashboardHelper.IsUsingEpiProject)
            //    {
            //        if (!(fieldName == "RecStatus")) weightFields.Add(fieldName);
            //    }
            //    else
            //    {
            //        weightFields.Add(fieldName);
            //    }
            //}
            //weightFields.Sort();

            //Strata Fields
            strataItems.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.Boolean | ColumnDataType.Text | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus" || fieldName == "FKEY" || fieldName == "GlobalRecordId"))
                    {
                        strataItems.Add(fieldName);
                    }
                }
                else
                {
                    strataItems.Add(fieldName);
                }
            }

            if (DashboardHelper.IsUsingEpiProject)
            {
                if (fields.Contains("RecStatus"))
                {
                    fields.Remove("RecStatus");
                }
                if (weightFields.Contains("RecStatus"))
                {
                    weightFields.Remove("RecStatus");
                }

                if (strataItems.Contains("RecStatus"))
                {
                    strataItems.Remove("RecStatus");
                }
                if (strataItems.Contains("FKEY"))
                {
                    strataItems.Remove("FKEY");
                }
                if (strataItems.Contains("GlobalRecordId"))
                {
                    strataItems.Remove("GlobalRecordId");
                }
            }

            List <string> allFieldNames = new List <string>();

            allFieldNames.AddRange(fields);
            allFieldNames.AddRange(DashboardHelper.GetAllGroupsAsList());

            cbxExposureField.ItemsSource = allFieldNames;
            cbxOutcomeField.ItemsSource  = fields;
            //cbxFieldWeight.ItemsSource = weightFields;
            lbxFieldStrata.ItemsSource = strataItems;

            if (cbxExposureField.Items.Count > 0)
            {
                cbxExposureField.SelectedIndex = -1;
                cbxOutcomeField.SelectedIndex  = -1;
            }

            //if (cbxFieldWeight.Items.Count > 0)
            //{
            //    cbxFieldWeight.SelectedIndex = -1;
            //}

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(cbxExposureField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as PMCCControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            txtMaxColumnLength.PreviewKeyDown += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);

            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_MPC_CONTROL;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_EXPOSURE_OUTCOME;
            tbtnValueMapping.Title         = DashboardSharedStrings.GADGET_TABBUTTON_DEFINE_VALMAPPING;
            tbtnValueMapping.Description   = DashboardSharedStrings.GADGET_SPECIFY_EXPOSURE_OUTCOME;
            tbtnDisplay.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description           = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description           = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariables.Content      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelValueMappingTxt.Text   = DashboardSharedStrings.GADGET_DEFINE_VALUE_MAPPING;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockExposureField.Text          = DashboardSharedStrings.GADGET_EXPOSURE_VARIABLE;
            tblockOutcomeField.Text           = DashboardSharedStrings.GADGET_CASE_CONTROL;
            tblockStrataVariable.Text         = DashboardSharedStrings.GADGET_PAIR_GROUP_ID;
            tblockAllValues.Text              = DashboardSharedStrings.GADGET_ALL_VALUES;
            tblockYesValues.Text              = DashboardSharedStrings.GADGET_YES_VALUES;
            tblockNoValues.Text               = DashboardSharedStrings.GADGET_NO_VALUES;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelDataFilter.Content     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnly.Content = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;
            ////expanderAdvancedOptions.Header = DashboardSharedStrings.GADGET_ADVANCED_OPTIONS;
            ////expanderDisplayOptions.Header = DashboardSharedStrings.GADGET_DISPLAY_OPTIONS;
            //tblockMainVariable.Text = DashboardSharedStrings.GADGET_FREQUENCY_VARIABLE;
            //tblockStrataVariable.Text = DashboardSharedStrings.GADGET_STRATA_VARIABLE;
            //tblockWeightVariable.Text = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;

            ////checkboxAllValues.Content = DashboardSharedStrings.GADGET_ALL_LIST_VALUES;
            ////checkboxCommentLegalLabels.Content = DashboardSharedStrings.GADGET_LIST_LABELS;
            //checkboxIncludeMissing.Content = DashboardSharedStrings.GADGET_INCLUDE_MISSING;

            //checkboxSortHighLow.Content = DashboardSharedStrings.GADGET_SORT_HI_LOW;
            //checkboxUsePrompts.Content = DashboardSharedStrings.GADGET_USE_FIELD_PROMPT;
            ////tblockOutputColumns.Text = DashboardSharedStrings.GADGET_OUTPUT_COLUMNS_DISPLAY;
            ////tblockPrecision.Text = DashboardSharedStrings.GADGET_DECIMALS_TO_DISPLAY;

            //tblockRows.Text = DashboardSharedStrings.GADGET_MAX_ROWS_TO_DISPLAY;
            //tblockBarWidth.Text = DashboardSharedStrings.GADGET_MAX_PERCENT_BAR_WIDTH;

            ////btnRun.Content = DashboardSharedStrings.GADGET_RUN_BUTTON;
            #endregion // Translation
        }
        public DuplicatesListProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            DuplicatesListParameters parameters,
            List <Grid> strataGridList,
            List <string> columnOrder
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;
            this.ColumnOrder     = columnOrder;

            List <FieldInfo> items  = new List <FieldInfo>();
            List <string>    fields = new List <string>();

            foreach (string fieldName in DashboardHelper.GetFieldsAsList())
            {
                items.Add(new FieldInfo()
                {
                    Name             = fieldName,
                    DataType         = DashboardHelper.GetColumnDbType(fieldName).ToString(),
                    VariableCategory = VariableCategory.Field
                });

                fields.Add(fieldName);
            }

            foreach (string fieldName in DashboardHelper.GetAllGroupsAsList())
            {
                FieldInfo fieldInfo = new FieldInfo()
                {
                    Name             = fieldName,
                    DataType         = String.Empty,
                    VariableCategory = VariableCategory.Group
                };
                items.Add(fieldInfo);
            }

            /// USED ONLY FOR PAGES
            //if (DashboardHelper.IsUsingEpiProject)
            //{
            //    for (int i = 0; i < DashboardHelper.View.Pages.Count; i++)
            //    {
            //        items.Add(new FieldInfo()
            //        {
            //            Name = "Page " + (i + 1).ToString(),
            //            DataType = String.Empty,
            //            VariableCategory = VariableCategory.Page
            //        });
            //    }
            //}

            fields.Sort();

            lvVariables.ItemsSource        = items;
            lvDisplayVariables.ItemsSource = items;

            cmbGroupField.ItemsSource          = fields;
            cmbSecondaryGroupField.ItemsSource = fields;

            foreach (string fieldName in fields)
            {
                lbxAvailableVariables.Items.Add(fieldName);
            }

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(lvVariables.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as EpiDashboard.Gadgets.Analysis.DuplicatesListControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);



            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_DUPLICATESLIST;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_MEANS;
            tbtnDisplay.Title       = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title       = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description = DashboardSharedStrings.GADGET_TABDESC_FILTERS;

            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text                   = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                    = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockDimensionsTxt.Text              = DashboardSharedStrings.GADGET_DIMENSIONS;
            tblockPanelOutputOptTxt.Text          = DashboardSharedStrings.GADGET_OUTPUT_OPTIONS;
            checkboxUsePromptsTxt.Text            = DashboardSharedStrings.GADGET_USE_FIELD_PROMPTS;
            checkboxListLabelsTxt.Text            = DashboardSharedStrings.GADGET_DISPLAY_LIST_LABELS;
            checkboxColumnHeadersTxt.Text         = DashboardSharedStrings.GADGET_SHOW_COLUMN_HEADINGS;
            checkboxShowNullsTxt.Text             = DashboardSharedStrings.GADGET_SHOW_MISSING_REP;
            checkboxTabOrderTxt.Text              = DashboardSharedStrings.EXPORT_SORT_BY_TAB_ORDER;
            tblockKeyDuplicateCheckingTxt.Text    = DashboardSharedStrings.GADGET_KEY_DUPCHECKING;
            tblockAdditionalFieldsDisplayTxt.Text = DashboardSharedStrings.GADGET_ADDITIONAL_FIELDS_DISPLAY;
            checkboxLineColumnTxt.Text            = DashboardSharedStrings.GADGET_SHOW_ROW_NUM;
            tblockMaxWidthTxt.Text                = DashboardSharedStrings.GADGET_MAX_WIDTH;
            tblockMaxHeightTxt.Text               = DashboardSharedStrings.GADGET_MAX_HEIGHT;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;

            #endregion // Translation
        }
        public CrosstabProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            CrosstabParameters parameters,
            List <Grid> strataGridList
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;

            List <string> fields       = new List <string>();
            List <string> weightFields = new List <string>();
            List <string> strataItems  = new List <string>();

            //Variable fields
            fields.Add(String.Empty);
            ColumnDataType columnDataType = ColumnDataType.Boolean | ColumnDataType.DateTime | ColumnDataType.Numeric | ColumnDataType.Text | ColumnDataType.UserDefined;

            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        fields.Add(fieldName);
                    }
                }
                else
                {
                    fields.Add(fieldName);
                }
            }

            if (fields.Contains("SYSTEMDATE"))
            {
                fields.Remove("SYSTEMDATE");
            }

            //Weight Fields
            weightFields.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        weightFields.Add(fieldName);
                    }
                }
                else
                {
                    weightFields.Add(fieldName);
                }
            }
            weightFields.Sort();

            //Strata Fields
            strataItems.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.Boolean | ColumnDataType.Text | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus" || fieldName == "FKEY" || fieldName == "GlobalRecordId"))
                    {
                        strataItems.Add(fieldName);
                    }
                }
                else
                {
                    strataItems.Add(fieldName);
                }
            }

            if (DashboardHelper.IsUsingEpiProject)
            {
                if (fields.Contains("RecStatus"))
                {
                    fields.Remove("RecStatus");
                }
                if (weightFields.Contains("RecStatus"))
                {
                    weightFields.Remove("RecStatus");
                }

                if (strataItems.Contains("RecStatus"))
                {
                    strataItems.Remove("RecStatus");
                }
                if (strataItems.Contains("FKEY"))
                {
                    strataItems.Remove("FKEY");
                }
                if (strataItems.Contains("GlobalRecordId"))
                {
                    strataItems.Remove("GlobalRecordId");
                }
            }

            List <string> allFieldNames = new List <string>();

            allFieldNames.AddRange(fields);
            allFieldNames.AddRange(DashboardHelper.GetAllGroupsAsList());

            cbxExposureField.ItemsSource = allFieldNames;
            cbxOutcomeField.ItemsSource  = fields;
            cbxFieldWeight.ItemsSource   = weightFields;
            lbxFieldStrata.ItemsSource   = strataItems;

            if (cbxExposureField.Items.Count > 0)
            {
                cbxExposureField.SelectedIndex = -1;
                cbxOutcomeField.SelectedIndex  = -1;
            }

            if (cbxFieldWeight.Items.Count > 0)
            {
                cbxFieldWeight.SelectedIndex = -1;
            }

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(cbxExposureField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as CrosstabControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            txtMaxColumnLength.PreviewKeyDown += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);

            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_CROSSTABULATION;

            tbtnVariables.Title          = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description    = DashboardSharedStrings.GADGET_TABDESC_EXPOSURE_OUTCOME;
            tbtnValueMapping.Title       = DashboardSharedStrings.GADGET_22_VALUE_MAPPING;
            tbtnValueMapping.Description = DashboardSharedStrings.GADGET_SPECIFY_EXPOSURE_OUTCOME;
            tbtnDisplay.Title            = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description      = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnDisplas.Title            = DashboardSharedStrings.GADGET_TAB_COLORS_STYLES;
            tbtnDisplas.Description      = DashboardSharedStrings.GADGET_TABDESC_COLORS_STYLES;
            tbtnFilters.Title            = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description      = DashboardSharedStrings.GADGET_TABDESC_FILTERS;

            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelValueMappingTxt.Text   = DashboardSharedStrings.GADGET_VALUE_MAPPING;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockPanelColorStyleTxt.Text     = DashboardSharedStrings.GADGET_PANEL_COLORS_STYLES;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockExposureField.Text          = DashboardSharedStrings.GADGET_EXPOSURE_VARIABLE;
            tblockOutcomeField.Text           = DashboardSharedStrings.GADGET_OUTCOME_VARIABLE;
            tblockWeightVariable.Text         = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;
            tblockStrataVariable.Text         = DashboardSharedStrings.GADGET_STRATA_VARIABLE;
            tblockAllValues.Text              = DashboardSharedStrings.GADGET_ALL_VALUES;
            tblockYesValues.Text              = DashboardSharedStrings.GADGET_YES_VALUES;
            tblockNoValues.Text               = DashboardSharedStrings.GADGET_NO_VALUES;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text           = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelOutputOptTxt.Text = DashboardSharedStrings.GADGET_OUTPUT_OPTIONS;

            checkboxAllValuesTxt.Text          = DashboardSharedStrings.GADGET_DISPLAY_LIST_VALUE;
            checkboxCommentLegalLabelsTxt.Text = DashboardSharedStrings.GADGET_LIST_LABELS;
            checkboxUsePromptsTxt.Text         = DashboardSharedStrings.GADGET_USE_FIELD_PROMPTS;
            checkboxIncludeMissingTxt.Text     = DashboardSharedStrings.GADGET_INCLUDE_MISSING;
            checkboxOutcomeContinuousTxt.Text  = DashboardSharedStrings.GADGET_OUTCOME_CONTINUOUS;
            checkboxSmartTableTxt.Text         = DashboardSharedStrings.GADGET_SMART_2X2;
            checkboxStrataSummaryOnlyTxt.Text  = DashboardSharedStrings.GADGET_STRATA_SUMMARY_ONLY;
            checkboxDisplayChiSqTxt.Text       = DashboardSharedStrings.GADGET_DISPLAY_CHISQUARE;
            checkboxRowColPercentsTxt.Text     = DashboardSharedStrings.GADGET_ROW_COL_PERCENTS;
            checkboxHorizontalTxt.Text         = DashboardSharedStrings.GADGET_DISPLAY_2X2_SUMMARY_HORIZONTALLY;

            tblockMaxColumnLength.Text         = DashboardSharedStrings.GADGET_MAX_COL_NAME_LENGTH;
            checkboxConditionalShadingTxt.Text = DashboardSharedStrings.GADGET_USE_CONDITIONAL_CELL_SHADING;
            tblockColorGradient.Text           = DashboardSharedStrings.GADGET_COLOR_GRADIENT;
            tblockTooltipLowColor.Content      = DashboardSharedStrings.GADGET_LOW_VALUE_COLOR;
            tblockTooltipHighColor.Content     = DashboardSharedStrings.GADGET_HIGH_VALUE_COLOR;
            tblockBreakType.Text = DashboardSharedStrings.GADGET_BREAK_TYPE;
            tblockBreak1.Text    = DashboardSharedStrings.GADGET_BREAK1;
            tblockBreak2.Text    = DashboardSharedStrings.GADGET_BREAK2;
            tblockBreak3.Text    = DashboardSharedStrings.GADGET_BREAK3;
            tblockBreak4.Text    = DashboardSharedStrings.GADGET_BREAK4;
            tblockBreak5.Text    = DashboardSharedStrings.GADGET_BREAK5;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            btnOKTxt.Text                 = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text             = DashboardSharedStrings.BUTTON_CANCEL;
            tblockColorsSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_COLORS;
            tblockStylesSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_STYLES;
            ////expanderAdvancedOptions.Header = DashboardSharedStrings.GADGET_ADVANCED_OPTIONS;
            ////expanderDisplayOptions.Header = DashboardSharedStrings.GADGET_DISPLAY_OPTIONS;
            //tblockMainVariable.Text = DashboardSharedStrings.GADGET_FREQUENCY_VARIABLE;
            //tblockStrataVariable.Text = DashboardSharedStrings.GADGET_STRATA_VARIABLE;
            //tblockWeightVariable.Text = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;

            ////checkboxAllValues.Content = DashboardSharedStrings.GADGET_ALL_LIST_VALUES;
            ////checkboxCommentLegalLabels.Content = DashboardSharedStrings.GADGET_LIST_LABELS;
            //checkboxIncludeMissing.Content = DashboardSharedStrings.GADGET_INCLUDE_MISSING;

            //checkboxSortHighLow.Content = DashboardSharedStrings.GADGET_SORT_HI_LOW;
            //checkboxUsePrompts.Content = DashboardSharedStrings.GADGET_USE_FIELD_PROMPTS;
            ////tblockOutputColumns.Text = DashboardSharedStrings.GADGET_OUTPUT_COLUMNS_DISPLAY;
            ////tblockPrecision.Text = DashboardSharedStrings.GADGET_DECIMALS_TO_DISPLAY;

            //tblockRows.Text = DashboardSharedStrings.GADGET_MAX_ROWS_TO_DISPLAY;
            //tblockBarWidth.Text = DashboardSharedStrings.GADGET_MAX_PERCENT_BAR_WIDTH;

            ////btnRun.Content = DashboardSharedStrings.GADGET_RUN_BUTTON;
            #endregion // Translation
        }
Exemplo n.º 5
0
        public ScatterChartProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            ScatterChartParameters parameters,
            List <Grid> strataGridList
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;

            List <string> fields      = new List <string>();
            List <string> strataItems = new List <string>();

            //Variable fields
            fields.Add(String.Empty);
            ColumnDataType columnDataType = ColumnDataType.Numeric | ColumnDataType.UserDefined;

            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        fields.Add(fieldName);
                    }
                }
                else
                {
                    fields.Add(fieldName);
                }
            }
            cmbField.ItemsSource   = fields;
            cmbOutcome.ItemsSource = fields;

            //Strata Fields
            //strataItems.Add(String.Empty);
            //columnDataType = ColumnDataType.Numeric | ColumnDataType.Boolean | ColumnDataType.Text | ColumnDataType.UserDefined;
            //foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            //{
            //    if (DashboardHelper.IsUsingEpiProject)
            //    {
            //        if (!(fieldName == "RecStatus" || fieldName == "FKEY" || fieldName == "GlobalRecordId")) strataItems.Add(fieldName);
            //    }
            //    else
            //    {
            //        strataItems.Add(fieldName);
            //    }
            //}
            //--Ei-196
            //txtYAxisLabelValue.Text = "Count";
            txtYAxisLabelValue.Text = string.Empty;
            //--
            txtXAxisLabelValue.Text      = String.Empty;
            txtXAxisLabelValue.IsEnabled = false;
            cmbLegendDock.SelectedIndex  = 1;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(cmbField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as ScatterChartGadget).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            txtWidth.PreviewKeyDown          += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);
            txtHeight.PreviewKeyDown         += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);
            txtLegendFontSize.PreviewKeyDown += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);

            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_SCATTER_CHART;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_SCATTER_CHART;
            tbtnDisplay.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description           = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnDisplayColors.Title           = DashboardSharedStrings.GADGET_TAB_COLORS_STYLES;
            tbtnDisplayColors.Description     = DashboardSharedStrings.GADGET_TABDESC_COLORS_STYLES;
            tbtnDisplayLabels.Title           = DashboardSharedStrings.GADGET_TABBUTTON_LABELS;
            tbtnDisplayLabels.Description     = DashboardSharedStrings.GADGET_TABDESC_LABELS;
            tbtnDisplayLegend.Title           = DashboardSharedStrings.GADGET_TABBUTTON_LEGEND;
            tbtnDisplayLegend.Description     = DashboardSharedStrings.GADGET_TABDESC_LEGEND;
            tbtnFilters.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description           = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockMainVariable.Text           = DashboardSharedStrings.GADGET_MAIN_VARIABLE;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockDimensionsTxt.Text          = DashboardSharedStrings.GADGET_DIMENSIONS;
            tblockWidth.Text  = DashboardSharedStrings.GADGET_WIDTH;
            tblockHeight.Text = DashboardSharedStrings.GADGET_HEIGHT;
            tblockPanelColorsNStylesTxt.Text = DashboardSharedStrings.GADGET_PANEL_COLORS_STYLES;
            tblockColorsSubheaderTxt.Text    = DashboardSharedStrings.GADGET_PANELSUBHEADER_COLORS;
            tblockPalette.Text                = DashboardSharedStrings.GADGET_COLOR_PALETTE;
            tblockStylesSubheaderTxt.Text     = DashboardSharedStrings.GADGET_PANELSUBHEADER_STYLES;
            tblockPanelLabelsTxt.Text         = DashboardSharedStrings.GADGET_PANELSHEADER_LABELS;
            tblockYAxisSubheaderTxt.Text      = DashboardSharedStrings.GADGET_PANELSUBHEADER_YAXIS;
            tblockYAxisLabelValue.Text        = DashboardSharedStrings.GADGET_YAXIS_LABEL;
            tblockXAxisSubheaderTxt.Text      = DashboardSharedStrings.GADGET_XAXIS;
            tblockXAxisLabelType.Text         = DashboardSharedStrings.GADGET_XAXIS_LABEL_TYPE;
            tblockXAxisLabelValue.Text        = DashboardSharedStrings.GADGET_XAXIS_LABEL;
            tblockXAxisAngle.Text             = DashboardSharedStrings.GADGET_XAXIS_ANGLE;
            tblockTitleSubTitleTxt.Text       = DashboardSharedStrings.GADGET_SUBHEADER_TITLESUBTITLE;
            tblockChartTitleValue.Text        = DashboardSharedStrings.GADGET_CHART_TITLE;
            tblockChartSubTitleValue.Text     = DashboardSharedStrings.GADGET_CHART_SUBTITLE;
            tblockPanelLegendTxt.Text         = DashboardSharedStrings.GADGET_PANEL_LEGEND;
            checkboxShowLegendTxt.Text        = DashboardSharedStrings.GADGET_SHOW_LEGEND;
            checkboxShowLegendBorderTxt.Text  = DashboardSharedStrings.GADGET_SHOW_LEGEND_BORDER;
            checkboxShowVarNameTxt.Text       = DashboardSharedStrings.GADGET_SHOW_VARIABLE_NAME;
            tblockLegendFontSize.Text         = DashboardSharedStrings.GADGET_LEGEND_FONTSIZE;
            tblockLegendDock.Text             = DashboardSharedStrings.GADGET_LEGEND_PLACEMENT;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockOutcomeVariable.Text        = DashboardSharedStrings.GADGET_OUTCOME_VARIABLE;
            tblockMarkerType.Text             = DashboardSharedStrings.GADGET_MARKER_TYPE;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;

            #endregion // Translation
        }
        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);



            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_LOGISTIC_REGRESSION;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_LOGISTIC_REGRESSION;
            tbtnDisplay.Title                  = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description            = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title                  = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description            = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariablesTxt.Text       = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockOutcomeVariableTxt.Text      = DashboardSharedStrings.GADGET_OUTCOME_VARIABLE;
            tblockWeightVariableTxt.Text       = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;
            checkboxIncludeMissingTxt.Text     = DashboardSharedStrings.GADGET_INCLUDE_MISSING;
            tblockPanelSortingTxt.Text         = DashboardSharedStrings.GADGET_PANELHEADER_SORTING;
            tblockGroupingSubheaderTxt.Text    = DashboardSharedStrings.GADGET_PANELSUBHEADER_GROUPING;
            tblockSortingSubheaderTxt.Text     = DashboardSharedStrings.GADGET_PANELSUBHEADER_SORTING;
            tblockSortMethodTxt.Text           = DashboardSharedStrings.GADGET_SORT_METHOD;
            tblockPanelDisplayTxt.Text         = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockTitleNDescSubheaderTxt.Text  = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text                = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                 = DashboardSharedStrings.GADGET_DESCRIPTION;
            checkboxListLabelsTxt.Text         = DashboardSharedStrings.GADGET_DISPLAY_LIST_LABELS;
            tblockPanelDataFilterTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text  = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            checkboxShowANOVATxt.Text          = DashboardSharedStrings.GADGET_DISPLAY_ANOVA;
            tblockGroupbyTxt.Text              = DashboardSharedStrings.GADGET_GROUP_BY;
            tblockSubGroupByTxt.Text           = DashboardSharedStrings.GADGET_SUBGROUP_BY;
            tblockAvailableVariablesTxt.Text   = DashboardSharedStrings.GADGET_AVAILABLE_VARIABLES;
            tblockSortOrderTxt.Text            = DashboardSharedStrings.GADGET_SORT_ORDER;
            checkboxLineColumnTxt.Text         = DashboardSharedStrings.GADGET_SHOW_LINE_COLUMN;
            checkboxColumnHeadersTxt.Text      = DashboardSharedStrings.GADGET_SHOW_COLUMN_HEADINGS;
            checkboxShowNullsTxt.Text          = DashboardSharedStrings.GADGET_SHOW_MISSING_REP;
            tblockPrecision.Text               = DashboardSharedStrings.GADGET_DECIMALS_TO_DISPLAY;
            tblockOutputColumns.Text           = DashboardSharedStrings.GADGET_OUTPUT_COLUMNS_DISPLAY;
            btnMakeDummyTxt.Text               = DashboardSharedStrings.GADGET_MAKE_DUMMY;
            btnClearInteractionTermsTxt.Text   = DashboardSharedStrings.GADGET_CLEAR_TERMS;
            tblockConfidenceLimitsTxt.Text     = DashboardSharedStrings.GADGET_CONFIDENCE_LIMITS;
            tblockDummyVariables.Text          = DashboardSharedStrings.GADGET_DUMMY_VARIABLES;
            tblockInteractionTerms.Text        = DashboardSharedStrings.GADGET_INTERACTION_TERMS;
            checkboxNoInterceptTxt.Text        = DashboardSharedStrings.GADGET_NO_INTERCEPT;
            tblockIndependentVariablesTxt.Text = DashboardSharedStrings.GADGET_INDEPENDENT_VARIABLES;
            tblockMatchVariableTxt.Text        = DashboardSharedStrings.GADGET_MATCH_VARIABLE;
            btnRunTxt.Text    = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;

            #endregion // Translation
        }
        public ComplexSampleCrosstabProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            ComplexSampleCrosstabParameters parameters,
            List <Grid> strataGridList
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;

            List <string> fields       = new List <string>();
            List <string> weightFields = new List <string>();
            List <string> strataItems  = new List <string>();

            //Variable fields
            fields.Add(String.Empty);
            ColumnDataType columnDataType = ColumnDataType.Boolean | ColumnDataType.DateTime | ColumnDataType.Numeric | ColumnDataType.Text | ColumnDataType.UserDefined;

            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        fields.Add(fieldName);
                    }
                }
                else
                {
                    fields.Add(fieldName);
                }
            }

            if (fields.Contains("SYSTEMDATE"))
            {
                fields.Remove("SYSTEMDATE");
            }

            //Weight Fields
            weightFields.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        weightFields.Add(fieldName);
                    }
                }
                else
                {
                    weightFields.Add(fieldName);
                }
            }
            weightFields.Sort();

            //Strata Fields
            strataItems.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.Boolean | ColumnDataType.Text | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus" || fieldName == "FKEY" || fieldName == "GlobalRecordId"))
                    {
                        strataItems.Add(fieldName);
                    }
                }
                else
                {
                    strataItems.Add(fieldName);
                }
            }

            if (DashboardHelper.IsUsingEpiProject)
            {
                if (fields.Contains("RecStatus"))
                {
                    fields.Remove("RecStatus");
                }
                if (weightFields.Contains("RecStatus"))
                {
                    weightFields.Remove("RecStatus");
                }

                if (strataItems.Contains("RecStatus"))
                {
                    strataItems.Remove("RecStatus");
                }
                if (strataItems.Contains("FKEY"))
                {
                    strataItems.Remove("FKEY");
                }
                if (strataItems.Contains("GlobalRecordId"))
                {
                    strataItems.Remove("GlobalRecordId");
                }
            }

            List <string> allFieldNames = new List <string>();

            allFieldNames.AddRange(fields);
            allFieldNames.AddRange(DashboardHelper.GetAllGroupsAsList());

            cbxExposureField.ItemsSource = allFieldNames;
            cbxOutcomeField.ItemsSource  = fields;
            cbxFieldWeight.ItemsSource   = weightFields;
            cbxFieldStrata.ItemsSource   = strataItems;
            cbxFieldPSU.ItemsSource      = strataItems;

            if (cbxExposureField.Items.Count > 0)
            {
                cbxExposureField.SelectedIndex = -1;
                cbxOutcomeField.SelectedIndex  = -1;
            }

            if (cbxFieldWeight.Items.Count > 0)
            {
                cbxFieldWeight.SelectedIndex = -1;
            }

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(cbxExposureField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as ComplexSampleTablesControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);


            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_COMPLEX_TABLES;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_COMPLEX_TABLES;
            tbtnDisplay.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description           = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description           = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockWeightVariable.Text         = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockStrataVariable.Text         = DashboardSharedStrings.GADGET_STRATA_VARIABLE;
            tblockPSU.Text           = DashboardSharedStrings.GADGET_PSU;
            tblockOutcomeField.Text  = DashboardSharedStrings.GADGET_OUTCOME_VARIABLE;
            tblockExposureField.Text = DashboardSharedStrings.GADGET_EXPOSURE_VARIABLE;
            btnOKTxt.Text            = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text        = DashboardSharedStrings.BUTTON_CANCEL;
            #endregion // Translation
        }
Exemplo n.º 8
0
        public WordCloudProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            IGadgetParameters parameters
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = (parameters as WordCloudParameters);

            //List<FieldInfo> items = new List<FieldInfo>();
            //List<string> fields = new List<string>();

            List <string>  fieldNames     = new List <string>();
            ColumnDataType columnDataType = ColumnDataType.Boolean | ColumnDataType.DateTime | ColumnDataType.Numeric | ColumnDataType.Text | ColumnDataType.UserDefined | ColumnDataType.UserDefined;

            fieldNames = DashboardHelper.GetFieldsAsList(columnDataType);

            ///////FOR ENABLING MULTI-SELECT USING THE LISTVIEW IN THE FUTURE (As done in CombinedFrequency Properties)  ////////////////////
            //foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            //{
            //    items.Add(new FieldInfo()
            //    {
            //        Name = fieldName,
            //        DataType = DashboardHelper.GetColumnDbType(fieldName).ToString(),
            //        VariableCategory = VariableCategory.Field
            //    });

            //    fields.Add(fieldName);
            //}

            //foreach (string fieldName in DashboardHelper.GetAllGroupsAsList())
            //{
            //    FieldInfo fieldInfo = new FieldInfo()
            //    {
            //        Name = fieldName,
            //        DataType = String.Empty,
            //        VariableCategory = VariableCategory.Group
            //    };
            //    items.Add(fieldInfo);
            //}

            //if (DashboardHelper.IsUsingEpiProject)
            //{
            //    for (int i = 0; i < DashboardHelper.View.Pages.Count; i++)
            //    {
            //        items.Add(new FieldInfo()
            //        {
            //            Name = "Page " + (i + 1).ToString(),
            //            DataType = String.Empty,
            //            VariableCategory = VariableCategory.Page
            //        });
            //    }
            //}

            fieldNames.Sort();

            cmbField.ItemsSource = fieldNames;
            //cmbGroupField.ItemsSource = fields;

            //CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(lvTextVariables.ItemsSource);
            //PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");
            //view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as WordCloudControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_WORDCLOUD;

            tbtnVariables.Title       = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description = DashboardSharedStrings.GADGET_TABDESC_WORDCLOUD;
            tbtnDisplay.Title         = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description   = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title         = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description   = DashboardSharedStrings.GADGET_TABDESC_FILTERS;

            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockVariableToParseTxt.Text     = DashboardSharedStrings.GADGET_VARIABLE_PARSE;
            tblockWordsIgnoreTxt.Text         = DashboardSharedStrings.GADGET_WORDS_IGNORE;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;
        }
        public FrequencyProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            FrequencyParameters parameters,
            List <Grid> strataGridList
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;

            List <string> fields       = new List <string>();
            List <string> weightFields = new List <string>();
            List <string> strataItems  = new List <string>();

            //Variable fields
            fields.Add(String.Empty);
            ColumnDataType columnDataType = ColumnDataType.Boolean | ColumnDataType.DateTime | ColumnDataType.Numeric | ColumnDataType.Text | ColumnDataType.UserDefined;

            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        fields.Add(fieldName);
                    }
                }
                else
                {
                    fields.Add(fieldName);
                }
            }
            //  cbxField.ItemsSource = fields;
            lbxField.ItemsSource = fields;
            // Set the height of the field list to fit
            lbxField.Height = System.Windows.SystemParameters.PrimaryScreenHeight / 1.7;
            //Weight Fields
            weightFields.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        weightFields.Add(fieldName);
                    }
                }
                else
                {
                    weightFields.Add(fieldName);
                }
            }
            weightFields.Sort();
            cbxFieldWeight.ItemsSource = weightFields;

            //Strata Fields
            strataItems.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.Boolean | ColumnDataType.Text | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus" || fieldName == "FKEY" || fieldName == "GlobalRecordId"))
                    {
                        strataItems.Add(fieldName);
                    }
                }
                else
                {
                    strataItems.Add(fieldName);
                }
            }
            lbxFieldStrata.ItemsSource = strataItems;
            // Set the height of the stratification list to fit
            lbxFieldStrata.Height = System.Windows.SystemParameters.PrimaryScreenHeight / 2.2;

            // CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(cbxField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            // view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as FrequencyControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            txtRows.PreviewKeyDown     += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);
            txtBarWidth.PreviewKeyDown += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);

            #region Translation

            tbtnVariables.Title                     = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description               = DashboardSharedStrings.GADGET_TABDESC_FREQUENCY;
            tbtnSorting.Title                       = DashboardSharedStrings.GADGET_TABBUTTON_SORTING;
            tbtnSorting.Description                 = DashboardSharedStrings.GADGET_TABDESC_SORTING;
            tbtnDisplay.Title                       = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description                 = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title                       = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description                 = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariablesTxt.Text            = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelSortingTxt.Text              = DashboardSharedStrings.GADGET_PANELHEADER_SORTING;
            tblockGroupingSubheaderTxt.Text         = DashboardSharedStrings.GADGET_PANELSUBHEADER_GROUPING;
            tblockSortingSubheader.Content          = DashboardSharedStrings.GADGET_PANELSUBHEADER_SORTING;
            tblockSortMethod.Text                   = DashboardSharedStrings.GADGET_SORT_METHOD;
            tblockPanelDisplayTxt.Text              = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockTitleNDescSubheader.Content       = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text                     = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                      = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelOutputOptTxt.Text            = DashboardSharedStrings.GADGET_OUTPUT_OPTIONS;
            checkboxAllValuesTxt.Text               = DashboardSharedStrings.GADGET_DISPLAY_LIST_VALUE;
            checkboxDrawBordersTxt.Text             = DashboardSharedStrings.GADGET_DRAW_BORDERS;
            checkboxDrawHeaderTxt.Text              = DashboardSharedStrings.GADGET_DRAW_HEADER_ROW;
            checkboxDrawTotalTxt.Text               = DashboardSharedStrings.GADGET_DRAW_TOTAL_ROW;
            tblockOutputDisplaySubheaderTxt.Text    = DashboardSharedStrings.GADGET_OUTPUT_COLUMNS_DISPLAY;
            checkboxColumnFrequencyTxt.Text         = DashboardSharedStrings.GADGET_COLUMN_FREQUENCY;
            checkboxColumnPercentTxt.Text           = DashboardSharedStrings.GADGET_COLUMN_PERCENT;
            checkboxColumnCumulativePercentTxt.Text = DashboardSharedStrings.GADGET_COLUMN_CUMULATIVE_PERCENT;
            checkboxColumn95CILowerTxt.Text         = DashboardSharedStrings.GADGET_COLUMN_95_CILOWER;
            checkboxColumn95CIUpperTxt.Text         = DashboardSharedStrings.GADGET_COLUMN_95_CIUPPER;
            checkboxColumnPercentBarsTxt.Text       = DashboardSharedStrings.GADGET_COLUMN_PERCENTBAR;
            tblockPanelDataFilterTxt.Text           = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text       = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;


            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_FREQUENCY;
            //expanderAdvancedOptions.Header = DashboardSharedStrings.GADGET_ADVANCED_OPTIONS;
            //expanderDisplayOptions.Header = DashboardSharedStrings.GADGET_DISPLAY_OPTIONS;
            tblockMainVariable.Text   = DashboardSharedStrings.GADGET_FREQUENCY_VARIABLE;
            tblockStrataVariable.Text = DashboardSharedStrings.GADGET_STRATA_VARIABLE;
            tblockWeightVariable.Text = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;

            //checkboxAllValues.Content = DashboardSharedStrings.GADGET_ALL_LIST_VALUES;
            checkboxCommentLegalLabelsTxt.Text = DashboardSharedStrings.GADGET_LIST_LABELS;
            checkboxIncludeMissingTxt.Text     = DashboardSharedStrings.GADGET_INCLUDE_MISSING;

            checkboxSortHighLowTxt.Text = DashboardSharedStrings.GADGET_SORT_HI_LOW;
            checkboxUsePromptsTxt.Text  = DashboardSharedStrings.GADGET_USE_FIELD_PROMPTS;
            //tblockOutputColumns.Text = DashboardSharedStrings.GADGET_OUTPUT_COLUMNS_DISPLAY;
            tblockPrecisionTxt.Text = DashboardSharedStrings.GADGET_DECIMALS_TO_DISPLAY;

            tblockRows.Text     = DashboardSharedStrings.GADGET_MAX_ROWS_TO_DISPLAY;
            tblockBarWidth.Text = DashboardSharedStrings.GADGET_MAX_PERCENT_BAR_WIDTH;

            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;
            //btnRun.Content = DashboardSharedStrings.GADGET_RUN_BUTTON;
            #endregion // Translation
        }
Exemplo n.º 10
0
        public RatesProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            RatesParameters parameters,
            List <Grid> strataGridList,
            List <string> columnOrder
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;
            this.ColumnOrder     = columnOrder;

            _numerFilter = new DataFilters(DashboardHelper);
            _denomFilter = new DataFilters(DashboardHelper);

            List <FieldInfo> items  = new List <FieldInfo>();
            List <string>    fields = new List <string>();

            fields.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);
            }

            foreach (string fieldName in DashboardHelper.GetAllGroupsAsList())
            {
                FieldInfo fieldInfo = new FieldInfo()
                {
                    Name             = fieldName,
                    DataType         = String.Empty,
                    VariableCategory = VariableCategory.Group
                };
                items.Add(fieldInfo);
            }

            if (DashboardHelper.IsUsingEpiProject)
            {
                for (int i = 0; i < DashboardHelper.View.Pages.Count; i++)
                {
                    items.Add(new FieldInfo()
                    {
                        Name             = "Page " + (i + 1).ToString(),
                        DataType         = String.Empty,
                        VariableCategory = VariableCategory.Page
                    });
                }
            }

            fields.Sort();

            cmbNumeratorField.ItemsSource   = items;
            cmbDenominatorField.ItemsSource = items;

            cmbGroupField.ItemsSource          = fields;
            cmbSecondaryGroupField.ItemsSource = fields;

            foreach (string fieldName in fields)
            {
                lbxAvailableVariables.Items.Add(fieldName);
            }

            //nk  CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(lvNumerator.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            //nk  view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as RatesControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            #region Translation

            lblSelectNumeratorAggregateFunction.Content = DashboardSharedStrings.AGGREGATE_COLON;   // Aggregate:
            lblNumerator.Content               = DashboardSharedStrings.OF_COLON;                   // of:
            lblNumeratorWhere.Content          = DashboardSharedStrings.AND_WHERE;                  // And Where: (filter condition - optional)
            checkBoxNumberatorDistinct.Content = DashboardSharedStrings.DISTINCT;                   // Distinct
            lblPER.Content = DashboardSharedStrings.PER;                                            // PER
            lblSelectDenominatorAggregateFunction.Content = DashboardSharedStrings.AGGREGATE_COLON; // Aggregate:
            lblDenominator.Content              = DashboardSharedStrings.OF_COLON;                  // of:
            lblDenominatorWhere.Content         = DashboardSharedStrings.AND_WHERE;                 // And Where: (filter condition - optional)
            checkBoxDenominatorDistinct.Content = DashboardSharedStrings.DISTINCT;                  // Distinct
            tblockVariableDenominator.Content   = DashboardSharedStrings.DENOMINATOR_COLON;         // Denominator:

            lblRateMultiplier.Content  = DashboardSharedStrings.RATE_MULTIPLIER_COLON;              // Rate Multiplier:
            defaultColorOption.Content = DashboardSharedStrings.USE_DEFAULT_COLOR;                  // Use default color

            btnDenominatorRule.Content = DashboardSharedStrings.CREATE_EDIT_CONDITION;              // Create/Edit Condition
            btnNumeratorRule.Content   = DashboardSharedStrings.CREATE_EDIT_CONDITION;              // Create/Edit Condition

            lblConfigExpandedTitle.Content = DashboardSharedStrings.GADGET_CONFIG_TITLE_RATES;
            tbtnVariables.Title            = DashboardSharedStrings.DEFINE_RATE;;
            tbtnVariables.Description      = DashboardSharedStrings.CREATE_RULES_TO_DEFINE_A_RATE; // Create rules to define a rate.
            tbtnSorting.Title       = DashboardSharedStrings.GADGET_TABBUTTON_SORTING;
            tbtnSorting.Description = DashboardSharedStrings.GADGET_TABDESC_SORTING;
            tbtnDisplay.Title       = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title       = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description = DashboardSharedStrings.GADGET_TABDESC_FILTERS;

            tblockPanelVariables.Content    = DashboardSharedStrings.DEFINE_RATE; //"Define Rate";
            tblockPanelDisplay.Content      = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockPanelSorting.Content      = DashboardSharedStrings.GADGET_PANELHEADER_SORTING;
            tblockPanelDataFilter.Content   = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockGroupingSubheader.Content = DashboardSharedStrings.GADGET_PANELSUBHEADER_GROUPING;
            tblockSortingSubheader.Content  = DashboardSharedStrings.GADGET_PANELSUBHEADER_SORTING;
            tblockSortMethod.Content        = DashboardSharedStrings.GADGET_SORT_METHOD;
            tblockTitle.Content             = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDesc.Content                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelOutputOpt.Content      = DashboardSharedStrings.GADGET_OUTPUT_OPTIONS;
            tblockAnyFilterGadgetOnly.Content = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockVariableDenominator.Content = DashboardSharedStrings.GADGET_VARIABLES_DENOMINATOR;
            tblockGroupby.Content             = DashboardSharedStrings.GADGET_GROUP_BY;
            tblockSubGroupBy.Content          = DashboardSharedStrings.GADGET_SUBGROUP_BY;
            tblockAvailableVariables.Content  = DashboardSharedStrings.GADGET_AVAILABLE_VARIABLES;
            tblockSortOrder.Content           = DashboardSharedStrings.GADGET_SORT_ORDER;
            tblockDimensions.Content          = DashboardSharedStrings.GADGET_DIMENSIONS;
            tblockTitleNDescSubheader.Content = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockMaxWidth.Text               = DashboardSharedStrings.GADGET_MAX_WIDTH;
            btnOK.Content      = DashboardSharedStrings.BUTTON_OK;
            btnCancel.Content  = DashboardSharedStrings.BUTTON_CANCEL;
            tblockMaxRows.Text = SharedStrings.DASHBOARD_OPTION_MAX_ROWS;
            #endregion // Translation
        }
        public ComplexSampleMeansProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            ComplexSampleMeansParameters parameters,
            List <Grid> strataGridList
            )
        {
            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();

            cbxField.ItemsSource         = fields;
            cbxFieldWeight.ItemsSource   = fields;
            cbxFieldCrosstab.ItemsSource = crosstabFields;
            cbxFieldStrata.ItemsSource   = strataFields;
            cbxFieldPSU.ItemsSource      = strataFields;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(cbxField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as ComplexSampleMeansControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);



            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_COMPLEX_MEANS;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_COMPLEX_MEANS;
            tbtnDisplay.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description           = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description           = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockWeightVariableTxt.Text      = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockStrataVariable.Text         = DashboardSharedStrings.GADGET_STRATA_VARIABLE;
            tblockPSU.Text = DashboardSharedStrings.GADGET_PSU;
            tblockCrosstabVariable.Text = DashboardSharedStrings.GADGET_CROSSTAB_VARIABLE;
            tblockMeansOfTxt.Text       = DashboardSharedStrings.GADGET_MEANS_VARIABLE;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;
            #endregion // Translation
        }
        public ComplexSampleFrequencyProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            ComplexSampleFrequencyParameters parameters,
            List <Grid> strataGridList
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;

            List <string> fields       = new List <string>();
            List <string> weightFields = new List <string>();
            List <string> strataItems  = new List <string>();

            //Variable fields
            fields.Add(String.Empty);
            ColumnDataType columnDataType = ColumnDataType.Boolean | ColumnDataType.DateTime | ColumnDataType.Numeric | ColumnDataType.Text | ColumnDataType.UserDefined;

            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        fields.Add(fieldName);
                    }
                }
                else
                {
                    fields.Add(fieldName);
                }
            }
            cbxField.ItemsSource = fields;

            //Weight Fields
            weightFields.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus"))
                    {
                        weightFields.Add(fieldName);
                    }
                }
                else
                {
                    weightFields.Add(fieldName);
                }
            }
            weightFields.Sort();
            cbxFieldWeight.ItemsSource = weightFields;

            //Strata Fields
            strataItems.Add(String.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.Boolean | ColumnDataType.Text | ColumnDataType.UserDefined;
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                if (DashboardHelper.IsUsingEpiProject)
                {
                    if (!(fieldName == "RecStatus" || fieldName == "FKEY" || fieldName == "GlobalRecordId"))
                    {
                        strataItems.Add(fieldName);
                    }
                }
                else
                {
                    strataItems.Add(fieldName);
                }
            }
            cbxFieldStrata.ItemsSource = strataItems;
            cbxFieldPSU.ItemsSource    = strataItems;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(cbxField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as ComplexSampleFrequencyControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            cbxFieldCLType.Items.Add("Wald");
            cbxFieldCLType.Items.Add("Logit");
            if (parameters.UseLogitConfidenceIntervals)
            {
                cbxFieldCLType.SelectedIndex = 1;
            }
            else
            {
                cbxFieldCLType.SelectedIndex = 0;
            }

            cbxFieldCLLevel.Items.Add("90%");
            cbxFieldCLLevel.Items.Add("95%");
            if (parameters.ConfidenceLevel == 0.9)
            {
                cbxFieldCLLevel.SelectedIndex = 0;
            }
            else
            {
                cbxFieldCLLevel.SelectedIndex = 1;
            }

            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_COMPLEX_SAMPLE;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_COMPLEX_SAMPLE;
            tbtnDisplay.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description           = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description           = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockWeightVariable.Text         = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockMainVariable.Text           = DashboardSharedStrings.GADGET_FREQUENCY_VARIABLE;
            tblockStrataVariable.Text         = DashboardSharedStrings.GADGET_STRATA_VARIABLE;
            tblockPSU.Text    = DashboardSharedStrings.GADGET_PSU;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;
            #endregion // Translation
        }
Exemplo n.º 13
0
        public LineListProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            LineListParameters parameters,
            List <Grid> strataGridList,
            List <string> columnOrder
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;
            this.ColumnOrder     = columnOrder;

            List <FieldInfo> items  = new List <FieldInfo>();
            List <string>    fields = new List <string>();

            fields.Add(string.Empty);

            foreach (string fieldName in DashboardHelper.GetFieldsAsList())
            {
                items.Add(new FieldInfo()
                {
                    Name             = fieldName,
                    DataType         = DashboardHelper.GetColumnDbType(fieldName).ToString(),
                    VariableCategory = VariableCategory.Field
                });

                fields.Add(fieldName);
            }

            foreach (string fieldName in DashboardHelper.GetAllGroupsAsList())
            {
                FieldInfo fieldInfo = new FieldInfo()
                {
                    Name             = fieldName,
                    DataType         = String.Empty,
                    VariableCategory = VariableCategory.Group
                };
                items.Add(fieldInfo);
            }

            if (DashboardHelper.IsUsingEpiProject)
            {
                for (int i = 0; i < DashboardHelper.View.Pages.Count; i++)
                {
                    items.Add(new FieldInfo()
                    {
                        Name             = "Page " + (i + 1).ToString(),
                        DataType         = String.Empty,
                        VariableCategory = VariableCategory.Page
                    });
                }
            }

            fields.Sort();

            lvVariables.ItemsSource            = items;
            cmbGroupField.ItemsSource          = fields;
            cmbSecondaryGroupField.ItemsSource = fields;

            foreach (string fieldName in fields)
            {
                lbxAvailableVariables.Items.Add(fieldName);
            }

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(lvVariables.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as LineListControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            #region Translation

            lblConfigExpandedTitle.Content = DashboardSharedStrings.GADGET_CONFIG_TITLE_LINE_LIST;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_LINELIST;
            tbtnSorting.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_SORTING;
            tbtnSorting.Description           = DashboardSharedStrings.GADGET_TABDESC_SORTING;
            tbtnDisplay.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description           = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description           = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariables.Content      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelVariables.Content      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelDisplay.Content        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockPanelSorting.Content        = DashboardSharedStrings.GADGET_PANELHEADER_SORTING;
            tblockPanelDataFilter.Content     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockGroupingSubheader.Content   = DashboardSharedStrings.GADGET_PANELSUBHEADER_GROUPING;
            tblockSortingSubheader.Content    = DashboardSharedStrings.GADGET_PANELSUBHEADER_SORTING;
            tblockSortMethod.Content          = DashboardSharedStrings.GADGET_SORT_METHOD;
            tblockTitle.Content               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDesc.Content                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelOutputOpt.Content      = DashboardSharedStrings.GADGET_OUTPUT_OPTIONS;
            tblockAnyFilterGadgetOnly.Content = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockVariableToDisplay.Content   = DashboardSharedStrings.GADGET_VARIABLES_TO_DISPLAY;
            tblockGroupby.Content             = DashboardSharedStrings.GADGET_GROUP_BY;
            tblockSubGroupBy.Content          = DashboardSharedStrings.GADGET_SUBGROUP_BY;
            tblockAvailableVariables.Content  = DashboardSharedStrings.GADGET_AVAILABLE_VARIABLES;
            tblockSortOrder.Content           = DashboardSharedStrings.GADGET_SORT_ORDER;
            tblockDimensions.Content          = DashboardSharedStrings.GADGET_DIMENSIONS;
            checkboxTabOrderTxt.Text          = DashboardSharedStrings.EXPORT_SORT_BY_TAB_ORDER;
            checkboxUsePromptsTxt.Text        = DashboardSharedStrings.GADGET_USE_FIELD_PROMPTS;
            checkboxLineColumnTxt.Text        = DashboardSharedStrings.GADGET_SHOW_LINE_COLUMN;
            checkboxColumnHeadersTxt.Text     = DashboardSharedStrings.GADGET_SHOW_COLUMN_HEADINGS;
            checkboxShowNullsTxt.Text         = DashboardSharedStrings.GADGET_SHOW_MISSING_REP;
            tblockTitleNDescSubheader.Content = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            checkboxListLabelsTxt.Text        = DashboardSharedStrings.GADGET_DISPLAY_LIST_LABELS;
            tblockMaxWidth.Text               = DashboardSharedStrings.GADGET_MAX_WIDTH;
            tblockMaxHeight.Text              = DashboardSharedStrings.GADGET_MAX_HEIGHT;
            btnOK.Content     = DashboardSharedStrings.BUTTON_OK;
            btnCancel.Content = DashboardSharedStrings.BUTTON_CANCEL;

            tblockMaxVarNameLength.Text = SharedStrings.DASHBOARD_MAX_LENGTH;
            tblockMaxRows.Text          = SharedStrings.DASHBOARD_OPTION_MAX_ROWS;
            #endregion // Translation
        }
        public CombinedFrequencyProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            IGadgetParameters parameters
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = (parameters as CombinedFrequencyParameters);

            List <FieldInfo> items  = new List <FieldInfo>();
            List <string>    fields = new List <string>();

            ColumnDataType columnDataType = ColumnDataType.Boolean | ColumnDataType.Numeric | ColumnDataType.Text | ColumnDataType.UserDefined;

            //Commenting for EI-392
            //foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            //{
            //    items.Add(new FieldInfo()
            //    {
            //        Name = fieldName,
            //        DataType = DashboardHelper.GetColumnDbType(fieldName).ToString(),
            //        VariableCategory = VariableCategory.Field
            //    });

            //    fields.Add(fieldName);
            //}

            foreach (string fieldName in DashboardHelper.GetAllGroupsAsList())
            {
                FieldInfo fieldInfo = new FieldInfo()
                {
                    Name             = fieldName,
                    DataType         = String.Empty,
                    VariableCategory = VariableCategory.Group
                };
                items.Add(fieldInfo);
            }
            //Commenting for EI-392
            //if (DashboardHelper.IsUsingEpiProject)
            //{
            //    for (int i = 0; i < DashboardHelper.View.Pages.Count; i++)
            //    {
            //        items.Add(new FieldInfo()
            //        {
            //            Name = "Page " + (i + 1).ToString(),
            //            DataType = String.Empty,
            //            VariableCategory = VariableCategory.Page
            //        });
            //    }
            //}

            fields.Sort();

            lvGroupVariables.ItemsSource = items;
            //cmbGroupField.ItemsSource = fields;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(lvGroupVariables.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as CombinedFrequencyControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);



            #region Translation


            tbtnVariables.Title       = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description = DashboardSharedStrings.GADGET_TABDESC_COMBINEDFEQ;
            tbtnSorting.Title         = DashboardSharedStrings.GADGET_TABBUTTON_SORTING;
            tbtnSorting.Description   = DashboardSharedStrings.GADGET_TABDESC_SORTING;
            tbtnDisplay.Title         = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description   = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnFilters.Title         = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description   = DashboardSharedStrings.GADGET_TABDESC_FILTERS;

            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelSortingTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_SORTING;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockSortingSubheaderTxt.Text    = DashboardSharedStrings.GADGET_PANELSUBHEADER_SORTING;
            tblockGroupingSubheaderTxt.Text   = DashboardSharedStrings.GADGET_PANELSUBHEADER_GROUPING;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPanelOutputOptTxt.Text      = DashboardSharedStrings.GADGET_OUTPUT_OPTIONS;
            tblockSortMethod.Text             = DashboardSharedStrings.GADGET_SORT_METHOD;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockVariablesToDisplayTxt.Text  = DashboardSharedStrings.GADGET_VARIABLES_TO_DISPLAY;
            tblockCombineMode.Text            = DashboardSharedStrings.GADGET_COMBINE_MODE;
            checkboxShowDenominatorTxt.Text   = DashboardSharedStrings.GADGET_SHOW_DENOMINATOR;
            lblConfigExpandedTitleTxt.Text    = DashboardSharedStrings.GADGET_CONFIG_TITLE_COMBINEDFEQ;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            checkboxSortHighLowTxt.Text       = DashboardSharedStrings.GADGET_SORT_HI_LOW;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;


            #endregion // Translation
        }
Exemplo n.º 15
0
        public MeansProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            MeansParameters 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>    pairIDFields   = new List <string>();
            List <string>    strataFields   = new List <string>();

            crosstabFields.Add(string.Empty);
            pairIDFields.Add(string.Empty);
            items.Add(new FieldInfo()
            {
                Name             = "",
                DataType         = "",
                VariableCategory = VariableCategory.Field
            });
            //--
            ColumnDataType columnDataType = ColumnDataType.Boolean | ColumnDataType.Numeric | ColumnDataType.UserDefined;

            //--
            foreach (string fieldName in DashboardHelper.GetFieldsAsList())
            {
                items.Add(new FieldInfo()
                {
                    Name             = fieldName,
                    DataType         = DashboardHelper.GetColumnDbType(fieldName).ToString(),
                    VariableCategory = VariableCategory.Field
                });

                crosstabFields.Add(fieldName);
                pairIDFields.Add(fieldName);
                strataFields.Add(fieldName);
            }
            foreach (string fieldName in DashboardHelper.GetFieldsAsList(columnDataType))
            {
                fields.Add(fieldName);
            }
            //---ei-277
            if (DashboardHelper.IsUsingEpiProject)
            {
                if (fields.Contains("RecStatus"))
                {
                    fields.Remove("RecStatus");
                }
                if (fields.Contains("FKEY"))
                {
                    fields.Remove("FKEY");
                }
                if (fields.Contains("GlobalRecordId"))
                {
                    fields.Remove("GlobalRecordId");
                }
                if (fields.Contains("FirstSaveTime"))
                {
                    fields.Remove("FirstSaveTime");
                }
                if (fields.Contains("LastSaveTime"))
                {
                    fields.Remove("LastSaveTime");
                }

                if (crosstabFields.Contains("RecStatus"))
                {
                    crosstabFields.Remove("RecStatus");
                }
                if (crosstabFields.Contains("FKEY"))
                {
                    crosstabFields.Remove("FKEY");
                }
                if (crosstabFields.Contains("GlobalRecordId"))
                {
                    crosstabFields.Remove("GlobalRecordId");
                }
                if (crosstabFields.Contains("FirstSaveTime"))
                {
                    crosstabFields.Remove("FirstSaveTime");
                }
                if (crosstabFields.Contains("LastSaveTime"))
                {
                    crosstabFields.Remove("LastSaveTime");
                }
                if (crosstabFields.Contains("SYSTEMDATE"))
                {
                    crosstabFields.Remove("SYSTEMDATE");
                }

                if (pairIDFields.Contains("RecStatus"))
                {
                    crosstabFields.Remove("RecStatus");
                }
                if (pairIDFields.Contains("FKEY"))
                {
                    crosstabFields.Remove("FKEY");
                }
                if (pairIDFields.Contains("GlobalRecordId"))
                {
                    crosstabFields.Remove("GlobalRecordId");
                }
                if (pairIDFields.Contains("FirstSaveTime"))
                {
                    crosstabFields.Remove("FirstSaveTime");
                }
                if (pairIDFields.Contains("LastSaveTime"))
                {
                    crosstabFields.Remove("LastSaveTime");
                }
                if (pairIDFields.Contains("SYSTEMDATE"))
                {
                    crosstabFields.Remove("SYSTEMDATE");
                }

                if (strataFields.Contains("RecStatus"))
                {
                    strataFields.Remove("RecStatus");
                }
                if (strataFields.Contains("FKEY"))
                {
                    fields.Remove("FKEY");
                }
                if (strataFields.Contains("GlobalRecordId"))
                {
                    strataFields.Remove("GlobalRecordId");
                }
                if (strataFields.Contains("FirstSaveTime"))
                {
                    strataFields.Remove("FirstSaveTime");
                }
                if (strataFields.Contains("LastSaveTime"))
                {
                    strataFields.Remove("LastSaveTime");
                }
                if (strataFields.Contains("SYSTEMDATE"))
                {
                    strataFields.Remove("SYSTEMDATE");
                }
            }
            //--

            fields.Sort();
            crosstabFields.Sort();
            pairIDFields.Sort();

            cbxField.ItemsSource         = fields;
            cbxFieldWeight.ItemsSource   = fields;
            cbxFieldCrosstab.ItemsSource = crosstabFields;
            cbxFieldPairID.ItemsSource   = pairIDFields;
            lvFieldStrata.ItemsSource    = strataFields;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(cbxField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as MeansControl).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);



            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_MEANS;

            tbtnVariables.Title       = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description = DashboardSharedStrings.GADGET_TABDESC_MEANS;
            tbtnDisplay.Title         = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description   = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;

            tblockPanelVariablesTxt.Text = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tbtnFilters.Title            = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tblockPanelDisplayTxt.Text   = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tbtnFilters.Description      = DashboardSharedStrings.GADGET_TABDESC_FILTERS;

            tblockWeightTxt.Text = DashboardSharedStrings.GADGET_WEIGHT_VARIABLE;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockPrecision.Text              = DashboardSharedStrings.GADGET_DECIMALS_TO_DISPLAY;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockMeansOfTxt.Text             = DashboardSharedStrings.GADGET_MEANS_VARIABLE;
            tblockCrossTabulateByTxt.Text     = DashboardSharedStrings.GADGET_CROSSTAB_VARIABLE;
            tblockStratifyByTxt.Text          = DashboardSharedStrings.GADGET_STRATA_VARIABLE;

            checkboxShowANOVATxt.Text        = DashboardSharedStrings.GADGET_DISPLAY_ANOVA;
            checkboxShowObservationsTxt.Text = DashboardSharedStrings.GADGET_OBSERVATIONS;
            checkboxShowTotalTxt.Text        = DashboardSharedStrings.GADGET_TOTAL;
            checkboxShowMeanTxt.Text         = DashboardSharedStrings.GADGET_MEANS;
            checkboxShowVarianceTxt.Text     = DashboardSharedStrings.GADGET_VARIANCE;
            checkboxShowStdDevTxt.Text       = DashboardSharedStrings.GADGET_STANDARD_DEVIATION;
            checkboxShowMinTxt.Text          = DashboardSharedStrings.GADGET_MINIMUM;
            checkboxShowQ1Txt.Text           = DashboardSharedStrings.GADGET_SHOWQ1;
            checkboxShowMedianTxt.Text       = DashboardSharedStrings.GADGET_MEDIAN;
            checkboxShowQ3Txt.Text           = DashboardSharedStrings.GADGET_SHOWQ3;
            checkboxShowMaxTxt.Text          = DashboardSharedStrings.GADGET_MAXIMUM;
            checkboxShowModeTxt.Text         = DashboardSharedStrings.GADGET_MODE;
            tblockOutputColumnsTxt.Text      = DashboardSharedStrings.GADGET_OUTPUT_COLUMNS_DISPLAY;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;

            #endregion // Translation
        }
        public AberrationDetectionChartProperties(
            DashboardHelper dashboardHelper,
            IGadget gadget,
            AberrationDetectionChartParameters parameters,
            List <Grid> strataGridList
            )
        {
            InitializeComponent();
            this.DashboardHelper = dashboardHelper;
            this.Gadget          = gadget;
            this.Parameters      = parameters;
            this.StrataGridList  = strataGridList;

            //Variable fields

            List <string> fieldNames       = new List <string>();
            List <string> weightFieldNames = new List <string>();
            List <string> strataFieldNames = new List <string>();

            ColumnDataType columnDataType = ColumnDataType.DateTime | ColumnDataType.UserDefined;

            fieldNames = DashboardHelper.GetFieldsAsList(columnDataType);

            weightFieldNames.Add(string.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.UserDefined;
            weightFieldNames.AddRange(DashboardHelper.GetFieldsAsList(columnDataType));

            strataFieldNames.Add(string.Empty);
            columnDataType = ColumnDataType.Numeric | ColumnDataType.Boolean | ColumnDataType.Text | ColumnDataType.UserDefined;
            strataFieldNames.AddRange(DashboardHelper.GetFieldsAsList(columnDataType));

            fieldNames.Sort();
            weightFieldNames.Sort();
            strataFieldNames.Sort();

            if (fieldNames.Contains("SYSTEMDATE"))
            {
                fieldNames.Remove("SYSTEMDATE");
            }

            if (DashboardHelper.IsUsingEpiProject)
            {
                if (fieldNames.Contains("RecStatus"))
                {
                    fieldNames.Remove("RecStatus");
                }
                if (weightFieldNames.Contains("RecStatus"))
                {
                    weightFieldNames.Remove("RecStatus");
                }

                if (strataFieldNames.Contains("RecStatus"))
                {
                    strataFieldNames.Remove("RecStatus");
                }
                if (strataFieldNames.Contains("FKEY"))
                {
                    strataFieldNames.Remove("FKEY");
                }
                if (strataFieldNames.Contains("GlobalRecordId"))
                {
                    strataFieldNames.Remove("GlobalRecordId");
                }
            }

            cmbField.ItemsSource           = fieldNames;
            cmbFieldWeight.ItemsSource     = weightFieldNames;
            listboxFieldStrata.ItemsSource = strataFieldNames;

            txtYAxisLabelValue.Text = "Count";
            txtXAxisLabelValue.Text = String.Empty;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(cmbField.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("VariableCategory");

            view.GroupDescriptions.Add(groupDescription);

            RowFilterControl = new RowFilterControl(this.DashboardHelper, Dialogs.FilterDialogMode.ConditionalMode, (gadget as AberrationChartGadget).DataFilters, true);
            RowFilterControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            panelFilters.Children.Add(RowFilterControl);

            //EI-98
            txtXAxisFontSize.Text = parameters.XAxisFontSize.ToString();
            txtYAxisFontSize.Text = parameters.YAxisFontSize.ToString();

            txtXAxisLabelFontSize.Text = parameters.XAxisLabelFontSize.ToString();
            txtYAxisLabelFontSize.Text = parameters.YAxisLabelFontSize.ToString();

            txtWidth.PreviewKeyDown      += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);
            txtHeight.PreviewKeyDown     += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);
            txtLagTime.PreviewKeyDown    += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);
            txtDeviations.PreviewKeyDown += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);
            txtTimePeriod.PreviewKeyDown += new KeyEventHandler(txtInput_PositiveIntegerOnly_PreviewKeyDown);

            #region Translation

            lblConfigExpandedTitleTxt.Text = DashboardSharedStrings.GADGET_CONFIG_TITLE_ABERRATION_CHART;
            tbtnVariables.Title            = DashboardSharedStrings.GADGET_TABBUTTON_VARIABLES;
            tbtnVariables.Description      = DashboardSharedStrings.GADGET_TABDESC_ABERRATION_CHART;
            tbtnSorting.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_SORTING;
            tbtnSorting.Description           = DashboardSharedStrings.GADGET_TABDESC_SORTING;
            tbtnDisplay.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnDisplay.Description           = DashboardSharedStrings.GADGET_TABDESC_DISPLAY;
            tbtnDisplayLabels.Title           = DashboardSharedStrings.GADGET_TABBUTTON_LABELS;
            tbtnDisplayLabels.Description     = DashboardSharedStrings.GADGET_TABDESC_LABELS;
            tbtnFilters.Title                 = DashboardSharedStrings.GADGET_TABBUTTON_FILTERS;
            tbtnFilters.Description           = DashboardSharedStrings.GADGET_TABDESC_FILTERS;
            tblockPanelVariablesTxt.Text      = DashboardSharedStrings.GADGET_PANELHEADER_VARIABLES;
            tblockPanelSortingTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_SORTING;
            tblockGroupingSubheaderTxt.Text   = DashboardSharedStrings.GADGET_PANELSUBHEADER_GROUPING;
            tblockPanelDisplayTxt.Text        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockTitleNDescSubheaderTxt.Text = DashboardSharedStrings.GADGET_PANELSUBHEADER_TITLENDESC;
            tblockTitleTxt.Text               = DashboardSharedStrings.GADGET_GADET_TITLE;
            tblockDescTxt.Text                = DashboardSharedStrings.GADGET_DESCRIPTION;
            tblockDimensionsTxt.Text          = DashboardSharedStrings.GADGET_DIMENSIONS;
            tblockWidth.Text                  = DashboardSharedStrings.GADGET_WIDTH;
            tblockHeight.Text                 = DashboardSharedStrings.GADGET_HEIGHT;
            tblockYAxisSubheaderTxt.Text      = DashboardSharedStrings.GADGET_PANELSUBHEADER_YAXIS;
            tblockYAxisLabelValue.Text        = DashboardSharedStrings.GADGET_YAXIS_LABEL;
            tblockYAxisLabelFontSize.Text     = DashboardSharedStrings.GADGET_YAXIS_LABEL_FONTSIZE;
            tblockYAxisFontSize.Text          = DashboardSharedStrings.GADGET_YAXIS_DATA_FONTSIZE;
            tblockXAxisSubheaderTxt.Text      = DashboardSharedStrings.GADGET_XAXIS;
            tblockXAxisLabelType.Text         = DashboardSharedStrings.GADGET_XAXIS_LABEL_TYPE;
            tblockXAxisLabelValue.Text        = DashboardSharedStrings.GADGET_XAXIS_LABEL;
            tblockXAxisLabelFontSize.Text     = DashboardSharedStrings.GADGET_XAXIS_LABEL_FONTSIZE;
            tblockXAxisFontSize.Text          = DashboardSharedStrings.GADGET_XAXIS_DATA_FONTSIZE;
            tblockTitleSubTitleTxt.Text       = DashboardSharedStrings.GADGET_SUBHEADER_TITLESUBTITLE;
            tblockChartTitleValue.Text        = DashboardSharedStrings.GADGET_CHART_TITLE;
            tblockPanelDataFilterTxt.Text     = DashboardSharedStrings.GADGET_PANELHEADER_DATA_FILTER;
            tblockAnyFilterGadgetOnlyTxt.Text = DashboardSharedStrings.GADGET_FILTER_GADGET_ONLY;
            tblockMainVariable.Text           = DashboardSharedStrings.GADGET_DATE_VARIABLE;
            tblockWeightVariable.Text         = DashboardSharedStrings.GADGET_COUNT_VARIABLE_OPT;
            tblockLagTimeDays.Text            = DashboardSharedStrings.GADGET_LAG_TIME_DAYS;
            tblockThresh.Text                 = DashboardSharedStrings.GADGET_THRESHOLD;
            tblockTimePeriod.Text             = DashboardSharedStrings.GADGET_DAYS_PRIOR;
            tblockIndicatorTxt.Text           = DashboardSharedStrings.GADGET_INDICATOR_VARIABLES_OPT;
            tblockPanelLabelsTxt.Text         = DashboardSharedStrings.GADGET_PANELSHEADER_LABELS;
            btnOKTxt.Text     = DashboardSharedStrings.BUTTON_OK;
            btnCancelTxt.Text = DashboardSharedStrings.BUTTON_CANCEL;

            #endregion // Translation
        }