/// <summary>
        /// Copy Constructor
        /// </summary>
        public ScatterChartParameters(ScatterChartParameters parameters)
            : base(parameters)
        {
            ColumnNames = parameters.ColumnNames;
            CrosstabVariableName = parameters.CrosstabVariableName;
            InputVariableList = parameters.InputVariableList;
            CustomFilter = parameters.CustomFilter;
            CustomSortColumnName = parameters.CustomSortColumnName;

            //from ChartGadgetParametersBase
            //Advanced options
            ChartWidth = parameters.ChartWidth;
            ChartHeight = parameters.ChartHeight;

            //Display options
            //  Color and styles
            Palette = parameters.Palette;
            MarkerType = parameters.MarkerType;
            //  Labels
            YAxisLabel = parameters.YAxisLabel;
            XAxisLabelType = parameters.XAxisLabelType;
            XAxisLabel = parameters.XAxisLabel;
            XAxisAngle = parameters.XAxisAngle;
            ChartTitle = parameters.ChartTitle;
            ChartSubTitle = parameters.ChartSubTitle;
            //  Legend
            ShowLegend = parameters.ShowLegend;
            ShowLegendBorder = parameters.ShowLegendBorder;
            ShowLegendVarNames = parameters.ShowLegendVarNames;
            //LegendFontSize in ChartGadgetParametersBase.cs
            LegendDock = parameters.LegendDock;
        }
Beispiel #2
0
        /// <summary>
        /// Copy Constructor
        /// </summary>
        public ScatterChartParameters(ScatterChartParameters parameters)
            : base(parameters)
        {
            ColumnNames          = parameters.ColumnNames;
            CrosstabVariableName = parameters.CrosstabVariableName;
            InputVariableList    = parameters.InputVariableList;
            CustomFilter         = parameters.CustomFilter;
            CustomSortColumnName = parameters.CustomSortColumnName;

            //from ChartGadgetParametersBase
            //Advanced options
            ChartWidth  = parameters.ChartWidth;
            ChartHeight = parameters.ChartHeight;

            //Display options
            //  Color and styles
            Palette    = parameters.Palette;
            MarkerType = parameters.MarkerType;
            //  Labels
            YAxisLabel     = parameters.YAxisLabel;
            XAxisLabelType = parameters.XAxisLabelType;
            XAxisLabel     = parameters.XAxisLabel;
            XAxisAngle     = parameters.XAxisAngle;
            ChartTitle     = parameters.ChartTitle;
            ChartSubTitle  = parameters.ChartSubTitle;
            //  Legend
            ShowLegend         = parameters.ShowLegend;
            ShowLegendBorder   = parameters.ShowLegendBorder;
            ShowLegendVarNames = parameters.ShowLegendVarNames;
            //LegendFontSize in ChartGadgetParametersBase.cs
            LegendDock    = parameters.LegendDock;
            PaletteColors = parameters.PaletteColors;
        }
        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);
            //    }
            //}

            txtYAxisLabelValue.Text = "Count";
            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

            #endregion // Translation
        }