private void InitializeComponent() { mainPanel = new Panel(); headerControl = new HeaderControl(); footerControl = new FooterControl(); buttonDeleteOperator = new RichReferenceButton(); // // mainPanel // mainPanel.AutoScroll = true; mainPanel.Dock = DockStyle.Fill; // // headerControl // headerControl.Controls.Add(operatorHeaderControl); headerControl.ActionControl.ButtonEdit.TextMain = "Save"; headerControl.ActionControl.ButtonEdit.Icon = icons.Save; headerControl.ActionControl.ButtonEdit.IconNotEnabled = icons.SaveGray; headerControl.EditReflectionType = ReflectionTypes.DisplayInCurrent; headerControl.EditDisplayerRequested += headerControl_SaveClicked; headerControl.ReloadRised += headerControl_ReloadRised; //headerControl.ContextActionControl.ButtonHelp.TopicID = "aircrafts.html"; // // footerControl // footerControl.AutoSize = true; footerControl.AutoSizeMode = AutoSizeMode.GrowAndShrink; footerControl.Dock = DockStyle.Bottom; // // buttonDeleteOperator // buttonDeleteOperator.Anchor = AnchorStyles.Right | AnchorStyles.Top; buttonDeleteOperator.BackColor = Color.Transparent; buttonDeleteOperator.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteOperator.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteOperator.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteOperator.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteOperator.Location = new Point(mainPanel.Right - 160, 0); buttonDeleteOperator.Icon = icons.Delete; buttonDeleteOperator.IconNotEnabled = icons.DeleteGray; buttonDeleteOperator.IconLayout = ImageLayout.Center; buttonDeleteOperator.PaddingMain = new Padding(3, 0, 0, 0); buttonDeleteOperator.ReflectionType = ReflectionTypes.CloseSelected; buttonDeleteOperator.Size = new Size(160, 50); buttonDeleteOperator.TabIndex = 16; buttonDeleteOperator.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteOperator.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteOperator.TextMain = "Delete"; buttonDeleteOperator.TextSecondary = "operator"; buttonDeleteOperator.DisplayerRequested += buttonDeleteOperator_DisplayerRequested; // // OperatorScreen // mainPanel.Controls.Add(buttonDeleteOperator); mainPanel.Controls.Add(operatorControl); Controls.Add(mainPanel); Controls.Add(headerControl); Controls.Add(footerControl); }
///<summary> /// Создается новый объект отображения действия ///</summary> public ActionControl() { InitializeComponent(); splitViewer1.SplitterImage = icons.SeparatorLine; avButtonReload = new AvButtonT(); richReferenceButtonEdit = new RichReferenceButton(); // // avButtonReload // avButtonReload.ActiveBackgroundImage = icons.HeaderBarClicked; avButtonReload.Dock = DockStyle.Left; avButtonReload.Icon = icons.Reload; avButtonReload.IconNotEnabled = icons.ReloadGray; avButtonReload.IconLayout = ImageLayout.Center; avButtonReload.FontMain = Css.HeaderControl.Fonts.PrimaryFont; avButtonReload.FontSecondary = Css.HeaderControl.Fonts.SecondaryFont; avButtonReload.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; avButtonReload.ForeColorSecondary = Css.HeaderControl.Colors.SecondaryColor; avButtonReload.Margin = new Padding(0); avButtonReload.TextMain = "Reload"; avButtonReload.TextSecondary = "data"; avButtonReload.TextAlignMain = ContentAlignment.BottomCenter; avButtonReload.TextAlignSecondary = ContentAlignment.TopCenter; avButtonReload.Width = STANDART_BUTTONS_WIDTH; avButtonReload.Height = 58; // // richReferenceButtonEdit // richReferenceButtonEdit.ActiveBackgroundImage = icons.HeaderBarClicked; richReferenceButtonEdit.Dock = DockStyle.Left; richReferenceButtonEdit.Icon = icons.Edit; richReferenceButtonEdit.IconNotEnabled = icons.EditGray; richReferenceButtonEdit.IconLayout = ImageLayout.Center; richReferenceButtonEdit.FontMain = Css.HeaderControl.Fonts.PrimaryFont; richReferenceButtonEdit.FontSecondary = Css.HeaderControl.Fonts.SecondaryFont; richReferenceButtonEdit.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; richReferenceButtonEdit.ForeColorSecondary = Css.HeaderControl.Colors.SecondaryColor; richReferenceButtonEdit.Margin = new Padding(0); richReferenceButtonEdit.TextMain = "Edit"; richReferenceButtonEdit.TextSecondary = "data"; richReferenceButtonEdit.TextAlignMain = ContentAlignment.BottomCenter; richReferenceButtonEdit.TextAlignSecondary = ContentAlignment.TopCenter; richReferenceButtonEdit.Width = STANDART_BUTTONS_WIDTH; richReferenceButtonEdit.Height = 58; splitViewer1[0] = avButtonReload; splitViewer1[1] = richReferenceButtonEdit; avButtonReload.Click += avButtonReload_Click; richReferenceButtonEdit.DisplayerRequested += avButtonEdit_DisplayerRequested; }
private void CreateChild() { if (_childButton == null) { _childButton = new RichReferenceButton(); _childButton.Icon = Properties.Resources.GreenArrow; _childButton.IconLayout = ImageLayout.Center; _childButton.ReflectionType = ReflectionTypes.DisplayInNew; _childButton.Dock = DockStyle.Left; _childButton.Size = new Size(270, 47); _childButton.PaddingMain = new Padding(0, 8, 0, 0); _childButton.FontMain = new Font("Verdana", 16, GraphicsUnit.Pixel); _childButton.ForeColorMain = Css.OrdinaryText.Colors.ForeColor; _childButton.ForeColorSecondary = Css.OrdinaryText.Colors.ForeColor; _childButton.DisplayerRequested += ChildDisplayerRequested; if (splitViewer1.ControlsAmount < 5) { splitViewer1.ControlsAmount = 5; } splitViewer1[4] = _childButton; } }
///<summary> /// Создает страницу для отображения информации об одной директиве ///</summary> /// <param name="directive">Директива</param> public DirectiveScreen(BaseDetailDirective directive) { if (directive == null) { throw new ArgumentNullException("directive", "Argument cannot be null"); } currentDirective = directive; BackColor = Css.CommonAppearance.Colors.BackColor; Dock = DockStyle.Fill; footerControl = new FooterControl(); headerControl = new HeaderControl(); aircraftHeader = new AircraftHeaderControl(directive.Parent.Parent as Aircraft, true); summaryDirectiveContainer = new ExtendableRichContainer(); generalDataAndPerformanceContainer = new ExtendableRichContainer(); attributesAndParametersContainer = new ExtendableRichContainer(); complianceDirectiveContainer = new ExtendableRichContainer(); summaryDirectiveControl = new DirectiveSummary(directive); generalDataAndPerformanceControl = new DirectiveInformationControl(directive); attributesAndParametersControl = new DirectiveParametersControl(directive); complianceDirectiveControl = new DirectiveComplianceListView(directive); panelCompliance = new Panel(); mainPanel = new Panel(); panelHeader = new Panel(); buttonAddPerformance = new AvButtonT(); buttonDirectiveClosing = new AvButtonT(); buttonDeleteRecord = new AvButtonT(); buttonEditRecord = new AvButtonT(); buttonDeleteDirective = new RichReferenceButton(); // // aircraftHeader // aircraftHeader.AircraftClickable = true; // // headerControl // headerControl.Controls.Add(aircraftHeader); headerControl.ButtonEdit.TextMain = "Save"; headerControl.ButtonEdit.Icon = icons.Save; headerControl.ButtonEdit.IconNotEnabled = icons.SaveGray; headerControl.ContextActionControl.ShowPrintButton = true; headerControl.TabIndex = 0; headerControl.ContextActionControl.ButtonPrint.DisplayerRequested += ButtonPrint_DisplayerRequested; headerControl.ButtonEdit.DisplayerRequested += ButtonSave_DisplayerRequested; headerControl.ReloadRised += headerControl_ReloadRised; headerControl.ContextActionControl.ButtonHelp.TopicID = "work_with_the_directive"; // // footerControl // footerControl.TabIndex = 2; // // mainPanel // mainPanel.AutoScroll = true; mainPanel.Dock = DockStyle.Fill; mainPanel.TabIndex = 1; mainPanel.Controls.Add(containedPanel); // // containedPanel // containedPanel.AutoSize = true; containedPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink; containedPanel.FlowDirection = FlowDirection.TopDown; containedPanel.TabIndex = 1; // // statusLinkLabel // statusLinkLabel.ActiveLinkColor = Color.Black; statusLinkLabel.Enabled = false; statusLinkLabel.HoveredLinkColor = Color.Black; statusLinkLabel.ImageBackColor = Color.Transparent; statusLinkLabel.ImageLayout = ImageLayout.Center; statusLinkLabel.LinkColor = Color.DimGray; statusLinkLabel.LinkMouseCapturedColor = Color.Empty; statusLinkLabel.Location = new Point(5, 10); statusLinkLabel.Size = new Size(500, 27); statusLinkLabel.TextAlign = ContentAlignment.MiddleLeft; statusLinkLabel.TextFont = Css.OrdinaryText.Fonts.RegularFont; // // summaryDirectiveContainer // summaryDirectiveContainer.BackColor = Css.CommonAppearance.Colors.BackColor; summaryDirectiveContainer.LabelCaption.Text = "Directive " + directive.Title + " Summary"; summaryDirectiveContainer.MainControl = summaryDirectiveControl; summaryDirectiveContainer.UpperLeftIcon = icons.GrayArrow; summaryDirectiveContainer.TabIndex = 1; // // generalDataAndPerformanceContainer // generalDataAndPerformanceContainer.BackColor = Css.CommonAppearance.Colors.BackColor; generalDataAndPerformanceContainer.Extended = false; generalDataAndPerformanceContainer.LabelCaption.Text = "General Data And Performance"; generalDataAndPerformanceContainer.Location = new Point(0, summaryDirectiveContainer.Bottom); generalDataAndPerformanceContainer.MainControl = generalDataAndPerformanceControl; generalDataAndPerformanceContainer.UpperLeftIcon = icons.GrayArrow; generalDataAndPerformanceContainer.TabIndex = 2; // // attributesAndParametersContainer // attributesAndParametersContainer.BackColor = Css.CommonAppearance.Colors.BackColor; attributesAndParametersContainer.Extended = false; if (currentDirective.DirectiveType == DirectiveTypeCollection.Instance.ADDirectiveType) { attributesAndParametersContainer.LabelCaption.Text = "Performance"; } else { attributesAndParametersContainer.LabelCaption.Text = "Attributes And Additional Parameters"; } attributesAndParametersContainer.MainControl = attributesAndParametersControl; attributesAndParametersContainer.UpperLeftIcon = icons.GrayArrow; attributesAndParametersContainer.TabIndex = 3; // // panelHeader // panelHeader.Size = new Size(1250, 50); panelHeader.TabIndex = 0; panelHeader.Controls.Add(buttonDeleteDirective); panelHeader.Controls.Add(statusLinkLabel); // // buttonAddPerformance // buttonAddPerformance.BackColor = Color.Transparent; buttonAddPerformance.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddPerformance.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddPerformance.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddPerformance.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddPerformance.Icon = icons.Add; buttonAddPerformance.IconNotEnabled = icons.AddGray; buttonAddPerformance.IconLayout = ImageLayout.Center; buttonAddPerformance.PaddingSecondary = new Padding(0); buttonAddPerformance.Size = new Size(160, 50); buttonAddPerformance.TabIndex = 16; buttonAddPerformance.TextAlignMain = ContentAlignment.MiddleLeft; buttonAddPerformance.TextAlignSecondary = ContentAlignment.TopCenter; buttonAddPerformance.TextMain = "Register Performance"; buttonAddPerformance.Click += buttonAddNewRecord_Click; // // buttonDirectiveClosing // buttonDirectiveClosing.BackColor = Color.Transparent; buttonDirectiveClosing.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDirectiveClosing.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDirectiveClosing.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDirectiveClosing.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDirectiveClosing.Icon = icons.Add; buttonDirectiveClosing.IconNotEnabled = icons.AddGray; buttonDirectiveClosing.IconLayout = ImageLayout.Center; buttonDirectiveClosing.PaddingSecondary = new Padding(0); buttonDirectiveClosing.Size = new Size(150, 50); buttonDirectiveClosing.TabIndex = 16; buttonDirectiveClosing.TextAlignMain = ContentAlignment.MiddleLeft; buttonDirectiveClosing.TextAlignSecondary = ContentAlignment.TopCenter; buttonDirectiveClosing.TextMain = "Close Directive"; buttonDirectiveClosing.Click += buttonDirectiveClosing_Click; // // buttonEditRecord // buttonEditRecord.BackColor = Color.Transparent; buttonEditRecord.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonEditRecord.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonEditRecord.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonEditRecord.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonEditRecord.Icon = icons.Edit; buttonEditRecord.IconNotEnabled = icons.EditGray; buttonEditRecord.IconLayout = ImageLayout.Center; buttonEditRecord.PaddingSecondary = new Padding(0); buttonEditRecord.Size = new Size(130, 50); buttonEditRecord.TabIndex = 16; buttonEditRecord.TextAlignMain = ContentAlignment.MiddleLeft; buttonEditRecord.TextAlignSecondary = ContentAlignment.TopCenter; buttonEditRecord.TextMain = "Edit"; buttonEditRecord.Click += buttonEditRecord_Click; // // buttonDeleteRecord // buttonDeleteRecord.BackColor = Color.Transparent; buttonDeleteRecord.Cursor = Cursors.Hand; buttonDeleteRecord.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteRecord.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteRecord.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteRecord.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteRecord.Icon = icons.Delete; buttonDeleteRecord.IconNotEnabled = icons.DeleteGray; buttonDeleteRecord.IconLayout = ImageLayout.Center; buttonDeleteRecord.PaddingSecondary = new Padding(0); buttonDeleteRecord.Size = new Size(150, 50); buttonDeleteRecord.TabIndex = 16; buttonDeleteRecord.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteRecord.TextAlignSecondary = ContentAlignment.TopCenter; buttonDeleteRecord.TextMain = "Remove"; buttonDeleteRecord.Click += buttonDeleteRecord_Click; // // buttonDeleteDirective // buttonDeleteDirective.Anchor = AnchorStyles.Right | AnchorStyles.Top; buttonDeleteDirective.BackColor = Color.Transparent; buttonDeleteDirective.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDirective.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDirective.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDirective.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDirective.Location = new Point(panelHeader.Right - 160, 0); buttonDeleteDirective.Icon = icons.Delete; buttonDeleteDirective.IconNotEnabled = icons.DeleteGray; buttonDeleteDirective.IconLayout = ImageLayout.Center; buttonDeleteDirective.PaddingMain = new Padding(3, 0, 0, 0); buttonDeleteDirective.ReflectionType = ReflectionTypes.CloseSelected; buttonDeleteDirective.Size = new Size(160, 50); buttonDeleteDirective.TabIndex = 16; buttonDeleteDirective.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteDirective.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteDirective.TextMain = "Delete"; buttonDeleteDirective.TextSecondary = "directive"; buttonDeleteDirective.DisplayerRequested += buttonDeleteDirective_DisplayerRequested; // // complianceDirectiveControl // complianceDirectiveControl.Dock = DockStyle.Top; complianceDirectiveControl.SelectedItemsChanged += complianceDirectiveControl_SelectedItemsChanged; complianceDirectiveControl.ItemEdited += form_RecordChanged; complianceDirectiveControl.SizeChanged += complianceDirectiveControl_SizeChanged; // // panelCompliance // panelCompliance.AutoSize = true; panelCompliance.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelCompliance.BackColor = Css.CommonAppearance.Colors.BackColor; panelCompliance.Dock = DockStyle.Top; panelCompliance.Visible = false; panelCompliance.TabIndex = 5; panelCompliance.Controls.Add(complianceDirectiveControl); panelCompliance.Controls.Add(buttonAddPerformance); panelCompliance.Controls.Add(buttonDirectiveClosing); panelCompliance.Controls.Add(buttonEditRecord); panelCompliance.Controls.Add(buttonDeleteRecord); // // complianceDirectiveContainer // complianceDirectiveContainer.Dock = DockStyle.Top; complianceDirectiveContainer.Extended = false; complianceDirectiveContainer.LabelCaption.Text = "Compliance"; complianceDirectiveContainer.UpperLeftIcon = icons.GrayArrow; complianceDirectiveContainer.Extending += complianceDirectiveContainer_Extending; complianceDirectiveContainer.TabIndex = 4; containedPanel.Controls.Add(panelHeader); containedPanel.Controls.Add(summaryDirectiveContainer); containedPanel.Controls.Add(generalDataAndPerformanceContainer); containedPanel.Controls.Add(attributesAndParametersContainer); containedPanel.Controls.Add(complianceDirectiveContainer); containedPanel.Controls.Add(panelCompliance); Controls.Add(mainPanel); Controls.Add(footerControl); Controls.Add(headerControl); UpdateDirective(); complianceDirectiveControl_SelectedItemsChanged(complianceDirectiveControl, new SelectedItemsChangeEventArgs(0)); }
private void InitializeComponent() { panelTopContainer = new Panel(); buttonDeleteSelected = new AvButtonT(); buttonApplyFilter = new AvButtonT(); buttonAddATLB = new RichReferenceButton(); footerControl1 = new FooterControl(); headerControl = new HeaderControl(); aircraftHeaderControl = new AircraftHeaderControl(currentAircraft, true, true); statusImageLinkLabel1 = new StatusImageLinkLabel(); labelModel = new Label(); ATLBsViewer = new ATLBsListView(currentAircraft); #region Context menu contextMenuStrip = new ContextMenuStrip(); toolStripMenuItemTitle = new ToolStripMenuItem(); toolStripSeparator1 = new ToolStripSeparator(); toolStripMenuItemAdd = new ToolStripMenuItem(); toolStripMenuItemDelete = new ToolStripMenuItem(); toolStripSeparator2 = new ToolStripSeparator(); toolStripMenuItemProperties = new ToolStripMenuItem(); // // contextMenuStrip // contextMenuStrip.Items.AddRange(new ToolStripItem[] { toolStripMenuItemTitle, toolStripSeparator1, toolStripMenuItemAdd, toolStripMenuItemDelete, toolStripSeparator2, toolStripMenuItemProperties }); contextMenuStrip.Size = new Size(179, 176); // // toolStripMenuItemTitle // toolStripMenuItemTitle.Text = "Edit"; toolStripMenuItemTitle.Click += toolStripMenuItemEdit_Click; // // toolStripMenuItemAdd // toolStripMenuItemAdd.Text = "Add ATLB"; toolStripMenuItemAdd.Enabled = permissionForCreate; toolStripMenuItemAdd.Click += toolStripMenuItemAdd_Click; // // toolStripMenuItemDelete // toolStripMenuItemDelete.Text = "Delete"; toolStripMenuItemDelete.Click += toolStripMenuItemDelete_Click; // // toolStripMenuItemProperties // toolStripMenuItemProperties.Text = "Properties"; toolStripMenuItemProperties.Click += toolStripMenuItemProperties_Click; #endregion // // panelTopContainer // panelTopContainer.AutoSize = true; panelTopContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTopContainer.BackColor = Color.FromArgb(211, 211, 211); panelTopContainer.Controls.Add(labelModel); panelTopContainer.Controls.Add(statusImageLinkLabel1); panelTopContainer.Controls.Add(buttonDeleteSelected); panelTopContainer.Controls.Add(buttonApplyFilter); panelTopContainer.Controls.Add(buttonAddATLB); panelTopContainer.Dock = DockStyle.Top; panelTopContainer.Location = new Point(0, 0); panelTopContainer.Name = "panelTopContainer"; panelTopContainer.Size = new Size(1042, 62); panelTopContainer.TabIndex = 14; // // buttonApplyFilter // buttonApplyFilter.Visible = false; buttonApplyFilter.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonApplyFilter.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonApplyFilter.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonApplyFilter.Icon = icons.ApplyFilter; buttonApplyFilter.Size = new Size(145, 59); buttonApplyFilter.TabIndex = 19; buttonApplyFilter.TextMain = "Apply filter"; //buttonApplyFilter.Click += buttonApplyFilter_Click; // // buttonAddATLB // buttonAddATLB.Enabled = permissionForCreate; buttonAddATLB.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonAddATLB.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddATLB.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddATLB.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddATLB.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddATLB.Icon = icons.Add; buttonAddATLB.IconNotEnabled = icons.AddGray; buttonAddATLB.ReflectionType = ReflectionTypes.DisplayInNew; buttonAddATLB.Size = new Size(152, 59); buttonAddATLB.TabIndex = 15; buttonAddATLB.TextAlignMain = ContentAlignment.BottomCenter; buttonAddATLB.TextAlignSecondary = ContentAlignment.TopCenter; buttonAddATLB.TextMain = "Add new"; buttonAddATLB.TextSecondary = "ATLB"; buttonAddATLB.DisplayerRequested += buttonAddATLB_DisplayerRequested; // // buttonDeleteSelected // buttonDeleteSelected.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonDeleteSelected.Enabled = false; buttonDeleteSelected.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.Icon = icons.Delete; buttonDeleteSelected.IconNotEnabled = icons.DeleteGray; buttonDeleteSelected.PaddingSecondary = new Padding(4, 0, 0, 0); buttonDeleteSelected.Size = new Size(145, 59); buttonDeleteSelected.TabIndex = 20; buttonDeleteSelected.TextAlignMain = ContentAlignment.BottomLeft; buttonDeleteSelected.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteSelected.TextMain = "Delete"; buttonDeleteSelected.TextSecondary = "selected"; buttonDeleteSelected.Click += buttonDeleteSelected_Click; // // footerControl1 // footerControl1.AutoSizeMode = AutoSizeMode.GrowAndShrink; footerControl1.BackColor = Color.Transparent; footerControl1.Dock = DockStyle.Bottom; footerControl1.Location = new Point(0, 568); footerControl1.Margin = new Padding(0); footerControl1.MaximumSize = new Size(0, 48); footerControl1.MinimumSize = new Size(0, 48); footerControl1.Name = "footerControl1"; footerControl1.Size = new Size(1042, 48); footerControl1.TabIndex = 10; // // headerControl // headerControl.ActionControlSplitterVisible = true; headerControl.ContextActionControl.ShowPrintButton = true; headerControl.BackColor = Color.Transparent; headerControl.BackgroundImage = Resources.HeaderBar; headerControl.Controls.Add(aircraftHeaderControl); headerControl.Dock = DockStyle.Top; headerControl.EditDisplayerText = "Component Status Operator"; headerControl.EditReflectionType = ReflectionTypes.DisplayInNew; //headerControl.EditDisplayerRequested += headerControl_EditDisplayerRequested; headerControl.ActionControl.ShowEditButton = false; headerControl.Location = new Point(0, 0); headerControl.Name = "headerControl"; headerControl.Size = new Size(1042, 58); headerControl.TabIndex = 6; headerControl.ContextActionControl.ButtonPrint.DisplayerRequested += PrintButton_DisplayerRequested; headerControl.ReloadRised += headerControl1_ReloadRised; headerControl.ContextActionControl.ButtonHelp.TopicID = "component-status.html"; // // statusImageLinkLabel1 // statusImageLinkLabel1.ActiveLinkColor = Color.Black; statusImageLinkLabel1.Enabled = false; statusImageLinkLabel1.HoveredLinkColor = Color.Black; statusImageLinkLabel1.ImageBackColor = Color.Transparent; statusImageLinkLabel1.ImageLayout = ImageLayout.Center; statusImageLinkLabel1.LinkColor = Color.DimGray; statusImageLinkLabel1.LinkMouseCapturedColor = Color.Empty; statusImageLinkLabel1.Location = new Point(28, 3); statusImageLinkLabel1.Margin = new Padding(0); statusImageLinkLabel1.Name = "statusImageLinkLabel1"; statusImageLinkLabel1.Size = new Size(412, 27); statusImageLinkLabel1.Status = Statuses.Satisfactory; statusImageLinkLabel1.TabIndex = 16; statusImageLinkLabel1.Text = "Component Status"; statusImageLinkLabel1.TextAlign = ContentAlignment.MiddleLeft; statusImageLinkLabel1.TextFont = new Font("Tahoma", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 204); // // labelModel // labelModel.AutoSize = true; labelModel.Font = new Font("Tahoma", 12F, FontStyle.Regular, GraphicsUnit.Point, 204); labelModel.ForeColor = Color.DimGray; labelModel.Location = new Point(57, 30); labelModel.Name = "labelModel"; labelModel.Size = new Size(47, 19); labelModel.TabIndex = 21; labelModel.Text = "Date as of: "; // // ATLBsViewer // ATLBsViewer.ContextMenuStrip = contextMenuStrip; ATLBsViewer.Location = new Point(panelTopContainer.Left, panelTopContainer.Bottom); ATLBsViewer.Size = new Size(Width, Height - headerControl.Height - footerControl1.Height - panelTopContainer.Height); ATLBsViewer.SelectedItemsChanged += componentStatusesViewer_SelectedItemsChanged; // // ComponentStatusControl // BackColor = Color.FromArgb(241, 241, 241); Controls.Add(footerControl1); Controls.Add(panelTopContainer); Controls.Add(ATLBsViewer); Controls.Add(headerControl); Size = new Size(1042, 616); }
//, Aircraft parentAircraft) ///<summary> /// Создает страницу для отображения информации об одной директиве ///</summary> /// <param name="item">ModificationItem</param> ///// <param name="parentAircraft">ВС, которому принадлежит ModificationItem</param> public ModificationItemScreen(ModificationItem item) { if (item == null) throw new ArgumentNullException("item", "Argument cannot be null"); //this.parentAircraft = parentAircraft; currentItem = item; BackColor = Css.CommonAppearance.Colors.BackColor; Dock = DockStyle.Fill; footerControl = new FooterControl(); headerControl = new HeaderControl(); aircraftHeader = new AircraftHeaderControl((Aircraft)item.Parent, true); modificationItemContainer = new ExtendableRichContainer(); modificationItemControl = new ModificationItemControl(currentItem); mainPanel = new Panel(); panelHeader = new Panel(); buttonDeleteDirective = new RichReferenceButton(); // // aircraftHeader // aircraftHeader.AircraftClickable = true; // // headerControl // headerControl.Controls.Add(aircraftHeader); headerControl.ButtonEdit.TextMain = "Save"; headerControl.ButtonEdit.Icon = icons.Save; headerControl.ButtonEdit.IconNotEnabled = icons.SaveGray; headerControl.TabIndex = 0; headerControl.ContextActionControl.ShowPrintButton = false; headerControl.ButtonEdit.DisplayerRequested += ButtonSave_DisplayerRequested; headerControl.ReloadRised += headerControl_ReloadRised; // // footerControl // footerControl.TabIndex = 2; // // mainPanel // mainPanel.AutoScroll = true; mainPanel.Dock = DockStyle.Fill; mainPanel.TabIndex = 1; mainPanel.Controls.Add(containedPanel); // // containedPanel // containedPanel.AutoSize = true; containedPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink; containedPanel.FlowDirection = FlowDirection.TopDown; containedPanel.TabIndex = 1; // // modificationItemContainer // modificationItemContainer.BackColor = Css.CommonAppearance.Colors.BackColor; modificationItemContainer.LabelCaption.Text = "Modification Item"; modificationItemContainer.MainControl = modificationItemControl; modificationItemContainer.UpperLeftIcon = icons.GrayArrow; modificationItemContainer.TabIndex = 1; // // panelHeader // panelHeader.Size = new Size(1250, 50); panelHeader.TabIndex = 0; panelHeader.Controls.Add(buttonDeleteDirective); // // buttonDeleteDirective // buttonDeleteDirective.Anchor = AnchorStyles.Right | AnchorStyles.Top; buttonDeleteDirective.BackColor = Color.Transparent; buttonDeleteDirective.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDirective.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDirective.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDirective.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDirective.Location = new Point(panelHeader.Right - 160, 0); buttonDeleteDirective.Icon = icons.Delete; buttonDeleteDirective.IconNotEnabled = icons.DeleteGray; buttonDeleteDirective.IconLayout = ImageLayout.Center; buttonDeleteDirective.PaddingMain = new Padding(3, 0, 0, 0); buttonDeleteDirective.ReflectionType = ReflectionTypes.CloseSelected; buttonDeleteDirective.Size = new Size(160, 50); buttonDeleteDirective.TabIndex = 16; buttonDeleteDirective.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteDirective.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteDirective.TextMain = "Delete"; buttonDeleteDirective.TextSecondary = "record"; buttonDeleteDirective.DisplayerRequested += buttonDeleteDirective_DisplayerRequested; containedPanel.Controls.Add(panelHeader); containedPanel.Controls.Add(modificationItemContainer); Controls.Add(mainPanel); Controls.Add(footerControl); Controls.Add(headerControl); UpdateItem(); }
private void InitializeComponent() { ((DispatcheredAircraftCollectionScreen)this).InitComplition += AircraftCollectionScreen_InitComplition; mainPanel = new Panel(); biWeeklyReportsReference = new ReferenceStatusImageLinkLabel(); operatorInfoReference = new OperatorInfoReference(currentOperator); headerControl = new HeaderControl(); operatorHeaderControl = new OperatorHeaderControl(currentOperator); footerControl = new FooterControl(); templatesReference = new ReferenceStatusImageLinkLabel(); buttonAddAircraft = new RichReferenceButton(); buttonAddStore = new AvButtonT(); buttonDeleteOperator = new RichReferenceButton(); aircrafts = new AircraftCollectionControl(currentOperator.Aircrafts); stores = new StoreCollectionControl(currentOperator.Stores); linkStock = new ReferenceStatusImageLinkLabel(); linkReport = new ReferenceStatusImageLinkLabel(); // // mainPanel // mainPanel.Dock = DockStyle.Fill; mainPanel.Location = new Point(0, 58); mainPanel.Name = "mainPanel"; mainPanel.Size = new Size(1000, 547); mainPanel.TabIndex = 11; mainPanel.AutoScroll = true; mainPanel.SizeChanged += mainPanel_SizeChanged; // // operatorInfoReference // operatorInfoReference.Location = new Point(0, 20); // // biWeeklyReportsReference // biWeeklyReportsReference.Location = new Point(0, 200); biWeeklyReportsReference.Text = "BiWeekly Reports"; biWeeklyReportsReference.Enabled = true; biWeeklyReportsReference.ReflectionType = ReflectionTypes.DisplayInNew; biWeeklyReportsReference.DisplayerRequested += biWeeklyReportsReference_DisplayerRequested; Css.ImageLink.Adjust(biWeeklyReportsReference); // // templatesReference // templatesReference.Location = new Point(0, 225); templatesReference.Text = "Templates"; templatesReference.Enabled = true; templatesReference.ReflectionType = ReflectionTypes.DisplayInNew; templatesReference.DisplayerRequested += templatesReference_DisplayerRequested; Css.ImageLink.Adjust(templatesReference); // // headerControl // headerControl.Controls.Add(operatorHeaderControl); if (currentOperator.HasPermission(Users.CurrentUser, DataEvent.Update)) { headerControl.ActionControl.ButtonEdit.TextMain = "Edit"; headerControl.ActionControl.ButtonEdit.Icon = icons.Edit; headerControl.ActionControl.ButtonEdit.IconNotEnabled = icons.EditGray; } else { headerControl.ActionControl.ButtonEdit.TextMain = "View"; headerControl.ActionControl.ButtonEdit.Icon = icons.View; } headerControl.ActionControl.ButtonEdit.DisplayerText = currentOperator.Name + ". Summary"; headerControl.EditDisplayerRequested += headerControl_EditDisplayerRequested; headerControl.ReloadRised += headerControl_ReloadRised; headerControl.ContextActionControl.ButtonHelp.TopicID = "aircrafts_of_the_operator"; // // footerControl // footerControl.AutoSize = true; footerControl.AutoSizeMode = AutoSizeMode.GrowAndShrink; footerControl.BackColor = Color.Transparent; footerControl.Dock = DockStyle.Bottom; footerControl.Margin = new Padding(0); footerControl.Name = "footerControl"; footerControl.TabIndex = 113; // // aircrafts // aircrafts.Location = new Point(LEFT_COLUMN_WIDTH, 0); aircrafts.TaskStart += aircrafts_TaskStart; aircrafts.TaskEnd += aircrafts_TaskEnd; aircrafts.SizeChanged += aircrafts_SizeChanged; aircrafts.AutoSizeMode = AutoSizeMode.GrowAndShrink; // // buttonAddAircraft // buttonAddAircraft.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddAircraft.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddAircraft.Icon = icons.Add; buttonAddAircraft.IconNotEnabled = icons.AddGray; buttonAddAircraft.Width = 200; buttonAddAircraft.TextMain = "Add Aircraft"; buttonAddAircraft.DisplayerRequested += buttonAddAircraft_DisplayerRequested; buttonAddAircraft.Enabled = (currentOperator.AircraftCollection.HasPermission(Users.CurrentUser, DataEvent.Create)); // // stores // stores.Location = new Point(aircrafts.Right, 0); stores.TaskStart += stores_TaskStart; stores.TaskEnd += stores_TaskEnd; stores.Location = new Point(LEFT_COLUMN_WIDTH + aircrafts.DefaultWidth, 0); stores.SizeChanged += stores_SizeChanged; stores.AutoSizeMode = AutoSizeMode.GrowAndShrink; // // buttonAddStore // buttonAddStore.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddStore.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddStore.Icon = icons.Add; buttonAddStore.IconNotEnabled = icons.AddGray; buttonAddStore.Location = new Point(buttonAddAircraft.Right, stores.Bottom); buttonAddStore.Width = 200; buttonAddStore.TextMain = "Add Store"; buttonAddStore.Click += buttonAddStore_Click; buttonAddStore.Enabled = (currentOperator.AircraftCollection.HasPermission(Users.CurrentUser, DataEvent.Create)); //todo если что // // buttonDeleteOperator // buttonDeleteOperator.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteOperator.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteOperator.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteOperator.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteOperator.Icon = icons.Delete; buttonDeleteOperator.IconNotEnabled = icons.DeleteGray; buttonDeleteOperator.IconLayout = ImageLayout.Center; buttonDeleteOperator.PaddingMain = new Padding(3, 0, 0, 0); buttonDeleteOperator.ReflectionType = ReflectionTypes.CloseSelected; buttonDeleteOperator.Size = new Size(140, 50); buttonDeleteOperator.TabIndex = 16; buttonDeleteOperator.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteOperator.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteOperator.TextMain = "Delete"; buttonDeleteOperator.TextSecondary = "operator"; buttonDeleteOperator.DisplayerRequested += buttonDeleteOperator_DisplayerRequested; buttonDeleteOperator.Visible = (currentOperator.HasPermission(Users.CurrentUser, DataEvent.Remove)); // // linkStock // linkStock.Text = "Stock General Report"; linkStock.Enabled = true; linkStock.Status = Statuses.NotActive; linkStock.ReflectionType = ReflectionTypes.DisplayInNew; linkStock.DisplayerRequested += linkStock_DisplayerRequested; Css.ImageLink.Adjust(linkStock); // // linkReport // linkReport.Text = "Air Fleet Brief Report"; linkReport.Enabled = true; linkReport.Status = Statuses.NotActive; linkReport.ReflectionType = ReflectionTypes.DisplayInNew; linkReport.DisplayerRequested += linkReport_DisplayerRequested; Css.ImageLink.Adjust(linkReport); // // AircraftCollectionScreen // BackColor = Css.CommonAppearance.Colors.BackColor; mainPanel.Controls.Add(operatorInfoReference); mainPanel.Controls.Add(biWeeklyReportsReference); mainPanel.Controls.Add(templatesReference); mainPanel.Controls.Add(buttonDeleteOperator); mainPanel.Controls.Add(linkStock); mainPanel.Controls.Add(linkReport); mainPanel.Controls.Add(buttonAddStore); mainPanel.Controls.Add(buttonAddAircraft); //mainPanel.Controls.Add(flowLayoutPanelRight); mainPanel.Controls.Add(stores); mainPanel.Controls.Add(aircrafts); Controls.Add(mainPanel); Controls.Add(headerControl); Controls.Add(footerControl); }
private void InitializeComponent() { panelTopContainer = new Panel(); buttonDeleteSelected = new AvButtonT(); buttonApplyFilter = new AvButtonT(); buttonAddDirective = new RichReferenceButton(); labelDateAsOf = new Label(); labelTitle = new StatusImageLinkLabel(); contextMenuStrip = new ContextMenuStrip(); toolStripMenuItemOpen = new ToolStripMenuItem(); toolStripMenuItemCreateNew = new ToolStripMenuItem(); toolStripSeparator1 = new ToolStripSeparator(); toolStripMenuItemsWorkPackages = new List <ToolStripMenuItem>(); toolStripMenuItemComposeWorkPackage = new ToolStripMenuItem(); toolStripSeparator2 = new ToolStripSeparator(); toolStripMenuItemCopy = new ToolStripMenuItem(); toolStripMenuItemPaste = new ToolStripMenuItem(); toolStripMenuItemDelete = new ToolStripMenuItem(); // // toolStripMenuItemOpen // toolStripMenuItemOpen.Click += toolStripMenuItemOpen_Click; // // toolStripMenuItemCreateNew // toolStripMenuItemCreateNew.Text = "Create a new engineering order"; toolStripMenuItemCreateNew.Click += toolStripMenuItemCreateNew_Click; // // toolStripMenuItemComposeWorkPackage // toolStripMenuItemComposeWorkPackage.Text = "Compose a work package"; toolStripMenuItemComposeWorkPackage.Click += toolStripMenuItemComposeWorkPackage_Click; // // toolStripMenuItemCopy // toolStripMenuItemCopy.Text = "Copy (Ctrl+C)"; toolStripMenuItemCopy.Click += toolStripMenuItemCopy_Click; // // toolStripMenuItemPaste // toolStripMenuItemPaste.Text = "Paste (Ctrl+V)"; toolStripMenuItemPaste.Click += toolStripMenuItemPaste_Click; // // toolStripMenuItemDelete // toolStripMenuItemDelete.Text = "Delete"; toolStripMenuItemDelete.Click += toolStripMenuItemDelete_Click; footerControl1 = new FooterControl(); headerControl = new HeaderControl(); aircraftHeaderControl = new AircraftHeaderControl(); directiveListView = new EngineeringOrdersDirectiveListView(parentBaseDetail); // // panelTopContainer // panelTopContainer.AutoSize = true; panelTopContainer.Dock = DockStyle.Top; panelTopContainer.TabIndex = 1; panelTopContainer.BackColor = Css.SmallHeader.Colors.DarkForeColor; panelTopContainer.Controls.Add(buttonDeleteSelected); panelTopContainer.Controls.Add(buttonApplyFilter); panelTopContainer.Controls.Add(buttonAddDirective); panelTopContainer.Controls.Add(labelDateAsOf); panelTopContainer.Controls.Add(labelTitle); // // buttonApplyFilter // buttonApplyFilter.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonApplyFilter.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonApplyFilter.Icon = icons.ApplyFilter; buttonApplyFilter.Location = new Point(600, 0); buttonApplyFilter.Size = new Size(145, 59); buttonApplyFilter.TabIndex = 18; buttonApplyFilter.TextMain = "Apply filter"; buttonApplyFilter.Click += buttonApplyFilter_Click; // // buttonAddDirective // buttonAddDirective.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddDirective.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddDirective.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddDirective.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddDirective.Icon = icons.Add; buttonAddDirective.IconNotEnabled = icons.AddGray; buttonAddDirective.Location = new Point(770, 0); buttonAddDirective.ReflectionType = ReflectionTypes.DisplayInNew; buttonAddDirective.Size = new Size(220, 59); buttonAddDirective.TabIndex = 19; buttonAddDirective.TextAlignMain = ContentAlignment.BottomCenter; buttonAddDirective.TextAlignSecondary = ContentAlignment.TopCenter; buttonAddDirective.TextMain = "Add new"; buttonAddDirective.TextSecondary = "engineering order"; buttonAddDirective.DisplayerRequested += buttonAddDirective_DisplayerRequested; buttonAddDirective.Enabled = permissionForCreate; // // buttonDeleteSelected // buttonDeleteSelected.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.Enabled = false; buttonDeleteSelected.Icon = icons.Delete; buttonDeleteSelected.IconNotEnabled = icons.DeleteGray; buttonDeleteSelected.Location = new Point(920, 0); buttonDeleteSelected.PaddingSecondary = new Padding(4, 0, 0, 0); buttonDeleteSelected.Size = new Size(145, 59); buttonDeleteSelected.TabIndex = 20; buttonDeleteSelected.TextAlignMain = ContentAlignment.BottomLeft; buttonDeleteSelected.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteSelected.TextMain = "Delete"; buttonDeleteSelected.TextSecondary = "selected"; buttonDeleteSelected.Click += buttonDeleteSelected_Click; // // labelTitle // Css.HeaderLinkLabel.Adjust(labelTitle); labelTitle.Enabled = false; labelTitle.ImageLayout = ImageLayout.Center; labelTitle.Location = new Point(28, 3); labelTitle.Margin = new Padding(0); labelTitle.Size = new Size(412, 27); labelTitle.TabIndex = 16; labelTitle.TextAlign = ContentAlignment.MiddleLeft; // // labelDateAsOf // labelDateAsOf.AutoSize = true; labelDateAsOf.Font = Css.OrdinaryText.Fonts.RegularFont; labelDateAsOf.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelDateAsOf.Location = new Point(57, 30); labelDateAsOf.Size = new Size(47, 19); labelDateAsOf.TabIndex = 21; labelDateAsOf.Text = "Date as of: "; // // headerControl // headerControl.Controls.Add(aircraftHeaderControl); headerControl.ContextActionControl.ShowPrintButton = true; headerControl.ActionControl.ButtonEdit.Enabled = false; headerControl.ReloadRised += headerControl_ReloadRised; headerControl.EditDisplayerRequested += headerControl_EditDisplayerRequested; headerControl.ContextActionControl.ButtonPrint.DisplayerRequested += ButtonPrint_DisplayerRequested; headerControl.TabIndex = 0; headerControl.ContextActionControl.ButtonHelp.TopicID = "directives_aircraft_operations"; if (!permissionForUpdate) { headerControl.ActionControl.ButtonEdit.TextMain = "View"; headerControl.ActionControl.ButtonEdit.Icon = icons.View; headerControl.ActionControl.ButtonEdit.IconNotEnabled = icons.ViewGray; } // // footerControl1 // footerControl1.TabIndex = 4; // // aircraftHeaderControl // aircraftHeaderControl.AircraftClickable = true; aircraftHeaderControl.OperatorClickable = true; // // directiveListView // directiveListView.TabIndex = 2; directiveListView.ItemsListView.ContextMenuStrip = contextMenuStrip; directiveListView.Dock = DockStyle.Fill; directiveListView.Location = new Point(panelTopContainer.Left, panelTopContainer.Bottom); directiveListView.SelectedItemsChanged += directiveListView_SelectedItemsChanged; directiveListView.ItemsPasted += directivesViewer_ItemsPasted; directiveListView.ItemsDeleted += buttonDeleteSelected_Click; PerformEvents(true); Controls.Add(directiveListView); // // DirectiveListViewer // //this.AutoScroll = true; BackColor = Css.CommonAppearance.Colors.BackColor; Controls.Add(panelTopContainer); Controls.Add(footerControl1); Controls.Add(headerControl); }
/* #region public Statuses Status * * /// <summary> * /// Возвращает или устанавливает статус * /// </summary> * public Statuses Status * { * get { return statusImageLinkLabel1.Status; } * set { statusImageLinkLabel1.Status = value; } * } * #endregion * #region public string StatusText * * /// <summary> * /// Возвращает или устанавливает текст статуса * /// </summary> * public string StatusText * { * get { return statusImageLinkLabel1.Text; } * set { statusImageLinkLabel1.Text = value; } * } * #endregion*/ /* #region public Aircraft Aircraft * * /// <summary> * /// Текущее ВС * /// </summary> * public Aircraft Aircraft * { * get { return currentAircraft; } * set * { * currentAircraft = value; * UpdateInformation(); * } * } * #endregion*/ #endregion #region Methods #region private void InitializeComponent() private void InitializeComponent() { panelTopContainer = new Panel(); buttonDeleteSelected = new AvButtonT(); buttonApplyFilter = new AvButtonT(); buttonRegisterFlight = new RichReferenceButton(); footerControl1 = new FooterControl(); headerControl = new HeaderControl(); aircraftHeaderControl = new AircraftHeaderControl(currentAircraft, true, true); statusImageLinkLabel1 = new StatusImageLinkLabel(); labelDateFrom = new Label(); dateTimePickerDateFrom = new DateTimePicker(); labelDateTo = new Label(); dateTimePickerDateTo = new DateTimePicker(); buttonOK = new Button(); monthlyUtilizationViewer = new MonthlyUtilizationView(currentAircraft); #region Context menu contextMenuStrip = new ContextMenuStrip(); toolStripMenuItemCopy = new ToolStripMenuItem(); toolStripMenuItemPaste = new ToolStripMenuItem(); toolStripMenuItemDelete = new ToolStripMenuItem(); toolStripSeparator1 = new ToolStripSeparator(); toolStripMenuItemHighlight = new ToolStripMenuItem(); toolStripSeparator2 = new ToolStripSeparator(); toolStripMenuItemProperties = new ToolStripMenuItem(); // // toolStripMenuItemCopy // toolStripMenuItemCopy.Text = "Copy (Ctrl+C)"; toolStripMenuItemCopy.Click += toolStripMenuItemCopy_Click; toolStripMenuItemCopy.Enabled = false; // // toolStripMenuItemPaste // toolStripMenuItemPaste.Text = "Paste (Ctrl+V)"; toolStripMenuItemPaste.Click += toolStripMenuItemPaste_Click; toolStripMenuItemPaste.Enabled = false; // // toolStripMenuItemDelete // toolStripMenuItemDelete.Text = "Delete"; toolStripMenuItemDelete.Click += toolStripMenuItemDelete_Click; // // toolStripMenuItemHighlight // toolStripMenuItemHighlight.Text = "Highlight"; // // toolStripMenuItemProperties // toolStripMenuItemProperties.Text = "Properties"; toolStripMenuItemProperties.Click += toolStripMenuItemProperties_Click; #endregion // // panelTopContainer // panelTopContainer.AutoSize = true; panelTopContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTopContainer.BackColor = Color.FromArgb(211, 211, 211); panelTopContainer.Controls.Add(statusImageLinkLabel1); panelTopContainer.Controls.Add(labelDateFrom); panelTopContainer.Controls.Add(dateTimePickerDateFrom); panelTopContainer.Controls.Add(labelDateTo); panelTopContainer.Controls.Add(dateTimePickerDateTo); panelTopContainer.Controls.Add(buttonDeleteSelected); panelTopContainer.Controls.Add(buttonOK); panelTopContainer.Controls.Add(buttonApplyFilter); panelTopContainer.Controls.Add(buttonRegisterFlight); panelTopContainer.Dock = DockStyle.Top; panelTopContainer.Location = new Point(0, 0); panelTopContainer.Name = "panelTopContainer"; panelTopContainer.Size = new Size(1042, 62); panelTopContainer.TabIndex = 14; // // buttonApplyFilter // buttonApplyFilter.Visible = false; buttonApplyFilter.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonApplyFilter.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonApplyFilter.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonApplyFilter.Icon = icons.ApplyFilter; buttonApplyFilter.Size = new Size(145, 59); buttonApplyFilter.TabIndex = 19; buttonApplyFilter.TextMain = "Apply filter"; // // buttonAddDetail // buttonRegisterFlight.Enabled = permissionForCreate; //buttonAddDetail.Enabled = true; buttonRegisterFlight.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonRegisterFlight.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonRegisterFlight.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonRegisterFlight.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonRegisterFlight.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonRegisterFlight.Icon = icons.Add; buttonRegisterFlight.IconNotEnabled = icons.AddGray; buttonRegisterFlight.ReflectionType = ReflectionTypes.DisplayInNew; buttonRegisterFlight.Size = new Size(152, 59); buttonRegisterFlight.TabIndex = 15; buttonRegisterFlight.TextAlignMain = ContentAlignment.BottomCenter; buttonRegisterFlight.TextAlignSecondary = ContentAlignment.TopCenter; buttonRegisterFlight.TextMain = "Register"; buttonRegisterFlight.TextSecondary = "flight"; buttonRegisterFlight.DisplayerRequested += buttonRegisterFlight_DisplayerRequested; // // buttonDeleteSelected // buttonDeleteSelected.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonDeleteSelected.Enabled = false; buttonDeleteSelected.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.Icon = icons.Delete; buttonDeleteSelected.IconNotEnabled = icons.DeleteGray; buttonDeleteSelected.PaddingSecondary = new Padding(4, 0, 0, 0); buttonDeleteSelected.Size = new Size(145, 59); buttonDeleteSelected.TabIndex = 20; buttonDeleteSelected.TextAlignMain = ContentAlignment.BottomLeft; buttonDeleteSelected.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteSelected.TextMain = "Delete"; buttonDeleteSelected.TextSecondary = "selected"; buttonDeleteSelected.Click += buttonDeleteSelected_Click; // // footerControl1 // footerControl1.AutoSizeMode = AutoSizeMode.GrowAndShrink; footerControl1.BackColor = Color.Transparent; footerControl1.Dock = DockStyle.Bottom; footerControl1.Location = new Point(0, 568); footerControl1.Margin = new Padding(0); footerControl1.MaximumSize = new Size(0, 48); footerControl1.MinimumSize = new Size(0, 48); footerControl1.Name = "footerControl1"; footerControl1.Size = new Size(1042, 48); footerControl1.TabIndex = 10; // // headerControl // headerControl.ActionControlSplitterVisible = true; headerControl.ContextActionControl.ShowPrintButton = true; headerControl.BackColor = Color.Transparent; headerControl.BackgroundImage = Resources.HeaderBar; headerControl.Controls.Add(aircraftHeaderControl); headerControl.Dock = DockStyle.Top; headerControl.EditDisplayerText = "Component Status Operator"; headerControl.EditReflectionType = ReflectionTypes.DisplayInNew; headerControl.ActionControl.ShowEditButton = false; headerControl.Location = new Point(0, 0); headerControl.Name = "headerControl"; headerControl.Size = new Size(1042, 58); headerControl.TabIndex = 6; headerControl.ContextActionControl.ButtonPrint.DisplayerRequested += PrintButton_DisplayerRequested; headerControl.ReloadRised += headerControl1_ReloadRised; headerControl.ContextActionControl.ButtonHelp.TopicID = "component-status.html"; // // statusImageLinkLabel1 // statusImageLinkLabel1.LinkColor = Color.DimGray; statusImageLinkLabel1.Location = new Point(30, 3); statusImageLinkLabel1.Size = new Size(412, 27); statusImageLinkLabel1.Status = Statuses.Satisfactory; statusImageLinkLabel1.TabIndex = 16; statusImageLinkLabel1.TextAlign = ContentAlignment.MiddleLeft; statusImageLinkLabel1.TextFont = Css.HeaderLinkLabel.Fonts.Font; // // labelDateFrom // labelDateFrom.AutoSize = true; labelDateFrom.Font = Css.OrdinaryText.Fonts.SmallRegularFont; labelDateFrom.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelDateFrom.Location = new Point(32, 35); labelDateFrom.Text = "From"; // // dateTimePickerDateFrom // dateTimePickerDateFrom.Font = Css.WindowsForm.Fonts.RegularFont; dateTimePickerDateFrom.ForeColor = Css.WindowsForm.Colors.ForeColor; dateTimePickerDateFrom.BackColor = Color.White; dateTimePickerDateFrom.Location = new Point(80, 32); dateTimePickerDateFrom.Width = 100; dateTimePickerDateFrom.Format = DateTimePickerFormat.Custom; dateTimePickerDateFrom.CustomFormat = new TermsProvider()["DateFormat"].ToString(); if (DateTime.Now.Month == 1) { dateTimePickerDateFrom.Value = new DateTime(DateTime.Now.Year - 1, 12, 1); } else { dateTimePickerDateFrom.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, 1); } // // labelDateTo // labelDateTo.AutoSize = true; labelDateTo.Font = Css.OrdinaryText.Fonts.SmallRegularFont; labelDateTo.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelDateTo.Location = new Point(190, 35); labelDateTo.Text = "to"; // // dateTimePickerDateTo // dateTimePickerDateTo.Font = Css.WindowsForm.Fonts.RegularFont; dateTimePickerDateTo.ForeColor = Css.WindowsForm.Colors.ForeColor; dateTimePickerDateTo.BackColor = Color.White; dateTimePickerDateTo.Location = new Point(220, 32); dateTimePickerDateTo.Width = 100; dateTimePickerDateTo.Format = DateTimePickerFormat.Custom; dateTimePickerDateTo.CustomFormat = new TermsProvider()["DateFormat"].ToString(); // // buttonOK // buttonOK.UseVisualStyleBackColor = true; buttonOK.Font = Css.WindowsForm.Fonts.RegularFont; buttonOK.ForeColor = Css.WindowsForm.Colors.ForeColor; buttonOK.Location = new Point(340, 30); buttonOK.Width = 70; buttonOK.Text = "OK"; buttonOK.Click += buttonOK_Click; // // monthlyUtilizationViewer // monthlyUtilizationViewer.ContextMenuStrip = contextMenuStrip; monthlyUtilizationViewer.Location = new Point(panelTopContainer.Left, panelTopContainer.Bottom); monthlyUtilizationViewer.Size = new Size(Width, Height - headerControl.Height - footerControl1.Height - panelTopContainer.Height); monthlyUtilizationViewer.SelectedItemsChanged += monthlyUtilizationViewer_SelectedItemsChanged; monthlyUtilizationViewer.ItemsPasted += monthlyUtilizationViewer_ItemsPasted; monthlyUtilizationViewer.ItemsDeleted += buttonDeleteSelected_Click; // // ComponentStatusControl // BackColor = Color.FromArgb(241, 241, 241); Controls.Add(footerControl1); Controls.Add(panelTopContainer); Controls.Add(monthlyUtilizationViewer); Controls.Add(headerControl); Size = new Size(1042, 616); }
/// <summary> /// —оздает элемент управлени¤ дл¤ отображени¤ отдельного агрегата /// </summary> /// <param name="detail"></param> public TemplateDetailScreen(TemplateAbstractDetail detail) { if (detail == null) { throw new ArgumentNullException("detail", "Argument cannot be null"); } currentDetail = detail; BackColor = Css.CommonAppearance.Colors.BackColor; Dock = DockStyle.Fill; footerControl = new FooterControl(); headerControl = new HeaderControl(); if (currentDetail is TemplateDetail) { aircraftHeader = new TemplateAircraftHeaderControl(currentDetail.Parent.Parent as TemplateAircraft, true); } else { aircraftHeader = new TemplateAircraftHeaderControl(((TemplateBaseDetail)currentDetail).ParentAircraft, true); } generalInformationControl = new TemplateDetailGeneralInformationControl(currentDetail); limitationControl = new TemplateDatailLimitationsMaxResourcesControl(currentDetail); parametersControl = new TemplateDetailParametersControl(currentDetail); generalInformationContainer = new ExtendableRichContainer(); limitationsContainer = new ExtendableRichContainer(); parametersContainer = new ExtendableRichContainer(); buttonDeleteDetail = new RichReferenceButton(); buttonAddTemplate = new AvButtonT(); // // aircraftHeader // aircraftHeader.AircraftClickable = true; // // headerControl // headerControl.Controls.Add(aircraftHeader); headerControl.ButtonEdit.TextMain = "Save"; headerControl.ButtonEdit.Icon = icons.Save; headerControl.ButtonEdit.IconNotEnabled = icons.SaveGray; headerControl.TabIndex = 0; headerControl.ButtonEdit.DisplayerRequested += ButtonSave_DisplayerRequested; headerControl.ReloadRised += headerControl_ReloadRised; // // generalInformationContainer // generalInformationContainer.Dock = DockStyle.Top; generalInformationContainer.UpperLeftIcon = icons.GrayArrow; generalInformationContainer.Caption = "Component General Information"; generalInformationContainer.MainControl = generalInformationControl; generalInformationContainer.TabIndex = 1; // // limitationsContainer // limitationsContainer.Dock = DockStyle.Top; limitationsContainer.UpperLeftIcon = icons.GrayArrow; limitationsContainer.Caption = "Limitations. Max resources"; limitationsContainer.MainControl = limitationControl; limitationsContainer.TabIndex = 2; // // parametersContainer // parametersContainer.Dock = DockStyle.Top; parametersContainer.UpperLeftIcon = icons.GrayArrow; parametersContainer.Caption = "Parameters"; parametersContainer.MainControl = parametersControl; parametersContainer.TabIndex = 3; // // panelHeader // panelHeader.AutoSize = true; panelHeader.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelHeader.Dock = DockStyle.Top; panelHeader.TabIndex = 0; panelHeader.Controls.Add(buttonDeleteDetail); // // buttonDeleteDetail // buttonDeleteDetail.Anchor = AnchorStyles.Right | AnchorStyles.Top; buttonDeleteDetail.BackColor = Color.Transparent; buttonDeleteDetail.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDetail.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDetail.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDetail.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDetail.Location = new Point(panelHeader.Right - 160, 0); buttonDeleteDetail.Icon = icons.Delete; buttonDeleteDetail.IconNotEnabled = icons.DeleteGray; buttonDeleteDetail.IconLayout = ImageLayout.Center; buttonDeleteDetail.Name = "buttonDeleteDetail"; buttonDeleteDetail.NormalBackgroundImage = null; buttonDeleteDetail.PaddingMain = new Padding(3, 0, 0, 0); buttonDeleteDetail.ReflectionType = ReflectionTypes.CloseSelected; buttonDeleteDetail.Size = new Size(160, 50); buttonDeleteDetail.TabIndex = 16; buttonDeleteDetail.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteDetail.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteDetail.TextMain = "Delete"; buttonDeleteDetail.TextSecondary = "component"; buttonDeleteDetail.DisplayerRequested += avButtonDeleteDetail_DisplayerRequested; // // buttonAddTemplate // buttonAddTemplate.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonAddTemplate.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddTemplate.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddTemplate.Icon = icons.Add; buttonAddTemplate.IconNotEnabled = icons.AddGray; buttonAddTemplate.Width = 160; buttonAddTemplate.Location = new Point(mainPanel.Right - buttonAddTemplate.Width - 10, mainPanel.Bottom - buttonAddTemplate.Height - 10); buttonAddTemplate.TextMain = "Add To Database"; buttonAddTemplate.Click += buttonAddTemplate_Click; buttonAddTemplate.TabIndex = 4; buttonAddTemplate.Visible = false; // // mainPanel // mainPanel.Dock = DockStyle.Fill; mainPanel.AutoScroll = true; mainPanel.TabIndex = 1; mainPanel.Controls.Add(buttonAddTemplate); if ((currentDetail is TemplateDetail) || (currentDetail is TemplateEngine)) { mainPanel.Controls.Add(parametersContainer); } mainPanel.Controls.Add(limitationsContainer); mainPanel.Controls.Add(generalInformationContainer); mainPanel.Controls.Add(panelHeader); Controls.Add(mainPanel); Controls.Add(footerControl); Controls.Add(headerControl); UpdateDetail(false); }
/* #region public DirectiveListReportBuilder ReportBuilder * * /// <summary> * /// Создатель отчетов списка директив * /// </summary> * public DirectiveListReportBuilder ReportBuilder * { * get { return reportBuilder; } * set { reportBuilder = value; } * } * #endregion*/ /* #region public ListView ItemsListView * * /// <summary> * /// Возвращает ListView с директивами * /// </summary> * public ListView ItemsListView * { * get * { * return workPackagesViewer.ItemsListView; * } * } * #endregion*/ #endregion #region Methods #region private void InitializeComponent() private void InitializeComponent() { workPackagesViewer = new WorkPackagesListView(currentAircraft); panelTopContainer = new Panel(); buttonDeleteSelected = new AvButtonT(); buttonComposeWorkPackage = new RichReferenceButton(); labelTitle = new StatusImageLinkLabel(); footerControl1 = new FooterControl(); headerControl = new HeaderControl(); aircraftHeaderControl = new AircraftHeaderControl(); contextMenuStrip = new ContextMenuStrip(); toolStripMenuItemOpen = new ToolStripMenuItem(); toolStripMenuItemProperties = new ToolStripMenuItem(); toolStripMenuItemPublish = new ToolStripMenuItem(); toolStripSeparator1 = new ToolStripSeparator(); toolStripMenuItemComposeWorkPackage = new ToolStripMenuItem(); toolStripMenuItemClose = new ToolStripMenuItem(); toolStripSeparator2 = new ToolStripSeparator(); toolStripMenuItemDelete = new ToolStripMenuItem(); // // headerControl // headerControl.ActionControlSplitterVisible = true; headerControl.BackColor = Color.Transparent; headerControl.BackgroundImage = Resources.HeaderBar; headerControl.Controls.Add(aircraftHeaderControl); headerControl.Dock = DockStyle.Top; headerControl.ActionControl.ShowEditButton = false; headerControl.ContextActionControl.ShowPrintButton = true; headerControl.ContextActionControl.ButtonPrint.DisplayerRequested += ButtonPrint_DisplayerRequested; headerControl.Location = new Point(0, 0); headerControl.Size = new Size(1042, 58); headerControl.TabIndex = 0; headerControl.ReloadRised += ButtonReload_Click; headerControl.ContextActionControl.ButtonHelp.TopicID = "airworthiness-directives-status.html"; if (!permissionForUpdate) { headerControl.ActionControl.ButtonEdit.TextMain = "View"; headerControl.ActionControl.ButtonEdit.Icon = icons.View; headerControl.ActionControl.ButtonEdit.IconNotEnabled = icons.ViewGray; } // // aircraftHeaderControl // aircraftHeaderControl.AircraftClickable = true; aircraftHeaderControl.BackColor = Color.Transparent; aircraftHeaderControl.Location = new Point(0, 0); aircraftHeaderControl.OperatorClickable = true; aircraftHeaderControl.Size = new Size(381, 58); // // footerControl1 // footerControl1.AutoSize = true; footerControl1.AutoSizeMode = AutoSizeMode.GrowAndShrink; footerControl1.BackColor = Color.Transparent; footerControl1.Dock = DockStyle.Bottom; footerControl1.Location = new Point(0, 568); footerControl1.Margin = new Padding(0); footerControl1.MaximumSize = new Size(0, 48); footerControl1.MinimumSize = new Size(0, 48); footerControl1.Size = new Size(1042, 48); footerControl1.TabIndex = 4; // // panelTopContainer // panelTopContainer.AutoSize = true; panelTopContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTopContainer.BackColor = Color.LightGray; panelTopContainer.Controls.Add(buttonDeleteSelected); panelTopContainer.Controls.Add(buttonComposeWorkPackage); panelTopContainer.Controls.Add(labelTitle); panelTopContainer.Dock = DockStyle.Top; panelTopContainer.Size = new Size(1042, 62); panelTopContainer.TabIndex = 1; // // labelTitle // Css.HeaderLinkLabel.Adjust(labelTitle); labelTitle.Enabled = false; labelTitle.ImageLayout = ImageLayout.Center; labelTitle.Location = new Point(28, 3); labelTitle.Margin = new Padding(0); labelTitle.Size = new Size(412, 27); labelTitle.TabIndex = 16; labelTitle.TextAlign = ContentAlignment.MiddleLeft; // // buttonComposeWorkPackage // buttonComposeWorkPackage.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonComposeWorkPackage.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonComposeWorkPackage.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonComposeWorkPackage.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonComposeWorkPackage.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonComposeWorkPackage.Icon = icons.Add; buttonComposeWorkPackage.IconNotEnabled = icons.AddGray; buttonComposeWorkPackage.Location = new Point(770, 0); buttonComposeWorkPackage.ReflectionType = ReflectionTypes.DisplayInNew; buttonComposeWorkPackage.Size = new Size(180, 59); buttonComposeWorkPackage.TabIndex = 19; buttonComposeWorkPackage.TextAlignMain = ContentAlignment.BottomCenter; buttonComposeWorkPackage.TextAlignSecondary = ContentAlignment.TopCenter; buttonComposeWorkPackage.TextMain = "Compose a"; buttonComposeWorkPackage.TextSecondary = "Work Package"; buttonComposeWorkPackage.DisplayerRequested += ButtonComposeWorkPackage_DisplayerRequested; // // buttonDeleteSelected // buttonDeleteSelected.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonDeleteSelected.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.Click += ButtonDelete_Click; buttonDeleteSelected.Icon = icons.Delete; buttonDeleteSelected.IconNotEnabled = icons.DeleteGray; buttonDeleteSelected.Location = new Point(920, 0); buttonDeleteSelected.PaddingSecondary = new Padding(4, 0, 0, 0); buttonDeleteSelected.Size = new Size(145, 59); buttonDeleteSelected.TabIndex = 20; buttonDeleteSelected.TextAlignMain = ContentAlignment.BottomLeft; buttonDeleteSelected.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteSelected.TextMain = "Delete"; buttonDeleteSelected.TextSecondary = "selected"; // // workPackagesViewer // workPackagesViewer.ItemsListView.ContextMenuStrip = contextMenuStrip; workPackagesViewer.Location = new Point(panelTopContainer.Left, panelTopContainer.Bottom); workPackagesViewer.SelectedItemsChanged += directivesViewer_SelectedItemsChanged; Controls.Add(workPackagesViewer); // // contextMenuStrip // contextMenuStrip.Items.AddRange(new ToolStripItem[] { toolStripMenuItemOpen, toolStripMenuItemProperties, toolStripSeparator1, toolStripMenuItemPublish, toolStripMenuItemClose, toolStripSeparator2, toolStripMenuItemComposeWorkPackage, toolStripMenuItemDelete }); contextMenuStrip.Size = new Size(179, 176); // // toolStripMenuItemOpen // toolStripMenuItemOpen.Font = new Font("Tahoma", 8.25F, FontStyle.Bold); toolStripMenuItemOpen.Size = new Size(178, 22); //toolStripMenuItemOpen.Text = "View details"; toolStripMenuItemOpen.Click += toolStripMenuItemOpen_Click; // // toolStripMenuItemProperties // toolStripMenuItemProperties.Size = new Size(178, 22); toolStripMenuItemProperties.Click += toolStripMenuItemProperties_Click; toolStripMenuItemProperties.Text = "Properties"; // // toolStripSeparator1 // toolStripSeparator1.Size = new Size(175, 6); // // toolStripMenuItemPublish // toolStripMenuItemPublish.Size = new Size(178, 22); toolStripMenuItemPublish.Text = "Publish"; toolStripMenuItemPublish.Click += toolStripMenuItemAdd_Click; // // toolStripMenuItemClose // toolStripMenuItemClose.Size = new Size(178, 22); toolStripMenuItemClose.Text = "Close"; toolStripMenuItemClose.Click += toolStripMenuItemClose_Click; // // toolStripSeparator2 // toolStripSeparator2.Size = new Size(175, 6); // // toolStripMenuItemComposeWorkPackage // toolStripMenuItemComposeWorkPackage.Size = new Size(178, 22); toolStripMenuItemComposeWorkPackage.Text = "Compose a Work Package"; toolStripMenuItemComposeWorkPackage.Click += toolStripMenuItemPerform_Click; // // toolStripMenuItemDelete // toolStripMenuItemDelete.Size = new Size(178, 22); toolStripMenuItemDelete.Text = "Delete"; toolStripMenuItemDelete.Click += toolStripMenuItemDelete_Click; // // DirectiveListViewer // AutoScroll = true; BackColor = Css.CommonAppearance.Colors.BackColor; Controls.Add(panelTopContainer); Controls.Add(footerControl1); Controls.Add(headerControl); }
/// <summary> /// Initializes object /// </summary> private void Initialize() { pictureBoxArrow = new PictureBox(); labelTitle = new Label(); labelOperatorsCount = new Label(); buttonAddOperator = new RichReferenceButton(); Size = new Size(400, 70); // // pictureBoxArrow // pictureBoxArrow.Image = new Icons().GrayArrow; pictureBoxArrow.SizeMode = PictureBoxSizeMode.AutoSize; pictureBoxArrow.Location = new Point(Padding.Left, 10 + Padding.Top); // // labelTitle // labelTitle.Text = "Operators"; labelTitle.AutoSize = true; labelTitle.Location = new Point(pictureBoxArrow.Width + pictureBoxArrow.Left + 5, 7 + Padding.Top); Css.HeaderText.Adjust(labelTitle); // // labelOperatorsCount // labelOperatorsCount.AutoSize = true; labelOperatorsCount.Location = new Point(pictureBoxArrow.Width + pictureBoxArrow.Left + 9, 15 + Padding.Top + labelTitle.Height); Css.OrdinaryText.Adjust(labelOperatorsCount); // // buttonAddOperator // buttonAddOperator.FontMain = new System.Drawing.Font("Verdana", 12F); buttonAddOperator.FontSecondary = new System.Drawing.Font("Verdana", 12F); buttonAddOperator.ForeColorMain = System.Drawing.Color.FromArgb(125, 195, 42); buttonAddOperator.ForeColorSecondary = System.Drawing.Color.FromArgb(122, 122, 122); buttonAddOperator.Icon = icons.Add; buttonAddOperator.IconNotEnabled = icons.AddGray; buttonAddOperator.IconLayout = System.Windows.Forms.ImageLayout.Center; buttonAddOperator.PaddingMain = new System.Windows.Forms.Padding(0, 7, 0, 0); buttonAddOperator.PaddingSecondary = new System.Windows.Forms.Padding(0); buttonAddOperator.ReflectionType = CAS.UI.Management.Dispatchering.ReflectionTypes.DisplayInNew; buttonAddOperator.Size = new System.Drawing.Size(131, 50); buttonAddOperator.TextAlignMain = System.Drawing.ContentAlignment.MiddleLeft; buttonAddOperator.TextAlignSecondary = System.Drawing.ContentAlignment.TopLeft; buttonAddOperator.TextMain = "Add new"; buttonAddOperator.TextSecondary = "operator"; buttonAddOperator.Location = new Point(250, 7); buttonAddOperator.Displayer = null; buttonAddOperator.DisplayerText = null; buttonAddOperator.Entity = null; buttonAddOperator.ReflectionType = CAS.UI.Management.Dispatchering.ReflectionTypes.DisplayInNew; buttonAddOperator.DisplayerRequested += new EventHandler <ReferenceEventArgs>(buttonAddOperator_DisplayerRequested); buttonAddOperator.DisplayerText = "Add operator"; buttonAddOperator.Visible = false; Controls.Add(labelTitle); Controls.Add(labelOperatorsCount); Controls.Add(buttonAddOperator); Controls.Add(pictureBoxArrow); UpdateContent(); }
//private readonly string easaFileName = "EASA Form 8330.pdf"; #endregion #region Constructor /// <summary> /// Создает элемент управления для отображения отдельного агрегата /// </summary> /// <param name="detail"></param> public DetailScreen(AbstractDetail detail) { if (detail == null) { throw new ArgumentNullException("detail", "Argument cannot be null"); } currentDetail = detail; BackColor = Css.CommonAppearance.Colors.BackColor; Dock = DockStyle.Fill; footerControl = new FooterControl(); headerControl = new HeaderControl(); aircraftHeader = new AircraftHeaderControl(currentDetail.Aircraft, true); baseDetailHeaderControl = new BaseDetailHeaderControl(currentDetail); generalInformationControl = new DetailGeneralInformationControl(currentDetail); compliancePerformanceControl = new DetailCompliancePerformanceListControl(currentDetail); warrantyControl = new DetailWarrantyControl(currentDetail); easaControl = new EASAControl(currentDetail, "Adobe PDF Files|*.pdf", "This record does not contain a file proving the origin of the detail. Enclose PDF file to prove the origin.", "Attached file proves the origin of the detail.", icons.PDFSmall); if (!currentDetail.InUse) { storeControl = new DetailStoreControl(currentDetail); } complianceControl = new DetailComplianceListView(currentDetail); generalInformationContainer = new ExtendableRichContainer(); compliancePerformanceContainer = new ExtendableRichContainer(); warrantyContainer = new ExtendableRichContainer(); easaContainer = new ExtendableRichContainer(); storeContainer = new ExtendableRichContainer(); complianceDetailContainer = new ExtendableRichContainer(); buttonAddCompliance = new AvButtonT(); buttonAddActualData = new AvButtonT(); buttonDeleteRecord = new AvButtonT(); buttonEditRecord = new AvButtonT(); buttonInstallPickOffDetail = new RichReferenceButton(); // // aircraftHeader // aircraftHeader.AircraftClickable = true; // // headerControl // headerControl.Controls.Add(aircraftHeader); headerControl.ButtonEdit.TextMain = "Save"; headerControl.ButtonEdit.Icon = icons.Save; headerControl.ButtonEdit.IconNotEnabled = icons.SaveGray; headerControl.TabIndex = 0; headerControl.ContextActionControl.ShowPrintButton = true; headerControl.ButtonEdit.DisplayerRequested += ButtonSave_DisplayerRequested; headerControl.ReloadRised += headerControl_ReloadRised; headerControl.ContextActionControl.ButtonPrint.DisplayerRequested += ButtonPrint_DisplayerRequested; headerControl.ContextActionControl.ButtonHelp.TopicID = "work_with_the_aggregate"; // // mainPanel // mainPanel.AutoScroll = true; mainPanel.Dock = DockStyle.Fill; mainPanel.TabIndex = 1; mainPanel.Controls.Add(containedPanel); // // containedPanel // containedPanel.AutoSize = true; containedPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink; containedPanel.FlowDirection = FlowDirection.TopDown; containedPanel.TabIndex = 1; // // generalInformationContainer // generalInformationContainer.Extended = false; generalInformationContainer.BackColor = Css.CommonAppearance.Colors.BackColor; generalInformationContainer.UpperLeftIcon = icons.GrayArrow; generalInformationContainer.Caption = "Component General Information"; generalInformationContainer.MainControl = generalInformationControl; generalInformationContainer.TabIndex = 2; // // compliancePerformanceContainer // compliancePerformanceContainer.Extended = false; compliancePerformanceContainer.BackColor = Css.CommonAppearance.Colors.BackColor; compliancePerformanceContainer.UpperLeftIcon = icons.GrayArrow; compliancePerformanceContainer.Caption = "Compliance/Performance"; compliancePerformanceContainer.MainControl = compliancePerformanceControl; compliancePerformanceContainer.TabIndex = 3; // // warrantyContainer // warrantyContainer.Extended = false; warrantyContainer.BackColor = Css.CommonAppearance.Colors.BackColor; warrantyContainer.UpperLeftIcon = icons.GrayArrow; warrantyContainer.Caption = "Warranty"; warrantyContainer.MainControl = warrantyControl; warrantyContainer.TabIndex = 4; // // easaContainer // easaContainer.Extended = false; easaContainer.BackColor = Css.CommonAppearance.Colors.BackColor; easaContainer.UpperLeftIcon = icons.GrayArrow; //easaContainer.Caption = "EASA / FAA Form 8330"; easaContainer.Caption = "FAA Form 8330"; easaContainer.MainControl = easaControl; easaContainer.TabIndex = 5; // // storeContainer // storeContainer.Extended = false; storeContainer.BackColor = Css.CommonAppearance.Colors.BackColor; storeContainer.UpperLeftIcon = icons.GrayArrow; storeContainer.Caption = "Store"; storeContainer.MainControl = storeControl; storeContainer.TabIndex = 7; // // buttonAddCompliance // buttonAddCompliance.BackColor = Color.Transparent; buttonAddCompliance.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddCompliance.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddCompliance.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddCompliance.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddCompliance.Icon = icons.Add; buttonAddCompliance.IconNotEnabled = icons.AddGray; buttonAddCompliance.IconLayout = ImageLayout.Center; buttonAddCompliance.PaddingSecondary = new Padding(0); buttonAddCompliance.Size = new Size(150, 50); buttonAddCompliance.TabIndex = 16; buttonAddCompliance.TextAlignMain = ContentAlignment.MiddleLeft; buttonAddCompliance.TextAlignSecondary = ContentAlignment.TopCenter; buttonAddCompliance.TextMain = "Register Compliance"; buttonAddCompliance.Click += buttonAddCompliance_Click; // // buttonAddActualData // buttonAddActualData.BackColor = Color.Transparent; buttonAddActualData.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddActualData.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddActualData.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddActualData.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddActualData.Icon = icons.Add; buttonAddActualData.IconNotEnabled = icons.AddGray; buttonAddActualData.IconLayout = ImageLayout.Center; buttonAddActualData.PaddingSecondary = new Padding(0); buttonAddActualData.Size = new Size(150, 50); buttonAddActualData.TabIndex = 16; buttonAddActualData.TextAlignMain = ContentAlignment.MiddleLeft; buttonAddActualData.TextAlignSecondary = ContentAlignment.TopCenter; buttonAddActualData.TextMain = "Set Actual State"; buttonAddActualData.Click += buttonAddActualData_Click; // // buttonEditRecord // buttonEditRecord.BackColor = Color.Transparent; buttonEditRecord.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonEditRecord.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonEditRecord.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonEditRecord.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonEditRecord.Icon = icons.Edit; buttonEditRecord.IconNotEnabled = icons.EditGray; buttonEditRecord.IconLayout = ImageLayout.Center; buttonEditRecord.PaddingSecondary = new Padding(0); buttonEditRecord.Size = new Size(130, 50); buttonEditRecord.TabIndex = 16; buttonEditRecord.TextAlignMain = ContentAlignment.MiddleLeft; buttonEditRecord.TextAlignSecondary = ContentAlignment.TopCenter; buttonEditRecord.TextMain = "Edit"; buttonEditRecord.Click += buttonEditRecord_Click; // // buttonDeleteRecord // buttonDeleteRecord.BackColor = Color.Transparent; buttonDeleteRecord.Cursor = Cursors.Hand; buttonDeleteRecord.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteRecord.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteRecord.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteRecord.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteRecord.Icon = icons.Delete; buttonDeleteRecord.IconNotEnabled = icons.DeleteGray; buttonDeleteRecord.IconLayout = ImageLayout.Center; buttonDeleteRecord.PaddingSecondary = new Padding(0); buttonDeleteRecord.Size = new Size(150, 50); buttonDeleteRecord.TabIndex = 16; buttonDeleteRecord.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteRecord.TextAlignSecondary = ContentAlignment.TopCenter; buttonDeleteRecord.TextMain = "Remove"; buttonDeleteRecord.Click += buttonDeleteRecord_Click; // // buttonInstallPickOffDetail // buttonInstallPickOffDetail.BackColor = Color.Transparent; buttonInstallPickOffDetail.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonInstallPickOffDetail.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonInstallPickOffDetail.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonInstallPickOffDetail.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonInstallPickOffDetail.Icon = icons.Edit; buttonInstallPickOffDetail.IconNotEnabled = icons.EditGray; buttonInstallPickOffDetail.IconLayout = ImageLayout.Center; buttonInstallPickOffDetail.PaddingSecondary = new Padding(0); buttonInstallPickOffDetail.Size = new Size(150, 50); buttonInstallPickOffDetail.TabIndex = 16; buttonInstallPickOffDetail.TextAlignMain = ContentAlignment.MiddleLeft; buttonInstallPickOffDetail.TextAlignSecondary = ContentAlignment.TopCenter; buttonInstallPickOffDetail.ReflectionType = ReflectionTypes.DisplayInCurrent; if (currentDetail.InUse) { buttonInstallPickOffDetail.TextMain = "Pick Off"; } else { buttonInstallPickOffDetail.TextMain = "Install"; } buttonInstallPickOffDetail.DisplayerRequested += buttonInstallPickOffDetail_DisplayerRequested; // // complianceControl // complianceControl.Dock = DockStyle.Top; complianceControl.Height = 188; complianceControl.SelectedItemsChanged += complianceDirectiveControl_SelectedItemsChanged; complianceControl.ItemEdited += complianceDirectiveControl_ItemEdited; complianceControl.SizeChanged += complianceDirectiveControl_SizeChanged; // // panelCompliance // panelCompliance.AutoSize = true; panelCompliance.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelCompliance.BackColor = Css.CommonAppearance.Colors.BackColor; panelCompliance.Dock = DockStyle.Top; panelCompliance.Visible = false; panelCompliance.TabIndex = 7; panelCompliance.Controls.Add(complianceControl); panelCompliance.Controls.Add(buttonAddCompliance); panelCompliance.Controls.Add(buttonAddActualData); panelCompliance.Controls.Add(buttonEditRecord); panelCompliance.Controls.Add(buttonDeleteRecord); panelCompliance.Controls.Add(buttonInstallPickOffDetail); // // baseDetailHeaderControl // baseDetailHeaderControl.TabIndex = 0; // // complianceDetailContainer // complianceDetailContainer.LabelCaption.Text = "Compliance"; complianceDetailContainer.UpperLeftIcon = icons.GrayArrow; complianceDetailContainer.Extending += complianceDirectiveContainer_Extending; complianceDetailContainer.TabIndex = 6; containedPanel.Controls.Add(baseDetailHeaderControl); containedPanel.Controls.Add(generalInformationContainer); containedPanel.Controls.Add(compliancePerformanceContainer); containedPanel.Controls.Add(warrantyContainer); containedPanel.Controls.Add(easaContainer); if (!currentDetail.InUse) { containedPanel.Controls.Add(storeContainer); } containedPanel.Controls.Add(complianceDetailContainer); containedPanel.Controls.Add(panelCompliance); Controls.Add(mainPanel); Controls.Add(footerControl); Controls.Add(headerControl); UpdateDetail(false); complianceDirectiveControl_SelectedItemsChanged(complianceControl, new SelectedItemsChangeEventArgs(0)); }
/// <summary> /// Создает элемент управления для отображения информации о шаблонной директиве /// </summary> public TemplateDirectiveScreen(TemplateBaseDetailDirective directive) { if (directive == null) { throw new ArgumentNullException("directive", "Argument cannot be null"); } currentDirective = directive; BackColor = Css.CommonAppearance.Colors.BackColor; Dock = DockStyle.Fill; footerControl = new FooterControl(); headerControl = new HeaderControl(); aircraftHeader = new TemplateAircraftHeaderControl(currentDirective.Parent.Parent as TemplateAircraft, true, true); generalDataAndPerformanceContainer = new ExtendableRichContainer(); attributesAndParametersContainer = new ExtendableRichContainer(); generalDataAndPerformanceControl = new TemplateDirectiveGeneralInformationControl(currentDirective); attributesAndParametersControl = new TemplateDirectiveAttributesControl(currentDirective); mainPanel = new Panel(); panelHeader = new Panel(); buttonDeleteDirective = new RichReferenceButton(); buttonAddTemplate = new AvButtonT(); // // headerControl // headerControl.Controls.Add(aircraftHeader); headerControl.ButtonEdit.TextMain = "Save"; headerControl.ButtonEdit.Icon = icons.Save; headerControl.ButtonEdit.IconNotEnabled = icons.SaveGray; headerControl.TabIndex = 0; headerControl.ButtonEdit.DisplayerRequested += ButtonSave_DisplayerRequested; headerControl.ReloadRised += headerControl_ReloadRised; // // generalDataAndPerformanceContainer // generalDataAndPerformanceContainer.BackColor = Css.CommonAppearance.Colors.BackColor; generalDataAndPerformanceContainer.Dock = DockStyle.Top; generalDataAndPerformanceContainer.LabelCaption.Text = "General Data And Performance"; generalDataAndPerformanceContainer.MainControl = generalDataAndPerformanceControl; generalDataAndPerformanceContainer.UpperLeftIcon = icons.GrayArrow; generalDataAndPerformanceContainer.TabIndex = 1; // // attributesAndParametersContainer // attributesAndParametersContainer.BackColor = Css.CommonAppearance.Colors.BackColor; attributesAndParametersContainer.Dock = DockStyle.Top; attributesAndParametersContainer.LabelCaption.Text = "Attributes And Additional Parameters"; attributesAndParametersContainer.MainControl = attributesAndParametersControl; attributesAndParametersContainer.UpperLeftIcon = icons.GrayArrow; attributesAndParametersContainer.TabIndex = 2; // // buttonDeleteDirective // buttonDeleteDirective.Anchor = AnchorStyles.Right | AnchorStyles.Top; buttonDeleteDirective.BackColor = Color.Transparent; buttonDeleteDirective.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDirective.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDirective.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDirective.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDirective.Location = new Point(panelHeader.Right - 160, 0); buttonDeleteDirective.Icon = icons.Delete; buttonDeleteDirective.IconNotEnabled = icons.DeleteGray; buttonDeleteDirective.IconLayout = ImageLayout.Center; buttonDeleteDirective.PaddingMain = new Padding(3, 0, 0, 0); buttonDeleteDirective.ReflectionType = ReflectionTypes.CloseSelected; buttonDeleteDirective.Size = new Size(160, 50); buttonDeleteDirective.TabIndex = 16; buttonDeleteDirective.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteDirective.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteDirective.TextMain = "Delete"; buttonDeleteDirective.TextSecondary = "directive"; buttonDeleteDirective.DisplayerRequested += buttonDeleteDirective_DisplayerRequested; // // buttonAddTemplate // buttonAddTemplate.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonAddTemplate.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddTemplate.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddTemplate.Icon = icons.Add; buttonAddTemplate.IconNotEnabled = icons.AddGray; buttonAddTemplate.Width = 160; buttonAddTemplate.Location = new Point(mainPanel.Right - buttonAddTemplate.Width - 10, mainPanel.Bottom - buttonAddTemplate.Height - 10); buttonAddTemplate.TextMain = "Add To Database"; buttonAddTemplate.Click += buttonAddTemplate_Click; buttonAddTemplate.TabIndex = 3; buttonAddTemplate.Visible = false; // // panelHeader // panelHeader.AutoSize = true; panelHeader.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelHeader.Dock = DockStyle.Top; panelHeader.Controls.Add(buttonDeleteDirective); panelHeader.TabIndex = 0; // // mainPanel // mainPanel.AutoScroll = true; mainPanel.Dock = DockStyle.Fill; mainPanel.TabIndex = 1; mainPanel.Controls.Add(buttonAddTemplate); mainPanel.Controls.Add(attributesAndParametersContainer); mainPanel.Controls.Add(generalDataAndPerformanceContainer); mainPanel.Controls.Add(panelHeader); // // this // Controls.Add(mainPanel); Controls.Add(footerControl); Controls.Add(headerControl); UpdateDirective(false); }
private void Initialize() { header = new HeaderControl(); operatorHeaderControl = new OperatorHeaderControl("Operators", icons.Operators); footer = new FooterControl(); mainPanel = new Panel(); flowLayoutPanelRight = new FlowLayoutPanel(); operatorCollectionControl = new OperatorCollectionControl(); biWeeklyReference = new BiWeeklyReportsReference(); //usersReference = new UsersReference(); templatesReference = new TemplatesReference("Templates"); buttonAddOperator = new RichReferenceButton(); operatorCollectionControl.SizeChanged += operatorCollectionControl_SizeChanged; // // header // header.ActionControl.ShowEditButton = false; header.Controls.Add(operatorHeaderControl); header.ReloadRised += header_ReloadRised; header.ContextActionControl.ButtonHelp.TopicID = "aircrafts_of_the_operator"; // // mainPanel // mainPanel.AutoScroll = true; mainPanel.Dock = DockStyle.Fill; mainPanel.SizeChanged += mainPanel_SizeChanged; // // biWeeklyReference // //biWeeklyReference.ShowAllReference.Text = "Show all BiWeeklies"; biWeeklyReference.AutoSize = true; biWeeklyReference.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; //biWeeklyReference.Caption = "BiWeekly Reports"; biWeeklyReference.DescriptionTextColor = Color.DimGray; biWeeklyReference.Location = new Point(30, 60); biWeeklyReference.Margin = new Padding(30, 60, 30, 30); biWeeklyReference.Size = new Size(297, 101); biWeeklyReference.TabIndex = 7; biWeeklyReference.UpperLeftIcon = new Icons().GrayArrow; //biWeeklyReference.ShowAllReference.DisplayerRequested += new EventHandler<ReferenceEventArgs>(ShowAllReference_DisplayerRequested); // // templatesReference // templatesReference.Caption = "Templates"; templatesReference.Margin = new Padding(30, 20, 30, 10); // // usersReference // //usersReference.Margin = new Padding(30, 0, 30, 30); // // flowLayoutPanelRight // flowLayoutPanelRight.Controls.Add(biWeeklyReference); flowLayoutPanelRight.Controls.Add(templatesReference); //flowLayoutPanelRight.Controls.Add(usersReference); flowLayoutPanelRight.Dock = DockStyle.Right; flowLayoutPanelRight.FlowDirection = FlowDirection.TopDown; flowLayoutPanelRight.Location = new Point(612, 0); flowLayoutPanelRight.Size = new Size(RIGHT_PANEL_WIDTH, 100); // // buttonAddOperator // buttonAddOperator.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonAddOperator.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddOperator.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddOperator.Icon = icons.Add; buttonAddOperator.IconNotEnabled = icons.AddGray; buttonAddOperator.Width = 200; buttonAddOperator.Location = new Point(operatorCollectionControl.Left, operatorCollectionControl.Bottom); buttonAddOperator.TextMain = "Add Operator"; buttonAddOperator.DisplayerRequested += buttonAddOperator_DisplayerRequested; if (Users.CurrentUser.Role != UserRole.Administrator) { buttonAddOperator.Visible = false; } // // OperatorsCollectionScreen // BackColor = Css.CommonAppearance.Colors.BackColor; Controls.Add(mainPanel); Controls.Add(footer); Controls.Add(header); mainPanel.Controls.Add(operatorCollectionControl); mainPanel.Controls.Add(buttonAddOperator); mainPanel.Controls.Add(flowLayoutPanelRight); buttonAddOperator.Enabled = (OperatorCollection.Instance.HasPermission(Users.CurrentUser, DataEvent.Update)); UpdateInformation(); }
private void InitializeComponent() { panelTopContainer = new Panel(); buttonDeleteSelected = new AvButtonT(); buttonAddSelectedToBaseDetail = new AvButtonT(); buttonApplyFilter = new AvButtonT(); labelCaption = new StatusImageLinkLabel(); buttonAddDetail = new RichReferenceButton(); footerControl1 = new FooterControl(); headerControl1 = new HeaderControl(); aircraftHeaderControl = new TemplateAircraftHeaderControl(CurrentAircraft, true, true); panelTopContainer.SuspendLayout(); headerControl1.SuspendLayout(); SuspendLayout(); #region Context menu contextMenuStrip1 = new ContextMenuStrip(); toolStripMenuItemTitle = new ToolStripMenuItem(); toolStripSeparator1 = new ToolStripSeparator(); toolStripMenuItemAdd = new ToolStripMenuItem(); toolStripSeparator2 = new ToolStripSeparator(); toolStripMenuItemOverhaul = new ToolStripMenuItem(); toolStripMenuItemInspection = new ToolStripMenuItem(); toolStripMenuItemShopVisit = new ToolStripMenuItem(); toolStripMenuItemHotSectionInspection = new ToolStripMenuItem(); toolStripMenuItemDelete = new ToolStripMenuItem(); // // contextMenuStrip1 // contextMenuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItemTitle, toolStripSeparator1, toolStripMenuItemAdd, toolStripSeparator2, toolStripMenuItemDelete }); contextMenuStrip1.Name = "contextMenuStrip1"; contextMenuStrip1.Size = new Size(179, 176); // // toolStripMenuItemTitle // toolStripMenuItemTitle.Name = "toolStripMenuItemTitle"; toolStripMenuItemTitle.Size = new Size(178, 22); toolStripMenuItemTitle.Text = "Component"; toolStripMenuItemTitle.Click += toolStripMenuItemEdit_Click; // // toolStripSeparator1 // toolStripSeparator1.Name = "toolStripSeparator1"; toolStripSeparator1.Size = new Size(175, 6); // // toolStripMenuItemAdd // toolStripMenuItemAdd.Name = "toolStripMenuItemAdd"; toolStripMenuItemAdd.Size = new Size(178, 22); toolStripMenuItemAdd.Text = "Add Component "; toolStripMenuItemAdd.Click += toolStripMenuItemAdd_Click; // // toolStripSeparator2 // toolStripSeparator2.Name = "toolStripSeparator2"; toolStripSeparator2.Size = new Size(175, 6); // // toolStripMenuItemDelete // toolStripMenuItemDelete.Name = "toolStripMenuItemDelete"; toolStripMenuItemDelete.Size = new Size(178, 22); toolStripMenuItemDelete.Text = "Delete"; toolStripMenuItemDelete.Click += toolStripMenuItemDelete_Click; #endregion // // detailListView // detailListView = new TemplateDetailListView(DetailSource, initialFilter); detailListView.ContextMenuStrip = contextMenuStrip1; detailListView.Location = new Point(panelTopContainer.Left, panelTopContainer.Bottom); detailListView.Size = new Size(Width, Height - headerControl1.Height - footerControl1.Height - panelTopContainer.Height); detailListView.SelectedItemsChanged += componentStatusesViewer_SelectedItemsChanged; Controls.Add(detailListView); // // panelTopContainer // panelTopContainer.AutoSize = true; panelTopContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTopContainer.BackColor = Color.FromArgb(211, 211, 211); panelTopContainer.Controls.Add(labelCaption); panelTopContainer.Controls.Add(buttonDeleteSelected); panelTopContainer.Controls.Add(buttonApplyFilter); panelTopContainer.Controls.Add(buttonAddSelectedToBaseDetail); panelTopContainer.Controls.Add(buttonAddDetail); panelTopContainer.Dock = DockStyle.Top; panelTopContainer.Location = new Point(0, 0); panelTopContainer.Name = "panelTopContainer"; panelTopContainer.Size = new Size(1042, 62); panelTopContainer.TabIndex = 14; // // buttonApplyFilter // buttonApplyFilter.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonApplyFilter.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonApplyFilter.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonApplyFilter.Icon = icons.ApplyFilter; buttonApplyFilter.Size = new Size(145, 59); buttonApplyFilter.TabIndex = 19; buttonApplyFilter.TextMain = "Apply filter"; buttonApplyFilter.Click += buttonApplyFilter_Click; // // buttonAddSelectedToBaseDetail // buttonAddSelectedToBaseDetail.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonAddSelectedToBaseDetail.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddSelectedToBaseDetail.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddSelectedToBaseDetail.Icon = icons.ApplyFilter; buttonAddSelectedToBaseDetail.Size = new Size(200, 59); buttonAddSelectedToBaseDetail.TabIndex = 22; buttonAddSelectedToBaseDetail.TextMain = "Add Selected To Base Component"; buttonAddSelectedToBaseDetail.Click += buttonAddSelectedToBaseDetail_Click; // // buttonAddDetail // buttonAddDetail.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonAddDetail.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddDetail.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddDetail.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddDetail.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddDetail.Icon = icons.Add; buttonAddDetail.IconNotEnabled = icons.AddGray; buttonAddDetail.ReflectionType = ReflectionTypes.DisplayInNew; buttonAddDetail.Size = new Size(152, 59); buttonAddDetail.TabIndex = 15; buttonAddDetail.TextAlignMain = ContentAlignment.BottomCenter; buttonAddDetail.TextAlignSecondary = ContentAlignment.TopCenter; buttonAddDetail.TextMain = "Add new"; buttonAddDetail.TextSecondary = "component"; buttonAddDetail.DisplayerRequested += buttonAddDetail_DisplayerRequested; // // buttonDeleteSelected // buttonDeleteSelected.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonDeleteSelected.Enabled = false; buttonDeleteSelected.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.Icon = icons.Delete; buttonDeleteSelected.IconNotEnabled = icons.DeleteGray; buttonDeleteSelected.PaddingSecondary = new Padding(4, 0, 0, 0); buttonDeleteSelected.Size = new Size(145, 59); buttonDeleteSelected.TabIndex = 20; buttonDeleteSelected.TextAlignMain = ContentAlignment.BottomLeft; buttonDeleteSelected.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteSelected.TextMain = "Delete"; buttonDeleteSelected.TextSecondary = "selected"; buttonDeleteSelected.Click += buttonDeleteSelected_Click; // // labelCaption // labelCaption.ActiveLinkColor = Color.Black; labelCaption.Enabled = false; labelCaption.HoveredLinkColor = Color.Black; labelCaption.ImageBackColor = Color.Transparent; labelCaption.ImageLayout = ImageLayout.Center; labelCaption.LinkColor = Color.DimGray; labelCaption.LinkMouseCapturedColor = Color.Empty; labelCaption.Location = new Point(28, 3); labelCaption.Margin = new Padding(0); labelCaption.Size = new Size(600, 27); labelCaption.Status = Statuses.Pending; labelCaption.TabIndex = 16; labelCaption.TextAlign = ContentAlignment.MiddleLeft; labelCaption.TextFont = new Font("Tahoma", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 204); // // footerControl1 // footerControl1.AutoSizeMode = AutoSizeMode.GrowAndShrink; footerControl1.BackColor = Color.Transparent; footerControl1.Dock = DockStyle.Bottom; footerControl1.Location = new Point(0, 568); footerControl1.Margin = new Padding(0); footerControl1.MaximumSize = new Size(0, 48); footerControl1.MinimumSize = new Size(0, 48); footerControl1.Name = "footerControl1"; footerControl1.Size = new Size(1042, 48); footerControl1.TabIndex = 10; // // headerControl1 // headerControl1.ActionControlSplitterVisible = true; headerControl1.ActionControl.ButtonEdit.Enabled = false; headerControl1.ContextActionControl.ShowPrintButton = false; headerControl1.BackColor = Color.Transparent; headerControl1.BackgroundImage = Resources.HeaderBar; headerControl1.Controls.Add(aircraftHeaderControl); headerControl1.Dock = DockStyle.Top; headerControl1.EditDisplayerText = "Component Status Operator"; headerControl1.EditReflectionType = ReflectionTypes.DisplayInNew; headerControl1.EditDisplayerRequested += headerControl1_EditDisplayerRequested; headerControl1.Location = new Point(0, 0); headerControl1.Name = "headerControl1"; headerControl1.Size = new Size(1042, 58); headerControl1.TabIndex = 6; headerControl1.ContextActionControl.ButtonPrint.DisplayerRequested += PrintButton_DisplayerRequested; headerControl1.ReloadRised += headerControl1_ReloadRised; // // aircraftHeaderControl // aircraftHeaderControl.Aircraft = null; aircraftHeaderControl.AircraftClickable = true; aircraftHeaderControl.BackColor = Color.Transparent; aircraftHeaderControl.Location = new Point(0, 0); aircraftHeaderControl.Name = "aircraftHeaderControl"; aircraftHeaderControl.OperatorClickable = true; aircraftHeaderControl.Size = new Size(381, 58); // // DetailListScreen // BackColor = Color.FromArgb(241, 241, 241); Controls.Add(footerControl1); Controls.Add(panelTopContainer); Controls.Add(headerControl1); Name = "ComponentStatusScreen"; Size = new Size(1042, 616); panelTopContainer.ResumeLayout(false); panelTopContainer.PerformLayout(); headerControl1.ResumeLayout(false); headerControl1.PerformLayout(); ResumeLayout(false); PerformLayout(); }
private void InitializeComponent() { Lifelength lifelength4 = new Lifelength(); panelTopContainer = new Panel(); buttonDeleteSelected = new AvButtonT(); buttonApplyFilter = new AvButtonT(); buttonAddDirective = new RichReferenceButton(); labelTitle = new StatusImageLinkLabel(); #region Context menu contextMenuStrip = new ContextMenuStrip(); toolStripMenuItemAdd = new ToolStripMenuItem(); toolStripMenuItemView = new ToolStripMenuItem(); toolStripSeparator2 = new ToolStripSeparator(); toolStripMenuItemDelete = new ToolStripMenuItem(); // // contextMenuStrip // contextMenuStrip.Items.AddRange(new ToolStripItem[] { toolStripMenuItemView, toolStripMenuItemAdd, toolStripSeparator2, toolStripMenuItemDelete }); contextMenuStrip.Name = "contextMenuStrip"; contextMenuStrip.Size = new Size(179, 176); // // toolStripMenuItemAdd // toolStripMenuItemAdd.Name = "toolStripMenuItemAdd"; toolStripMenuItemAdd.Size = new Size(178, 22); toolStripMenuItemAdd.Text = "Add Directive "; toolStripMenuItemAdd.Click += toolStripMenuItemAdd_Click; // // toolStripMenuItemView // toolStripMenuItemView.Name = "toolStripMenuItemView"; toolStripMenuItemView.Size = new Size(178, 22); toolStripMenuItemView.Text = "View details"; toolStripMenuItemView.Click += toolStripMenuItemView_Click; // // toolStripSeparator2 // toolStripSeparator2.Name = "toolStripSeparator2"; toolStripSeparator2.Size = new Size(175, 6); // // toolStripMenuItemDelete // toolStripMenuItemDelete.Name = "toolStripMenuItemDelete"; toolStripMenuItemDelete.Size = new Size(178, 22); toolStripMenuItemDelete.Text = "Delete"; toolStripMenuItemDelete.Click += toolStripMenuItemDelete_Click; #endregion footerControl1 = new FooterControl(); headerControl1 = new HeaderControl(); aircraftHeaderControl = new TemplateAircraftHeaderControl(); panelTopContainer.SuspendLayout(); headerControl1.SuspendLayout(); SuspendLayout(); // // directivesViewer // directivesViewer = new TemplateDirectiveListView(DirectiveSource, viewFilter); directivesViewer.TabIndex = 2; directivesViewer.ItemsListView.ContextMenuStrip = contextMenuStrip; directivesViewer.Location = new Point(panelTopContainer.Left, panelTopContainer.Bottom); directivesViewer.SelectedItemsChanged += directivesViewer_SelectedItemsChanged; PerformEvents(true); // // panelTopContainer // panelTopContainer.AutoSize = true; panelTopContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTopContainer.BackColor = Color.LightGray; panelTopContainer.Controls.Add(buttonDeleteSelected); panelTopContainer.Controls.Add(buttonApplyFilter); panelTopContainer.Controls.Add(buttonAddDirective); panelTopContainer.Controls.Add(labelTitle); panelTopContainer.Dock = DockStyle.Top; panelTopContainer.Location = new Point(0, 0); panelTopContainer.Name = "panelTopContainer"; panelTopContainer.Size = new Size(1042, 62); panelTopContainer.TabIndex = 1; // // buttonApplyFilter // buttonApplyFilter.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonApplyFilter.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonApplyFilter.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonApplyFilter.Icon = icons.ApplyFilter; buttonApplyFilter.Location = new Point(600, 0); buttonApplyFilter.Size = new Size(145, 59); buttonApplyFilter.TabIndex = 18; buttonApplyFilter.TextMain = "Apply filter"; buttonApplyFilter.Click += buttonApplyFilter_Click; // // buttonAddDirective // buttonAddDirective.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonAddDirective.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddDirective.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddDirective.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddDirective.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddDirective.Icon = icons.Add; buttonAddDirective.IconNotEnabled = icons.AddGray; buttonAddDirective.Location = new Point(770, 0); buttonAddDirective.ReflectionType = ReflectionTypes.DisplayInNew; buttonAddDirective.Size = new Size(140, 59); buttonAddDirective.TabIndex = 19; buttonAddDirective.TextAlignMain = ContentAlignment.BottomCenter; buttonAddDirective.TextAlignSecondary = ContentAlignment.TopCenter; buttonAddDirective.TextMain = "Add new"; buttonAddDirective.TextSecondary = "directive"; buttonAddDirective.DisplayerRequested += referenceAvalonButtonAddDirective_DisplayerRequested; // // buttonDeleteSelected // buttonDeleteSelected.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonDeleteSelected.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.Click += buttonDeleteSelected_Click; buttonDeleteSelected.Icon = icons.Delete; buttonDeleteSelected.IconNotEnabled = icons.DeleteGray; buttonDeleteSelected.Location = new Point(920, 0); buttonDeleteSelected.PaddingSecondary = new Padding(4, 0, 0, 0); buttonDeleteSelected.Size = new Size(145, 59); buttonDeleteSelected.TabIndex = 20; buttonDeleteSelected.TextAlignMain = ContentAlignment.BottomLeft; buttonDeleteSelected.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteSelected.TextMain = "Delete"; buttonDeleteSelected.TextSecondary = "selected"; // // labelTitle // labelTitle.ActiveLinkColor = Color.Black; labelTitle.Enabled = false; labelTitle.HoveredLinkColor = Color.Black; labelTitle.ImageBackColor = Color.Transparent; labelTitle.ImageLayout = ImageLayout.Center; labelTitle.LinkColor = Color.DimGray; labelTitle.LinkMouseCapturedColor = Color.Empty; labelTitle.Location = new Point(28, 3); labelTitle.Margin = new Padding(0); labelTitle.Name = "labelTitle"; labelTitle.Size = new Size(600, 27); labelTitle.Status = Statuses.Pending; labelTitle.TabIndex = 16; labelTitle.TextAlign = ContentAlignment.MiddleLeft; labelTitle.TextFont = new Font("Tahoma", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 204); // // lifelength4 // lifelength4.Applicable = false; lifelength4.Calendar = TimeSpan.Parse("00:00:00"); lifelength4.Cycles = 0; lifelength4.Hours = TimeSpan.Parse("00:00:00"); lifelength4.IsCalendarApplicable = false; lifelength4.IsCyclesApplicable = false; lifelength4.IsHoursApplicable = false; // // footerControl1 // footerControl1.AutoSize = true; footerControl1.AutoSizeMode = AutoSizeMode.GrowAndShrink; footerControl1.BackColor = Color.Transparent; footerControl1.Dock = DockStyle.Bottom; footerControl1.Location = new Point(0, 568); footerControl1.Margin = new Padding(0); footerControl1.MaximumSize = new Size(0, 48); footerControl1.MinimumSize = new Size(0, 48); footerControl1.Name = "footerControl1"; footerControl1.Size = new Size(1042, 48); footerControl1.TabIndex = 4; // // headerControl1 // headerControl1.ActionControlSplitterVisible = true; headerControl1.BackColor = Color.Transparent; headerControl1.BackgroundImage = Resources.HeaderBar; headerControl1.Controls.Add(aircraftHeaderControl); headerControl1.Dock = DockStyle.Top; headerControl1.EditDisplayerText = "Edit operator"; headerControl1.ContextActionControl.ShowPrintButton = false; headerControl1.ContextActionControl.ButtonPrint.DisplayerRequested += ButtonPrint_DisplayerRequested; headerControl1.EditReflectionType = ReflectionTypes.DisplayInNew; headerControl1.Location = new Point(0, 0); headerControl1.Name = "headerControl1"; headerControl1.Size = new Size(1042, 58); headerControl1.TabIndex = 0; headerControl1.EditDisplayerRequested += headerControl1_EditDisplayerRequested; headerControl1.ReloadRised += ButtonReload_ReloadRised; // // aircraftHeaderControl // aircraftHeaderControl.Aircraft = null; aircraftHeaderControl.AircraftClickable = true; aircraftHeaderControl.BackColor = Color.Transparent; aircraftHeaderControl.Location = new Point(0, 0); aircraftHeaderControl.Name = "aircraftHeaderControl"; aircraftHeaderControl.OperatorClickable = true; aircraftHeaderControl.Size = new Size(381, 58); // // DirectiveListViewer // AutoScroll = true; BackColor = Color.FromArgb(241, 241, 241); Controls.Add(directivesViewer); Controls.Add(panelTopContainer); Controls.Add(footerControl1); Controls.Add(headerControl1); Name = "DirectiveListViewer"; Size = new Size(1042, 616); panelTopContainer.ResumeLayout(false); panelTopContainer.PerformLayout(); headerControl1.ResumeLayout(false); headerControl1.PerformLayout(); ResumeLayout(false); PerformLayout(); }
private void InitializeComponent() { panelTopContainer = new Panel(); buttonDeleteSelected = new AvButtonT(); buttonApplyFilter = new AvButtonT(); buttonAddDirective = new RichReferenceButton(); labelTitle = new StatusImageLinkLabel(); footerControl1 = new FooterControl(); headerControl1 = new HeaderControl(); aircraftHeaderControl = new AircraftHeaderControl(); contextMenuStrip = new ContextMenuStrip(); toolStripMenuItemAddNew = new ToolStripMenuItem(); toolStripMenuItemOpen = new ToolStripMenuItem(); toolStripSeparator1 = new ToolStripSeparator(); toolStripMenuItemDelete = new ToolStripMenuItem(); // // contextMenuStrip // contextMenuStrip.Items.AddRange(new ToolStripItem[] { toolStripMenuItemOpen, toolStripMenuItemAddNew, toolStripSeparator1, toolStripMenuItemDelete }); contextMenuStrip.Size = new Size(179, 176); // // toolStripMenuItemOpen // toolStripMenuItemOpen.Size = new Size(178, 22); toolStripMenuItemOpen.Click += toolStripMenuItemOpen_Click; // // toolStripMenuItemAddNew // toolStripMenuItemAddNew.Size = new Size(178, 22); toolStripMenuItemAddNew.Text = "Add New Modification Item"; toolStripMenuItemAddNew.Click += toolStripMenuItemAddNew_Click; // // toolStripSeparator1 // toolStripSeparator1.Size = new Size(175, 6); // // toolStripMenuItemDelete // toolStripMenuItemDelete.Size = new Size(178, 22); toolStripMenuItemDelete.Text = "Delete"; toolStripMenuItemDelete.Click += toolStripMenuItemDelete_Click; // // panelTopContainer // panelTopContainer.AutoSize = true; panelTopContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTopContainer.BackColor = Color.LightGray; panelTopContainer.Controls.Add(buttonDeleteSelected); panelTopContainer.Controls.Add(buttonApplyFilter); panelTopContainer.Controls.Add(buttonAddDirective); panelTopContainer.Controls.Add(labelTitle); panelTopContainer.Dock = DockStyle.Top; panelTopContainer.Size = new Size(1042, 62); panelTopContainer.TabIndex = 1; // // buttonApplyFilter // buttonApplyFilter.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonApplyFilter.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonApplyFilter.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonApplyFilter.Icon = icons.ApplyFilter; buttonApplyFilter.Location = new Point(600, 0); buttonApplyFilter.Size = new Size(145, 59); buttonApplyFilter.TabIndex = 18; buttonApplyFilter.TextMain = "Apply filter"; buttonApplyFilter.Click += ButtonApplyFilter_Click; buttonApplyFilter.Visible = false; // // buttonAddDirective // buttonAddDirective.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonAddDirective.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddDirective.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddDirective.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddDirective.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddDirective.Icon = icons.Add; buttonAddDirective.IconNotEnabled = icons.AddGray; buttonAddDirective.Location = new Point(770, 0); buttonAddDirective.ReflectionType = ReflectionTypes.DisplayInNew; buttonAddDirective.Size = new Size(140, 59); buttonAddDirective.TabIndex = 19; buttonAddDirective.TextAlignMain = ContentAlignment.BottomCenter; buttonAddDirective.TextAlignSecondary = ContentAlignment.TopCenter; buttonAddDirective.TextMain = "Add new"; buttonAddDirective.TextSecondary = "record"; buttonAddDirective.DisplayerRequested += ButtonAddDirective_DisplayerRequested; // // buttonDeleteSelected // buttonDeleteSelected.ActiveBackColor = Color.FromArgb(200, 200, 200); buttonDeleteSelected.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteSelected.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteSelected.Click += ButtonDelete_Click; buttonDeleteSelected.Icon = icons.Delete; buttonDeleteSelected.IconNotEnabled = icons.DeleteGray; buttonDeleteSelected.Location = new Point(920, 0); buttonDeleteSelected.PaddingSecondary = new Padding(4, 0, 0, 0); buttonDeleteSelected.Size = new Size(145, 59); buttonDeleteSelected.TabIndex = 20; buttonDeleteSelected.TextAlignMain = ContentAlignment.BottomLeft; buttonDeleteSelected.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteSelected.TextMain = "Delete"; buttonDeleteSelected.TextSecondary = "selected"; // // labelTitle // Css.HeaderLinkLabel.Adjust(labelTitle); labelTitle.Enabled = false; labelTitle.ImageLayout = ImageLayout.Center; labelTitle.Location = new Point(28, 3); labelTitle.Margin = new Padding(0); labelTitle.Size = new Size(600, 27); labelTitle.TabIndex = 16; labelTitle.TextAlign = ContentAlignment.MiddleLeft; // // headerControl1 // headerControl1.ActionControlSplitterVisible = true; headerControl1.BackColor = Color.Transparent; headerControl1.BackgroundImage = Resources.HeaderBar; headerControl1.Controls.Add(aircraftHeaderControl); headerControl1.Dock = DockStyle.Top; headerControl1.EditDisplayerText = "Edit operator"; headerControl1.ContextActionControl.ShowPrintButton = true; headerControl1.ContextActionControl.ButtonPrint.DisplayerRequested += ButtonPrint_DisplayerRequested; headerControl1.EditReflectionType = ReflectionTypes.DisplayInNew; headerControl1.Location = new Point(0, 0); headerControl1.Name = "headerControl1"; headerControl1.Size = new Size(1042, 58); headerControl1.TabIndex = 0; headerControl1.EditDisplayerRequested += ButtonEdit_DisplayerRequested; headerControl1.ReloadRised += ButtonReload_Click; if (!permissionForUpdate) { headerControl1.ActionControl.ButtonEdit.TextMain = "View"; headerControl1.ActionControl.ButtonEdit.Icon = icons.View; headerControl1.ActionControl.ButtonEdit.IconNotEnabled = icons.ViewGray; } // // aircraftHeaderControl // aircraftHeaderControl.AircraftClickable = true; aircraftHeaderControl.BackColor = Color.Transparent; aircraftHeaderControl.Location = new Point(0, 0); aircraftHeaderControl.Name = "aircraftHeaderControl"; aircraftHeaderControl.OperatorClickable = true; aircraftHeaderControl.Size = new Size(381, 58); // // DirectiveListViewer // AutoScroll = true; BackColor = Css.CommonAppearance.Colors.BackColor; Controls.Add(panelTopContainer); Controls.Add(footerControl1); Controls.Add(headerControl1); }
/// <summary> /// —оздает элемент управлени¤ дл¤ отображени¤ статуса агрегата и ссылок на отчеты /// </summary> public BaseDetailHeaderControl(AbstractDetail detail) { currentDetail = detail; statusLinkLabel = new StatusImageLinkLabel(); checkBoxServiceable = new CheckBox(); if (detail is BaseDetail) { flowLayoutPanelLinks = new BaseDetailLinksFlowLayoutPanel((BaseDetail)detail); } else { flowLayoutPanelLinks = new BaseDetailLinksFlowLayoutPanel(null); } buttonDeleteDetail = new RichReferenceButton(); // // statusLinkLabel // statusLinkLabel.ActiveLinkColor = Color.Black; statusLinkLabel.Enabled = false; statusLinkLabel.HoveredLinkColor = Color.Black; statusLinkLabel.ImageBackColor = Color.Transparent; statusLinkLabel.ImageLayout = ImageLayout.Center; statusLinkLabel.LinkColor = Color.DimGray; statusLinkLabel.LinkMouseCapturedColor = Color.Empty; statusLinkLabel.Size = new Size(350, 27); statusLinkLabel.TextAlign = ContentAlignment.MiddleLeft; statusLinkLabel.TextFont = Css.OrdinaryText.Fonts.RegularFont; // // checkBoxServiceable // checkBoxServiceable.Cursor = Cursors.Hand; checkBoxServiceable.FlatStyle = FlatStyle.Flat; checkBoxServiceable.Font = Css.SimpleLink.Fonts.Font; checkBoxServiceable.ForeColor = Css.SimpleLink.Colors.LinkColor; checkBoxServiceable.Location = new Point(MARGIN, statusLinkLabel.Bottom + HEIGHT_INTERVAL); checkBoxServiceable.Size = new Size(LABEL_WIDTH, LABEL_HEIGHT); checkBoxServiceable.Text = "Serviceable"; // // flowLayoutPanelLinks // flowLayoutPanelLinks.Location = new Point(statusLinkLabel.Right, 0); flowLayoutPanelLinks.Size = new Size(500, 100); // // buttonDeleteDetail // buttonDeleteDetail.Anchor = AnchorStyles.Right | AnchorStyles.Top; buttonDeleteDetail.BackColor = Color.Transparent; buttonDeleteDetail.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDetail.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteDetail.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDetail.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteDetail.Icon = icons.Delete; buttonDeleteDetail.IconNotEnabled = icons.DeleteGray; buttonDeleteDetail.IconLayout = ImageLayout.Center; buttonDeleteDetail.Name = "buttonDeleteDetail"; buttonDeleteDetail.NormalBackgroundImage = null; buttonDeleteDetail.PaddingMain = new Padding(3, 0, 0, 0); buttonDeleteDetail.ReflectionType = ReflectionTypes.CloseSelected; buttonDeleteDetail.Size = new Size(160, 50); buttonDeleteDetail.TabIndex = 16; buttonDeleteDetail.TextAlignMain = ContentAlignment.MiddleLeft; buttonDeleteDetail.TextAlignSecondary = ContentAlignment.TopLeft; buttonDeleteDetail.TextMain = "Delete"; buttonDeleteDetail.TextSecondary = "component"; buttonDeleteDetail.DisplayerRequested += buttonDeleteDetail_DisplayerRequested; BackColor = Css.CommonAppearance.Colors.BackColor; Controls.Add(statusLinkLabel); Controls.Add(checkBoxServiceable); if (detail is BaseDetail) { Size = new Size(1250, 100); Controls.Add(flowLayoutPanelLinks); } else { Size = new Size(1250, 50); } if (!(detail is AircraftFrame)) { Controls.Add(buttonDeleteDetail); } }
/// <summary> /// Semiautomatically generated code /// </summary> private void InitializeComponent() { tableLayoutPanelReferences = new TableLayoutPanel(); mainPanel = new Panel(); flowLayoutPanelBaseDetailsContainer = new FlowLayoutPanel(); aircraftReferencesControl1 = new TemplateAircraftReferencesControl(); aircraftInfoReference = new TemplateAircraftInfoReference(currentAircraft); footerControl = new FooterControl(); headerControl = new HeaderControl(); aircraftHeader = new TemplateAircraftHeaderControl(currentAircraft, true, false); buttonAddTemplate = new RichReferenceButton(); buttonDeleteTemplate = new RichReferenceButton(); buttonAddBaseDetail = new AvButtonT(); aircraftFrameControl = new TemplateBaseDetailControl(currentAircraft.AircraftFrame); landingGearsButtons = new TemplateLandingGearsButtonsControl(currentAircraft); linkLandingGearStatus = new ReferenceStatusImageLinkLabel(); permissionForDelete = currentAircraft.HasPermission(Users.CurrentUser, DataEvent.Remove); // // tableLayoutPanelReferences // tableLayoutPanelReferences.AutoSize = true; tableLayoutPanelReferences.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutPanelReferences.ColumnStyles.Add(new ColumnStyle()); tableLayoutPanelReferences.Controls.Add(aircraftReferencesControl1, 0, 0); tableLayoutPanelReferences.Controls.Add(aircraftInfoReference, 0, 1); tableLayoutPanelReferences.Location = new Point(0, 0); tableLayoutPanelReferences.Margin = new Padding(10); tableLayoutPanelReferences.RowStyles.Add(new RowStyle()); tableLayoutPanelReferences.RowStyles.Add(new RowStyle()); tableLayoutPanelReferences.RowStyles.Add(new RowStyle()); tableLayoutPanelReferences.MinimumSize = new Size(REFERENCES_WIDTH, REFERENCES_HEIGHT); tableLayoutPanelReferences.TabIndex = 0; // // mainPanel // mainPanel.Controls.Add(flowLayoutPanelBaseDetailsContainer); mainPanel.Controls.Add(tableLayoutPanelReferences); mainPanel.Controls.Add(landingGearsButtons); mainPanel.Controls.Add(linkLandingGearStatus); mainPanel.Controls.Add(buttonAddBaseDetail); mainPanel.Controls.Add(buttonDeleteTemplate); mainPanel.Controls.Add(buttonAddTemplate); mainPanel.AutoScroll = true; mainPanel.Dock = DockStyle.Fill; mainPanel.TabIndex = 1; mainPanel.SizeChanged += mainPanel_SizeChanged; // // flowLayoutPanelBaseDetailsContainer // flowLayoutPanelBaseDetailsContainer.FlowDirection = FlowDirection.TopDown; flowLayoutPanelBaseDetailsContainer.AutoScroll = true; flowLayoutPanelBaseDetailsContainer.AutoSize = true; flowLayoutPanelBaseDetailsContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink; flowLayoutPanelBaseDetailsContainer.Location = new Point(REFERENCES_WIDTH, 0); flowLayoutPanelBaseDetailsContainer.Padding = new Padding(0, 27, 0, 0); flowLayoutPanelBaseDetailsContainer.TabIndex = 1; flowLayoutPanelBaseDetailsContainer.SizeChanged += flowLayoutPanelContentContainer_SizeChanged; flowLayoutPanelBaseDetailsContainer.Controls.Add(aircraftFrameControl); // // aircraftReferencesControl1 // aircraftReferencesControl1.AutoSize = true; aircraftReferencesControl1.AutoSizeMode = AutoSizeMode.GrowAndShrink; aircraftReferencesControl1.BackColor = Css.CommonAppearance.Colors.BackColor; aircraftReferencesControl1.Caption = "Aircraft references"; aircraftReferencesControl1.DescriptionTextColor = Color.DimGray; aircraftReferencesControl1.Dock = DockStyle.Top; aircraftReferencesControl1.Location = new Point(30, 30); aircraftReferencesControl1.Margin = new Padding(30, 30, 3, 3); aircraftReferencesControl1.MinimumSize = new Size(50, 50); aircraftReferencesControl1.Size = new Size(362, 528); aircraftReferencesControl1.TabIndex = 0; aircraftReferencesControl1.UpperLeftIcon = icons.GrayArrow; aircraftReferencesControl1.LinkADStatusDisplayerRequested += linkADStatus_DisplayerRequested; aircraftReferencesControl1.LinkAgingProgramDisplayerRequested += linkAgingProgram_DisplayerRequested; aircraftReferencesControl1.LinkAircraftGeneralDataDisplayerRequested += linkAircraftGeneralData_DisplaeyRequested; aircraftReferencesControl1.LinkComponentStatusDisplayerRequested += linkComponentStatus_DisplayerRequested; aircraftReferencesControl1.LinkCPCPStatusDisplayerRequested += linkCPCPStatus_DisplayerRequested; aircraftReferencesControl1.LinkLandingGearStatusDisplayerRequested += LinkLandingGearStatus_DisplayerRequested; aircraftReferencesControl1.LinkMaintenanceStatusDisplayerRequested += linkMaintenanceStatusDisplayerRequested; aircraftReferencesControl1.LinkSBStatusDisplayerRequested += linkSBStatus_DisplayerRequested; // // aircraftInfoReference // aircraftInfoReference.AutoSize = true; aircraftInfoReference.AutoSizeMode = AutoSizeMode.GrowAndShrink; aircraftInfoReference.BackColor = Css.CommonAppearance.Colors.BackColor; aircraftInfoReference.Caption = "Aircraft information"; aircraftInfoReference.DescriptionTextColor = Color.DimGray; aircraftInfoReference.Margin = new Padding(30, 15, 30, 3); aircraftInfoReference.MinimumSize = new Size(50, 50); aircraftInfoReference.TabIndex = 1; aircraftInfoReference.UpperLeftIcon = icons.GrayArrow; // // footerControl // footerControl.TabIndex = 2; // // headerControl // headerControl.Controls.Add(aircraftHeader); headerControl.TabIndex = 0; headerControl.ReloadRised += headerControl_ReloadRised; headerControl.EditDisplayerRequested += linkAircraftGeneralData_DisplaeyRequested; headerControl.ActionControl.ShowEditButton = true; headerControl.ContextActionControl.ButtonHelp.TopicID = "entering_an_aircraft_to_the_cas_database"; // // buttonAddBaseDetail // buttonAddBaseDetail.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonAddBaseDetail.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddBaseDetail.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddBaseDetail.Icon = icons.Add; buttonAddBaseDetail.IconNotEnabled = icons.AddGray; buttonAddBaseDetail.Width = 160; buttonAddBaseDetail.TextMain = "Add Base Component"; buttonAddBaseDetail.Click += buttonAddBaseDetail_Click; // // buttonDeleteTemplate // buttonDeleteTemplate.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonDeleteTemplate.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonDeleteTemplate.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonDeleteTemplate.Icon = icons.Delete; buttonDeleteTemplate.IconNotEnabled = icons.DeleteGray; buttonDeleteTemplate.ReflectionType = ReflectionTypes.CloseSelected; buttonDeleteTemplate.Width = 150; buttonDeleteTemplate.Location = new Point(mainPanel.Right - buttonDeleteTemplate.Width, mainPanel.Bottom - buttonDeleteTemplate.Height - BOTTOM_MARGIN); buttonDeleteTemplate.TextMain = "Delete Template"; buttonDeleteTemplate.DisplayerRequested += buttonDeleteTemplate_DisplayerRequested; buttonDeleteTemplate.Visible = permissionForDelete; // // buttonAddTemplate // buttonAddTemplate.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonAddTemplate.FontMain = Css.HeaderControl.Fonts.PrimaryFont; buttonAddTemplate.ForeColorMain = Css.HeaderControl.Colors.PrimaryColor; buttonAddTemplate.FontSecondary = Css.HeaderControl.Fonts.PrimaryFont; buttonAddTemplate.ForeColorSecondary = Css.HeaderControl.Colors.PrimaryColor; buttonAddTemplate.Icon = icons.Add; buttonAddTemplate.IconNotEnabled = icons.AddGray; buttonAddTemplate.Width = 350; buttonAddTemplate.PaddingMain = new Padding(3, 0, 0, 0); buttonAddTemplate.TextAlignMain = ContentAlignment.BottomLeft; buttonAddTemplate.TextAlignSecondary = ContentAlignment.TopLeft; buttonAddTemplate.TextMain = "Add " + currentAircraft.Model; if (OperatorCollection.Instance.Count == 1) { buttonAddTemplate.TextSecondary = " to " + OperatorCollection.Instance[0].Name; } else { buttonAddTemplate.TextSecondary = " to operator"; } buttonAddTemplate.DisplayerRequested += buttonAddTemplate_DisplayerRequested; // // linkLandingGearStatus // Css.ImageLink.Adjust(linkLandingGearStatus); linkLandingGearStatus.Margin = new Padding(1); linkLandingGearStatus.Size = new Size(300, 30); linkLandingGearStatus.Text = "View Landing Gear Status"; linkLandingGearStatus.TextAlign = ContentAlignment.MiddleLeft; linkLandingGearStatus.ReflectionType = ReflectionTypes.DisplayInNew; linkLandingGearStatus.DisplayerRequested += LinkLandingGearStatus_DisplayerRequested; linkLandingGearStatus.Enabled = true; // // aircraftFrameControl // aircraftFrameControl.TabIndex = 0; // // landingGearsButtons // landingGearsButtons.LocationChanged += landingGearsButtons_LocationChanged; landingGearsButtons.SizeChanged += landingGearsButtons_SizeChanged; // // TemplateAircraftScreen // BackColor = Css.CommonAppearance.Colors.BackColor; Controls.Add(mainPanel); Controls.Add(footerControl); Controls.Add(headerControl); }