Пример #1
0
 private void InitializeControls()
 {
     using (new SuspendLayoutTransaction(this, true))
     {
         PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties(Designer.ReportItem);
         PropertyDescriptor           appointmentDescriptor = pdc[CalendarDesigner.EventPropertyName];
         object appointmentObject = appointmentDescriptor.GetValue(Designer.ReportItem);
         PropertyDescriptorCollection appointmentConverterProperties = appointmentDescriptor.Converter.GetProperties(appointmentObject);
         //
         // formatEditor
         //
         TypedValueEditor formatEditor = new TypedValueEditor(ServiceProvider,
                                                              Resources.CalendarSmartPanelFormatLabel, ComponentProperty.Create(appointmentConverterProperties[AppointmentStyle.EventFormatPropertyName], appointmentObject), Designer.ReportItem, appointmentDescriptor);
         formatEditor.Margin = System.Windows.Forms.Padding.Empty;
         Controls.Add(formatEditor);
         //
         // textAlignEditor
         //
         TypedValueEditor textAlignEditor = new TypedValueEditor(ServiceProvider,
                                                                 Resources.CalendarSmartPanelTextAlignLabel, ComponentProperty.Create(appointmentConverterProperties[AppointmentStyle.EventTextAlignPropertyName], appointmentObject), Designer.ReportItem, appointmentDescriptor);
         textAlignEditor.Margin = System.Windows.Forms.Padding.Empty;
         Controls.Add(textAlignEditor);
         //
         // fontEditor
         //
         DesignTextStyleEditor fontEditor = new DesignTextStyleEditor(ServiceProvider,
                                                                      appointmentObject, Designer.ReportItem, appointmentDescriptor, appointmentConverterProperties[AppointmentStyle.EventFontPropertyName]);
         fontEditor.Margin = System.Windows.Forms.Padding.Empty;
         Controls.Add(fontEditor);
         //
         // backgroundLabel
         //
         ControlGroupHeadingLabel backgroundLabel = new ControlGroupHeadingLabel(ServiceProvider);
         backgroundLabel.Text = Resources.CalendarSmartPanelBackgroundLabel;
         backgroundLabel.Dock = DockStyle.Top;
         Controls.Add(backgroundLabel);
         //
         // backgroundColorEditor
         //
         TypedValueEditor backcolorEditor = new TypedValueEditor(ServiceProvider,
                                                                 Resources.CalendarSmartPanelFillColorLabel, ComponentProperty.Create(appointmentConverterProperties[AppointmentStyle.EventBackcolorPropertyName], appointmentObject), Designer.ReportItem, appointmentDescriptor);
         backcolorEditor.Margin = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, backcolorEditor.ControlInfo, 1);
         Controls.Add(backcolorEditor);
         //
         // borderColorEditor
         //
         TypedValueEditor borderColorEditor = new TypedValueEditor(ServiceProvider,
                                                                   Resources.CalendarSmartPanelBorderColorLabel, ComponentProperty.Create(appointmentConverterProperties[AppointmentStyle.EventBorderColorPropertyName], appointmentObject), Designer.ReportItem, appointmentDescriptor);
         borderColorEditor.Margin = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, backcolorEditor.ControlInfo, 1);
         Controls.Add(borderColorEditor);
         //
         // Image properties for the appointment
         //
         DesignImageStyleEditor imageEditor = new DesignImageStyleEditor(ServiceProvider,
                                                                         appointmentObject, Designer.ReportItem, appointmentDescriptor, appointmentConverterProperties[AppointmentStyle.EventImagePropertyName]);
         imageEditor.Margin = System.Windows.Forms.Padding.Empty;
         Controls.Add(imageEditor);
     }
 }
Пример #2
0
 private void InitializeControls()
 {
     using (new SuspendLayoutTransaction(this, true))
     {
         PropertyDescriptorCollection pdc           = TypeDescriptor.GetProperties(Designer.ReportItem);
         PropertyDescriptor           dayDescriptor = pdc[CalendarDesigner.DayPropertyName];
         object dayObject = dayDescriptor.GetValue(Designer.ReportItem);
         PropertyDescriptorCollection dayConverterProperties = dayDescriptor.Converter.GetProperties(dayObject);
         //
         // fontEditor
         //
         DesignTextStyleEditor fontEditor = new DesignTextStyleEditor(ServiceProvider,
                                                                      dayObject, Designer.ReportItem, dayDescriptor, dayConverterProperties[DayStyle.DayFontStylePropertyName]);
         Controls.Add(fontEditor);
         //
         // borderEditor
         //
         DesignLineStyleEditor borderEditor = new DesignLineStyleEditor(ServiceProvider,
                                                                        dayObject, Designer.ReportItem, dayDescriptor, dayConverterProperties[DayStyle.DayBorderStylePropertyName]);
         Controls.Add(borderEditor);
         //
         // backcolorEditor
         //
         TypedValueEditor backcolorEditor = new TypedValueEditor(ServiceProvider,
                                                                 Resources.CalendarSmartPanelBackgroundFillColorLabel, ComponentProperty.Create(dayConverterProperties[DayStyle.DayBackcolorPropertyName], dayObject), Designer.ReportItem, dayDescriptor);
         backcolorEditor.Margin = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, backcolorEditor.ControlInfo, 1);
         Controls.Add(backcolorEditor);
         //
         // formatLabel
         //
         ControlGroupHeadingLabel formatLabel = new ControlGroupHeadingLabel(ServiceProvider);
         formatLabel.Text = Resources.CalendarSmartPanelFormattingLabel;
         formatLabel.Dock = DockStyle.Top;
         Controls.Add(formatLabel);
         //
         // textAlignEditor
         //
         TypedValueEditor textAlignEditor = new TypedValueEditor(ServiceProvider,
                                                                 Resources.CalendarSmartPanelTextAlignLabel, ComponentProperty.Create(dayConverterProperties[DayStyle.DayTextAlignPropertyName], dayObject), Designer.ReportItem, dayDescriptor);
         textAlignEditor.Margin = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, textAlignEditor.ControlInfo, 1);
         Controls.Add(textAlignEditor);
         //
         // formatEditor
         //
         TypedValueEditor verticalAlignEditor = new TypedValueEditor(ServiceProvider,
                                                                     Resources.CalendarSmartPanelVerticalAlignLabel, ComponentProperty.Create(dayConverterProperties[DayStyle.DayVerticalAlignPropertyName], dayObject), Designer.ReportItem, dayDescriptor);
         verticalAlignEditor.Margin = Utils.UpdateMarginByIndent(System.Windows.Forms.Padding.Empty, verticalAlignEditor.ControlInfo, 1);
         Controls.Add(verticalAlignEditor);
     }
 }
Пример #3
0
        private void InitializeControls()
        {
            using (new SuspendLayoutTransaction(this, true))
            {
                DataSetNameEditor dataSetEditor = new DataSetNameEditor(ServiceProvider, Designer.ReportItem);

                ControlGroupHeadingLabel eventSettingsLabel = new ControlGroupHeadingLabel(ServiceProvider);
                eventSettingsLabel.Text = Resources.CalendarSmartPanelEventSettingsLabel;
                eventSettingsLabel.Dock = DockStyle.Top;

                TypedValueEditor startDateEditor = new TypedValueEditor(ServiceProvider, Resources.CalendarSmartPanelStartDateLabel, Designer.ReportItem, "AppointmentStartDate");
                TypedValueEditor endDateEditor   = new TypedValueEditor(ServiceProvider, Resources.CalendarSmartPanelEndDateLabel, Designer.ReportItem, "AppointmentEndDate");
                TypedValueEditor valueEditor     = new TypedValueEditor(ServiceProvider, Resources.CalendarSmartPanelValueLabel, Designer.ReportItem, "AppointmentValue");

                _bottomControl = valueEditor;

                Controls.AddRange(new Control[]
                {
                    dataSetEditor, eventSettingsLabel, startDateEditor, endDateEditor, valueEditor
                });
            }
        }