///<summary> /// Создается объект, описывающий отображение длбавление директивы ///</summary> private DispatcheredDirectiveAdding() { InitializeComponent(); Dock = DockStyle.Fill; BackColor = Css.CommonAppearance.Colors.BackColor; footerControl = new FooterControl(); headerControl = new HeaderControl(); aircraftHeader = new AircraftHeaderControl(); mainPanel = new Panel(); generalDataAndPerformanceControl = new DirectiveInformationControl(); generalDataAndPerformanceControl.Mode = DetailInformationMode.Edit; attributesAndParametersControl = new DirectiveAttributesControl(); attributesAndParametersControl.Mode = DetailInformationMode.Edit; generalDataAndPerformanceContainer = new ExtendableRichContainer(); attributesAndParametersContainer = new ExtendableRichContainer(); aircraftHeader.AircraftClickable = true; // // headerControl // headerControl.Controls.Add(aircraftHeader); headerControl.TopicID = "Directive Info"; headerControl.EditDisplayerText = "Edit Aircraft"; headerControl.EditReflectionType = ReflectionTypes.DisplayInNew; headerControl.EditDisplayerRequested += new EventHandler <ReferenceEventArgs>(headerControl_EditDisplayerRequested); headerControl.ReloadRised += new EventHandler(headerControl_ReloadRised); headerControl.ButtonEdit.TextMain = "Save"; headerControl.ButtonEdit.Icon = icons.Save; headerControl.ButtonReload.TextMain = "Reset"; // // mainPanel // mainPanel.Dock = DockStyle.Fill; mainPanel.AutoScroll = true; // // generalDataAndPerformanceContainer // generalDataAndPerformanceContainer.Dock = DockStyle.Top; generalDataAndPerformanceContainer.UpperLeftIcon = icons.GrayArrow; generalDataAndPerformanceContainer.Caption = "General data and Performance"; generalDataAndPerformanceContainer.MainControl = generalDataAndPerformanceControl; // // attributesAndParametersContainer // attributesAndParametersContainer.Dock = DockStyle.Top; attributesAndParametersContainer.UpperLeftIcon = icons.GrayArrow; attributesAndParametersContainer.Caption = "Attributes and additional parameters"; attributesAndParametersContainer.MainControl = attributesAndParametersControl; mainPanel.Controls.Add(attributesAndParametersContainer); mainPanel.Controls.Add(generalDataAndPerformanceContainer); Controls.Add(mainPanel); Controls.Add(footerControl); Controls.Add(headerControl); }
private void InitializeComponent(DirectiveType directiveType) { Dock = DockStyle.Fill; BackColor = Css.CommonAppearance.Colors.BackColor; footerControl = new FooterControl(); headerControl = new HeaderControl(); aircraftHeader = new AircraftHeaderControl(); mainPanel = new Panel(); generalDataAndPerformanceControl = new DirectiveInformationControl(directiveType); attributesAndParametersControl = new DirectiveParametersControl(directiveType); generalDataAndPerformanceContainer = new ExtendableRichContainer(); attributesAndParametersContainer = new ExtendableRichContainer(); aircraftHeader.OperatorClickable = true; aircraftHeader.AircraftClickable = true; // // headerControl // headerControl.Controls.Add(aircraftHeader); headerControl.ButtonReload.Icon = icons.SaveAndAdd; headerControl.ButtonReload.IconNotEnabled = icons.SaveAndAddGray; headerControl.ButtonReload.IconLayout = ImageLayout.Center; headerControl.ButtonReload.TextMain = "Save and"; headerControl.ButtonReload.TextSecondary = "add another"; headerControl.ButtonReload.Click += buttonSaveAndAdd_Click; headerControl.ButtonEdit.Icon = icons.Save; headerControl.ButtonEdit.IconNotEnabled = icons.SaveGray; headerControl.ButtonEdit.IconLayout = ImageLayout.Center; headerControl.ButtonEdit.ReflectionType = ReflectionTypes.DisplayInCurrent; headerControl.ButtonEdit.TextMain = "Save"; headerControl.ButtonEdit.TextSecondary = "and Edit"; headerControl.ButtonEdit.DisplayerRequested += buttonSaveAndEdit_DisplayerRequested; headerControl.TabIndex = 0; // // mainPanel // mainPanel.Dock = DockStyle.Fill; mainPanel.AutoScroll = true; mainPanel.TabIndex = 1; // // footerControl // footerControl.TabIndex = 2; // // generalDataAndPerformanceContainer // generalDataAndPerformanceContainer.Dock = DockStyle.Top; generalDataAndPerformanceContainer.UpperLeftIcon = icons.GrayArrow; generalDataAndPerformanceContainer.Caption = "General data and Performance"; generalDataAndPerformanceContainer.MainControl = generalDataAndPerformanceControl; generalDataAndPerformanceContainer.TabIndex = 0; // // attributesAndParametersContainer // attributesAndParametersContainer.Dock = DockStyle.Top; attributesAndParametersContainer.UpperLeftIcon = icons.GrayArrow; if (directiveType == DirectiveTypeCollection.Instance.ADDirectiveType) { attributesAndParametersContainer.Caption = "Performance"; } else { attributesAndParametersContainer.Caption = "Attributes and additional parameters"; } attributesAndParametersContainer.MainControl = attributesAndParametersControl; attributesAndParametersContainer.TabIndex = 1; mainPanel.Controls.Add(attributesAndParametersContainer); mainPanel.Controls.Add(generalDataAndPerformanceContainer); Controls.Add(mainPanel); Controls.Add(footerControl); Controls.Add(headerControl); }