Пример #1
0
            private void InitializeComponent()
            {
                _isInitialized = false;

                using (new SuspendLayoutTransaction(this))
                {
                    AutoSize = true;
                    //
                    // visibilityLabel
                    //
                    visibilityLabel      = new LabelEx(_serviceProvider);
                    visibilityLabel.Dock = DockStyle.Top;
                    visibilityLabel.Text = Resources.InitialVisibilityCaption;
                    Controls.Add(visibilityLabel);
                    //
                    // btnVisible
                    //
                    btnVisible                 = new RadioButtonEx(_serviceProvider);
                    btnVisible.Margin          = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, btnVisible.ControlInfo, 1);            // 1in
                    btnVisible.Dock            = DockStyle.Top;
                    btnVisible.Text            = Resources.InitialVisibilityVisibleLabel;
                    btnVisible.CheckedChanged += btnVisible_CheckedChanged;
                    Controls.Add(btnVisible);
                    //
                    // btnHidden
                    //
                    btnHidden                 = new RadioButtonEx(_serviceProvider);
                    btnHidden.Margin          = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, btnHidden.ControlInfo, 1);            // 1in
                    btnHidden.Dock            = DockStyle.Top;
                    btnHidden.Text            = Resources.InitialVisibilityHiddenLabel;
                    btnHidden.CheckedChanged += btnHidden_CheckedChanged;
                    Controls.Add(btnHidden);
                    //
                    // btnExpression
                    //
                    btnExpression                 = new RadioButtonEx(_serviceProvider);
                    btnExpression.Margin          = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, btnExpression.ControlInfo, 1);            // 1in
                    btnExpression.Dock            = DockStyle.Top;
                    btnExpression.Text            = Resources.InitialVisibilityExpressionLabel;
                    btnExpression.CheckedChanged += btnExpression_CheckedChanged;
                    Controls.Add(btnExpression);
                    //
                    // visibilityExpressionEditor
                    //
                    visibilityExpressionEditor = new TypedValueEditor(_serviceProvider,
                                                                      null, _visibilityWrapper, VisibilityWrapper.HiddenPropertyName);
                    visibilityExpressionEditor.Margin = System.Windows.Forms.Padding.Empty;
                    Controls.Add(visibilityExpressionEditor);
                }

                _isInitialized = true;
            }
Пример #2
0
            private void InitializeComponent()
            {
                using (new SuspendLayoutTransaction(this))
                {
                    AutoSize = true;

                    //
                    // nameEditor
                    //
                    nameEditor = new TypedValueEditor(_serviceProvider,
                                                      Resources.ElementNameCaption, _designer.ReportItem, ReportItemDesignerBase.DataElementNamePropertyName);
                    Controls.Add(nameEditor);
                    //
                    // outputTitleLabel
                    //
                    LabelEx outputTitleLabel = new LabelEx(_serviceProvider);
                    outputTitleLabel.Text = Resources.OutputCaption;
                    Controls.Add(outputTitleLabel);
                    //
                    // autoOutputButton
                    //
                    if (hasAuto)
                    {
                        autoOutputButton                 = new RadioButtonEx(_serviceProvider);
                        autoOutputButton.Text            = Resources.AutoLabel;
                        autoOutputButton.Checked         = Output == DataElementOutput.Auto;
                        autoOutputButton.CheckedChanged += OutputChangedHandler;
                        autoOutputButton.Margin          = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, autoOutputButton.ControlInfo, 1);
                        Controls.Add(autoOutputButton);
                    }
                    //
                    // yesOutputButton
                    //
                    yesOutputButton                 = new RadioButtonEx(_serviceProvider);
                    yesOutputButton.Text            = Resources.YesLabel;
                    yesOutputButton.Checked         = Output == DataElementOutput.Output;
                    yesOutputButton.CheckedChanged += OutputChangedHandler;
                    yesOutputButton.Margin          = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, yesOutputButton.ControlInfo, 1);
                    Controls.Add(yesOutputButton);
                    //
                    // noOutputButton
                    //
                    noOutputButton                 = new RadioButtonEx(_serviceProvider);
                    noOutputButton.Text            = Resources.NoLabel;
                    noOutputButton.Checked         = Output == DataElementOutput.NoOutput;
                    noOutputButton.CheckedChanged += OutputChangedHandler;
                    noOutputButton.Margin          = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, noOutputButton.ControlInfo, 1);
                    Controls.Add(noOutputButton);
                }
            }