private void BaseDetailSaved_Saved(object sender, EventArgs e) { TemplateBaseDetail baseDetail = (TemplateBaseDetail)sender; if (baseDetail is TemplateAircraftFrame) { aircraftFrameControl.UpdateInformation(); } else if (baseDetail is TemplateEngine) { for (int i = 0; i < enginesControls.Length; i++) { if (baseDetail.ID == ((TemplateEngine)enginesControls[i].Tag).ID) { enginesControls[i].UpdateInformation(); break; } } } else if (baseDetail is TemplateAPU) { apuControl.UpdateInformation(); } else if (baseDetail is TemplateGearAssembly) { landingGearsButtons.UpdateInformation(); } }
public TemplateBaseDetailAddForm(TemplateBaseDetail baseDetail) { this.baseDetail = baseDetail; InitializeComponent(); UpdateComboBoxOperatorsItems(); textBoxAmount.Text = baseDetail.Amount.ToString(); }
private void buttonDeleteDirective_DisplayerRequested(object sender, ReferenceEventArgs e) { DialogResult result = MessageBox.Show("Do you really want to delete current directive?", "Confirm deleting", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2); if (result == DialogResult.Yes) { try { TemplateBaseDetail containingDetail = (TemplateBaseDetail)currentDirective.Parent; containingDetail.Remove(currentDirective); MessageBox.Show("Directive was deleted successfully", "Directive deleted", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { Program.Provider.Logger.Log("Error while deleting data", ex); e.Cancel = true; } } else { e.Cancel = true; } }
/// <summary> /// ”дал¤ет текущий агрегат /// </summary> private void avButtonDeleteDetail_DisplayerRequested(object sender, ReferenceEventArgs e) { DialogResult result = MessageBox.Show("Do you really want to delete current component?", //"Confirm deleting " + currentDetail.SerialNumber, MessageBoxButtons.YesNoCancel, //todo "Confirm deleting " + currentDetail.PartNumber, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2); if (result == DialogResult.Yes) { try { if (currentDetail is TemplateDetail) { TemplateBaseDetail containingDetail = (TemplateBaseDetail)currentDetail.Parent; containingDetail.Remove(currentDetail); } else { TemplateAircraft containingAircraft = (TemplateAircraft)currentDetail.Parent; containingAircraft.RemoveBaseDetail((TemplateBaseDetail)currentDetail); } MessageBox.Show("Component was deleted successfully", (string)new TermsProvider()["SystemName"], MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { Program.Provider.Logger.Log("Error while deleting data", ex); e.Cancel = true; } } else { e.Cancel = true; } }
/// <summary> /// Создает форму для переноса шаблона базового агрегата в рабочую базу данных /// </summary> /// <param name="baseDetail"></param> public TemplateBaseDetailAddToDataBaseForm(TemplateBaseDetail baseDetail) { this.baseDetail = baseDetail; InitializeComponent(); this.comboBoxOperators.SelectedIndexChanged += comboBoxOperators_SelectedIndexChanged; UpdateComboBoxOperatorsItems(); textBoxAmount.Text = baseDetail.Amount.ToString(); }
/// <summary> /// Создается объект для отображения базового агрегата /// </summary> /// <param name="detail">Отображаемый объект</param> public TemplateBaseDetailControl(TemplateBaseDetail detail) { if (null == detail) { throw new ArgumentNullException("detail", "Cannot be null"); } currentBaseDetail = detail; InitializeComponent(); UpdateInformation(); }
///<summary> /// Создается объект, описывающий отображение добавления шаблонной директивы ///</summary> /// <param name="parentBaseDetail">Родительский объект, в который добавляется директива</param> /// <param name="directiveType">Тип директивы</param> public DispatcheredTemplateDirectiveAdding(TemplateBaseDetail parentBaseDetail, DirectiveType directiveType) : this() { if (parentBaseDetail == null) { throw new ArgumentNullException("parentBaseDetail"); } this.parentBaseDetail = parentBaseDetail; this.directiveType = directiveType; aircraftHeader.Aircraft = parentBaseDetail.ParentAircraft; ClearFields(); }
///<summary> /// Создаёт экземпляр элемента управления, отображающего список шаблонных директив ///</summary> ///<param name="currentBaseDetail">Базовый агрегат, которому принадлежат шаблонные директивы</param> ///<param name="viewFilter">Фильтр</param> ///<param name="reportText">Текст отчета</param> public TemplateDirectiveListScreen(TemplateBaseDetail currentBaseDetail, TemplateDirectiveCollectionFilter viewFilter, string reportText) { if (currentBaseDetail == null) { throw new ArgumentNullException("currentBaseDetail", "Cannot display null-baseDetail"); } this.currentBaseDetail = currentBaseDetail; this.viewFilter = viewFilter; this.reportText = reportText; InitializeComponent(); UpdateElements(); }
private void addComponentToolStripMenuItem1_Click(object sender, EventArgs e) { ToolStripMenuItem toolStripMenuItem = (ToolStripMenuItem)sender; ContextMenuStrip contextMenuStrip = (ContextMenuStrip)toolStripMenuItem.Owner; TemplateBaseDetail baseDetail = (TemplateBaseDetail)contextMenuStrip.Tag; ReferenceEventArgs arguments = new ReferenceEventArgs(); arguments.DisplayerText = currentAircraft.Model + ". " + baseDetail + ". Add component"; arguments.TypeOfReflection = ReflectionTypes.DisplayInNew; arguments.RequestedEntity = new DispatcheredTemplateDetailAdding(baseDetail); OnDisplayerRequested(arguments); }
///<summary> /// Создает элемент управления для отображения списка шаблонных агрегатов ///</summary> ///<param name="currentBaseDetail">Базовый агрегат, содержащий агрегаты</param> ///<param name="viewFilter">Фильтр отображения</param> public TemplateDetailListScreen(TemplateBaseDetail currentBaseDetail, TemplateDetailCollectionFilter viewFilter) { ((DispatcheredTemplateDetailListScreen)this).InitComplition += ComponentStatusControl_InitComplition; if (currentBaseDetail == null) { throw new ArgumentNullException("currentBaseDetail", "Cannot display null-baseDetail"); } this.currentBaseDetail = currentBaseDetail; PerformEvents(true); filterSelection = new TemplateDetailFilterSelection(currentBaseDetail.ParentAircraft); initialFilter = viewFilter; InitializeComponent(); UpdateElements(); }
private static void deleteToolStripMenuItem_Click(object sender, EventArgs e) { ToolStripMenuItem toolStripMenuItem = (ToolStripMenuItem)sender; ContextMenuStrip contextMenuStrip = (ContextMenuStrip)toolStripMenuItem.Owner; TemplateBaseDetail baseDetail = (TemplateBaseDetail)contextMenuStrip.Tag; DialogResult choice = MessageBox.Show("Delete " + baseDetail.PartNumber + " item?", "Confirm deleting", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (choice == DialogResult.Yes) { if (baseDetail.ParentAircraft != null) { baseDetail.ParentAircraft.RemoveBaseDetail(baseDetail); } } }
private static void button_DisplayerRequested(object sender, ReferenceEventArgs e) { if (!(sender is Control)) { e.Cancel = true; return; } Control control = (Control)sender; if (!(control.Tag is TemplateBaseDetail)) { e.Cancel = true; return; } TemplateBaseDetail detail = (TemplateBaseDetail)control.Tag; e.RequestedEntity = new DispatcheredTemplateDetailScreen(detail); }
/// <summary> /// —оздает элемент управлени¤ дл¤ отображени¤ ссылок на отчеты базового агрегата /// </summary> public TemplateBaseDetailLinksFlowLayoutPanel(TemplateBaseDetail baseDetail) { currentBaseDetail = baseDetail; // // linkADStatus // linkADStatus.Text = "AD Status"; linkADStatus.Margin = IMAGE_LINK_LABEL_MARGIN; linkADStatus.Enabled = true; linkADStatus.Margin = ITEM_PADDING; linkADStatus.ReflectionType = ReflectionTypes.DisplayInNew; linkADStatus.DisplayerRequested += linkADStatus_DisplayerRequested; Css.ImageLink.Adjust(linkADStatus); // // linkLLPDiskSheetStatus // linkLLPDiskSheetStatus.Text = "LLP Disk Sheet Status"; linkLLPDiskSheetStatus.Margin = IMAGE_LINK_LABEL_MARGIN; linkLLPDiskSheetStatus.Enabled = true; linkLLPDiskSheetStatus.Margin = ITEM_PADDING; linkLLPDiskSheetStatus.ReflectionType = ReflectionTypes.DisplayInNew; linkLLPDiskSheetStatus.DisplayerRequested += linkLLPDiskSheetStatus_DisplayerRequested; Css.ImageLink.Adjust(linkLLPDiskSheetStatus); // // linkSBStatus // linkSBStatus.Text = "SB Status"; linkSBStatus.Margin = IMAGE_LINK_LABEL_MARGIN; linkSBStatus.Enabled = true; linkSBStatus.Margin = ITEM_PADDING; linkSBStatus.DisplayerRequested += linkSBStatus_DisplayerRequested; Css.ImageLink.Adjust(linkSBStatus); BackColor = Css.CommonAppearance.Colors.BackColor; Size = new Size(500, 100); Controls.Add(linkADStatus); if (baseDetail != null && baseDetail.DetailType.ID == (int)DetailTypesIds.Engine) { Controls.Add(linkLLPDiskSheetStatus); } Controls.Add(linkSBStatus); }
private void buttonAddTemplate_Click(object sender, EventArgs e) { int amount; if (int.TryParse(textBoxAmount.Text, out amount)) { baseDetail = baseDetail.Clone(); baseDetail.Amount = amount; Enabled = false; animatedThreadWorker = new AnimatedThreadWorker(CreateBaseDetailFromTemplate, null, this); animatedThreadWorker.State = "Creating " + baseDetail.PartNumber; animatedThreadWorker.StartThread(); animatedThreadWorker.WorkFinished += FinishedCreatingBaseDetail; } else { MessageBox.Show("Invalid amout value", (string)new TermsProvider()["SystemName"], MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
/// <summary> /// Создается элемент - отображение Modification директив для базового агрегата /// </summary> /// <param name="currentItem">Базовый агрегат, для которого отображаются директивы</param> public DispatcheredTemplateModificationDirectiveListScreen(TemplateBaseDetail currentItem) : base(currentItem) { }
/// <summary> /// —оздает контрол дл¤ выбора базового агрегата дл¤ добавлени¤ /// </summary> /// <param name="parentDetail"></param> public TemplateAddNewComponentControl(ITemplateDetailContainer parentDetail) { SuspendLayout(); flowLayoutPanel1 = new FlowLayoutPanel(); labelBaseComponent = new Label(); // // labelBaseComponent // labelBaseComponent.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelBaseComponent.Font = Css.OrdinaryText.Fonts.RegularFont; labelBaseComponent.Location = new Point(10, 20); labelBaseComponent.Name = "labelBaseComponent"; labelBaseComponent.Size = new Size(150, 26); labelBaseComponent.TabIndex = 0; labelBaseComponent.Text = "Base component:"; labelBaseComponent.TextAlign = ContentAlignment.MiddleLeft; // // flowLayoutPanel1 // flowLayoutPanel1.Location = new Point(labelBaseComponent.Right, labelBaseComponent.Top); flowLayoutPanel1.FlowDirection = FlowDirection.TopDown; flowLayoutPanel1.Size = new Size(900, 60); flowLayoutPanel1.TabIndex = 0; // // AddNewComponentControl // BackColor = Css.CommonAppearance.Colors.BackColor; AutoScaleDimensions = new SizeF(6F, 13F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(labelBaseComponent); Controls.Add(flowLayoutPanel1); Name = "AddNewComponentControl"; Size = new Size(900, 140); ResumeLayout(false); PerformLayout(); if (parentDetail != null) { TemplateAircraft parentAircraft = null; if (parentDetail is TemplateAircraft) { parentAircraft = (TemplateAircraft)parentDetail; } if (parentDetail is TemplateBaseDetail) { parentAircraft = ((TemplateBaseDetail)parentDetail).ParentAircraft; } if (parentAircraft != null) { TemplateBaseDetail[] baseDetails = parentAircraft.BaseDetails; radioButtonBaseDetail = new RadioButton[baseDetails.Length]; int length = baseDetails.Length; for (int i = 0; i < length; i++) { TemplateBaseDetail current = baseDetails[i]; radioButtonBaseDetail[i] = new RadioButton(); radioButtonBaseDetail[i].AutoSize = true; radioButtonBaseDetail[i].Cursor = Cursors.Hand; radioButtonBaseDetail[i].FlatStyle = FlatStyle.Flat; radioButtonBaseDetail[i].Font = new Font(Css.OrdinaryText.Fonts.RegularFont, FontStyle.Underline); radioButtonBaseDetail[i].ForeColor = Css.SimpleLink.Colors.LinkColor; radioButtonBaseDetail[i].Location = new Point(labelBaseComponent.Location.X + labelBaseComponent.Width + 25, i * 25); radioButtonBaseDetail[i].Size = new Size(73, 22); radioButtonBaseDetail[i].TabIndex = i; radioButtonBaseDetail[i].TabStop = true; radioButtonBaseDetail[i].Tag = baseDetails[i]; radioButtonBaseDetail[i].Text = current.DetailType.FullName + " " + current.PartNumber; radioButtonBaseDetail[i].UseVisualStyleBackColor = true; radioButtonBaseDetail[i].CheckedChanged += CheckedChangedByAnyCheckBox; if (parentDetail == current) { radioButtonBaseDetail[i].Checked = true; } flowLayoutPanel1.Controls.Add(radioButtonBaseDetail[i]); } } if (parentDetail is TemplateAircraft) { radioButtonBaseDetail[0].Checked = true; } } }
/// <summary> /// Создает элемент управления для отображения информации о шаблонном ВСУ ВС /// </summary> public TemplateAPUControl(TemplateBaseDetail currentBaseDetail) { Size = STANDART_SIZE; this.currentBaseDetail = currentBaseDetail; // // labelAPUModel // labelAPUModel.Location = new Point(0, TOP_MARGIN); labelAPUModel.Font = Css.OrdinaryText.Fonts.RegularFont; labelAPUModel.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelAPUModel.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelAPUModel.Text = "APU Model"; labelAPUModel.TextAlign = ContentAlignment.MiddleLeft; // // labelManufacturer // labelManufacturer.Location = new Point(0, labelAPUModel.Bottom + HEIGHT_INTERVAL); labelManufacturer.Font = Css.OrdinaryText.Fonts.RegularFont; labelManufacturer.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelManufacturer.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelManufacturer.Text = "Manufacturer"; labelManufacturer.TextAlign = ContentAlignment.MiddleLeft; // // labelPartNumber // labelPartNumber.Location = new Point(0, labelManufacturer.Bottom + HEIGHT_INTERVAL); labelPartNumber.Font = Css.OrdinaryText.Fonts.RegularFont; labelPartNumber.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelPartNumber.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelPartNumber.Text = "Part Number"; labelPartNumber.TextAlign = ContentAlignment.MiddleLeft; // // labelTSNCSN // labelTSNCSN.Location = new Point(0, labelPartNumber.Bottom + HEIGHT_INTERVAL); labelTSNCSN.Font = Css.OrdinaryText.Fonts.RegularFont; labelTSNCSN.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelTSNCSN.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelTSNCSN.Text = "TSN/CSN"; labelTSNCSN.TextAlign = ContentAlignment.MiddleLeft; // // labelAmount // labelAmount.Location = new Point(0, labelTSNCSN.Bottom + HEIGHT_INTERVAL); labelAmount.Font = Css.OrdinaryText.Fonts.RegularFont; labelAmount.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelAmount.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelAmount.Text = "Amount"; labelAmount.TextAlign = ContentAlignment.MiddleLeft; // // textBoxAPUModel // textBoxAPUModel.Location = new Point(TEXT_BOX_WIDTH, TOP_MARGIN); textBoxAPUModel.BackColor = Color.White; textBoxAPUModel.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxAPUModel.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxAPUModel.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // textBoxManufacturer // textBoxManufacturer.Location = new Point(TEXT_BOX_WIDTH, textBoxAPUModel.Bottom + HEIGHT_INTERVAL); textBoxManufacturer.BackColor = Color.White; textBoxManufacturer.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxManufacturer.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxManufacturer.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // textBoxPartNumber // textBoxPartNumber.Location = new Point(TEXT_BOX_WIDTH, textBoxManufacturer.Bottom + HEIGHT_INTERVAL); textBoxPartNumber.BackColor = Color.White; textBoxPartNumber.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxPartNumber.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxPartNumber.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // textBoxTSNCSN // textBoxTSNCSN.Location = new Point(TEXT_BOX_WIDTH, textBoxPartNumber.Bottom + HEIGHT_INTERVAL); textBoxTSNCSN.BackColor = Color.White; textBoxTSNCSN.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxTSNCSN.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxTSNCSN.ReadOnly = true; textBoxTSNCSN.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // textBoxAmount // textBoxAmount.Location = new Point(TEXT_BOX_WIDTH, labelTSNCSN.Bottom + HEIGHT_INTERVAL); textBoxAmount.BackColor = Color.White; textBoxAmount.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxAmount.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxAmount.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // linkViewInfo // linkViewInfo.Location = new Point(TEXT_BOX_WIDTH, textBoxAmount.Bottom + HEIGHT_INTERVAL); linkViewInfo.Font = Css.SimpleLink.Fonts.Font; linkViewInfo.LinkColor = Css.SimpleLink.Colors.LinkColor; linkViewInfo.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); linkViewInfo.Text = "View Info"; linkViewInfo.TextAlign = ContentAlignment.MiddleLeft; linkViewInfo.ReflectionType = ReflectionTypes.DisplayInNew; linkViewInfo.DisplayerRequested += linkViewInfo_DisplayerRequested; Controls.Add(labelAPUModel); Controls.Add(labelManufacturer); Controls.Add(labelPartNumber); Controls.Add(labelTSNCSN); Controls.Add(labelAmount); Controls.Add(textBoxAPUModel); Controls.Add(textBoxManufacturer); Controls.Add(textBoxPartNumber); Controls.Add(textBoxTSNCSN); Controls.Add(textBoxAmount); Controls.Add(linkViewInfo); UpdateControl(); }
/// <summary> /// Создается элемент - отображение Aging Propgram директив для базового агрегата /// </summary> /// <param name="currentItem">Базовый агрегат, для которого отображаются директивы</param> public DispatcheredTemplateAgingProgramDirectiveListScreen(TemplateBaseDetail currentItem) : base(currentItem) { }
/// <summary> /// Создается отображение Component Ststus - списка шаблонных агрегатов для ВС /// </summary> /// <param name="currentBaseDetail"></param> /// <param name="initialFilter"></param> public DispatcheredTemplateDetailListScreen(TemplateBaseDetail currentBaseDetail, TemplateDetailCollectionFilter initialFilter) : base(currentBaseDetail, initialFilter) { detailContainer = currentBaseDetail; this.initialFilter = initialFilter; Dock = DockStyle.Fill; }
/// <summary> /// Создает элемент управления для отображения информации о шаблонных двигателях и ВСУ ВС /// </summary> public TemplateEngineControl(TemplateBaseDetail currentBaseDetail, bool showLabels) { this.currentBaseDetail = currentBaseDetail; this.showLabels = showLabels; // // labelEngineModel // labelEngineModel.Font = Css.OrdinaryText.Fonts.RegularFont; labelEngineModel.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelEngineModel.Size = new Size(TEXT_BOX_WIDTH, TOP_MARGIN); labelEngineModel.Text = "Engine Model"; labelEngineModel.TextAlign = ContentAlignment.MiddleLeft; labelEngineModel.Location = new Point(0, TOP_MARGIN); Size = new Size(STANDART_SIZE.Width, STANDART_SIZE.Height - HEIGHT_INTERVAL - TEXT_BOX_HEIGHT); // // labelManufacturer // labelManufacturer.Location = new Point(0, labelEngineModel.Bottom + HEIGHT_INTERVAL); labelManufacturer.Font = Css.OrdinaryText.Fonts.RegularFont; labelManufacturer.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelManufacturer.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelManufacturer.Text = "Manufacturer"; labelManufacturer.TextAlign = ContentAlignment.MiddleLeft; // // labelPartNumber // labelPartNumber.Location = new Point(0, labelManufacturer.Bottom + HEIGHT_INTERVAL); labelPartNumber.Font = Css.OrdinaryText.Fonts.RegularFont; labelPartNumber.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelPartNumber.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelPartNumber.Text = "Part Number"; labelPartNumber.TextAlign = ContentAlignment.MiddleLeft; // // labelTSNCSN // labelTSNCSN.Location = new Point(0, labelPartNumber.Bottom + HEIGHT_INTERVAL); labelTSNCSN.Font = Css.OrdinaryText.Fonts.RegularFont; labelTSNCSN.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelTSNCSN.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelTSNCSN.Text = "TSN/CSN"; labelTSNCSN.TextAlign = ContentAlignment.MiddleLeft; // // labelAmount // labelAmount.Location = new Point(0, labelTSNCSN.Bottom + HEIGHT_INTERVAL); labelAmount.Font = Css.OrdinaryText.Fonts.RegularFont; labelAmount.ForeColor = Css.OrdinaryText.Colors.ForeColor; labelAmount.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); labelAmount.Text = "Amount"; labelAmount.TextAlign = ContentAlignment.MiddleLeft; // // textBoxEngineModel // textBoxEngineModel.Location = new Point(TEXT_BOX_WIDTH, TOP_MARGIN); textBoxEngineModel.BackColor = Color.White; textBoxEngineModel.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxEngineModel.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxEngineModel.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // textBoxManufacturer // textBoxManufacturer.Location = new Point(TEXT_BOX_WIDTH, textBoxEngineModel.Bottom + HEIGHT_INTERVAL); textBoxManufacturer.BackColor = Color.White; textBoxManufacturer.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxManufacturer.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxManufacturer.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // textBoxPartNumber // textBoxPartNumber.Location = new Point(TEXT_BOX_WIDTH, textBoxManufacturer.Bottom + HEIGHT_INTERVAL); textBoxPartNumber.BackColor = Color.White; textBoxPartNumber.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxPartNumber.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxPartNumber.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // textBoxTSNCSN // textBoxTSNCSN.Location = new Point(TEXT_BOX_WIDTH, textBoxPartNumber.Bottom + HEIGHT_INTERVAL); textBoxTSNCSN.BackColor = Color.White; textBoxTSNCSN.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxTSNCSN.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxTSNCSN.ReadOnly = true; textBoxTSNCSN.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // textBoxAmount // textBoxAmount.Location = new Point(TEXT_BOX_WIDTH, textBoxTSNCSN.Bottom + HEIGHT_INTERVAL); textBoxAmount.BackColor = Color.White; textBoxAmount.Font = Css.OrdinaryText.Fonts.RegularFont; textBoxAmount.ForeColor = Css.OrdinaryText.Colors.ForeColor; textBoxAmount.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); // // linkViewInfo // linkViewInfo.Location = new Point(0, textBoxAmount.Bottom + HEIGHT_INTERVAL); linkViewInfo.Font = Css.SimpleLink.Fonts.Font; linkViewInfo.LinkColor = Css.SimpleLink.Colors.LinkColor; linkViewInfo.Size = new Size(TEXT_BOX_WIDTH, TEXT_BOX_HEIGHT); linkViewInfo.Text = "View Info"; linkViewInfo.TextAlign = ContentAlignment.MiddleLeft; linkViewInfo.ReflectionType = ReflectionTypes.DisplayInNew; //linkViewInfo.DisplayerText = "Templates. " + currentBaseDetail.ParentAircraft.Model + ". Component PN " + currentBaseDetail.PartNumber; linkViewInfo.DisplayerText = currentBaseDetail.ParentAircraft.Model + ". Component PN " + currentBaseDetail.PartNumber; linkViewInfo.DisplayerRequested += linkViewInfo_DisplayerRequested; Controls.Add(labelEngineModel); Controls.Add(labelManufacturer); Controls.Add(labelPartNumber); Controls.Add(labelTSNCSN); Controls.Add(labelAmount); Controls.Add(textBoxEngineModel); Controls.Add(textBoxManufacturer); Controls.Add(textBoxPartNumber); Controls.Add(textBoxTSNCSN); Controls.Add(textBoxAmount); Controls.Add(linkViewInfo); UpdateControl(); HideShowLabels(showLabels); }
/// <summary> /// Создается элемент - отображение Engeneering Orders директив для базового агрегата /// </summary> /// <param name="currentItem">Базовый агрегат, для которого отображаются директивы</param> public DispatcheredTemplateEngeneeringOrdersDirectiveListScreen(TemplateBaseDetail currentItem) : base(currentItem) { }
private string GetEngineLLPString(TemplateBaseDetail baseDetail) { return(baseDetail + " LLP Status"); }
/// <summary> /// Создается элемент - отображение SSID директив для базового агрегата /// </summary> /// <param name="currentItem">Базовый агрегат, для которого отображаются директивы</param> public DispatcheredTemplateSSIDDirectiveListScreen(TemplateBaseDetail currentItem) : base(currentItem) { }
/// <summary> /// Создается элемент - отображение шаблонных директив заданного базового агрегата /// </summary> public DispatcheredTemplateDirectiveListView(TemplateBaseDetail currentItem) : this(currentItem as ITemplateDirectiveContainer) { this.currentItem = currentItem; }