コード例 #1
0
ファイル: ATLBForm.cs プロジェクト: mkbiltek2019/Cas
        private void InitializeComponent()
        {
            labelAircraft      = new Label();
            labelATLBNo        = new Label();
            labelDate          = new Label();
            labelDateFrom      = new Label();
            labelDateTo        = new Label();
            labelStartPageNo   = new Label();
            labelRemarks       = new Label();
            labelRevision      = new Label();
            textBoxAircraft    = new TextBox();
            textBoxATLBNo      = new TextBox();
            textBoxDateFrom    = new TextBox();
            textBoxDateTo      = new TextBox();
            textBoxStartPageNo = new TextBox();
            textBoxRemarks     = new TextBox();
            textBoxRevision    = new TextBox();
            fileControl        = new WindowsFormAttachedFileControl(currentATLB.AttachedFile, "Adobe PDF Files|*.pdf",
                                                                    "There is no enclosed procedure to keep the Aircraft Technical Log Book.",
                                                                    "Open enclosed file to view the procedure how to keep the Aircraft Technical Log Book.", icons.PDFSmall);
            buttonOK        = new Button();
            buttonApply     = new Button();
            buttonCancel    = new Button();
            tabControl      = new TabControl();
            tabPageGeneral  = new TabPage();
            labelSeparator  = new Label();
            labelSeparator2 = new Label();
            //
            // tabControl
            //
            tabControl.Controls.Add(tabPageGeneral);
            tabControl.Location = new Point(Css.WindowsForm.Constants.LEFT_MARGIN, Css.WindowsForm.Constants.TOP_MARGIN);
            //
            // tabPageGeneral
            //
            tabPageGeneral.BackColor = Css.WindowsForm.Colors.TabBackColor;
            tabPageGeneral.Text      = "General";
            tabPageGeneral.Controls.Add(labelAircraft);
            tabPageGeneral.Controls.Add(textBoxAircraft);
            tabPageGeneral.Controls.Add(labelATLBNo);
            tabPageGeneral.Controls.Add(textBoxATLBNo);
            tabPageGeneral.Controls.Add(labelDate);
            tabPageGeneral.Controls.Add(labelDateFrom);
            tabPageGeneral.Controls.Add(textBoxDateFrom);
            tabPageGeneral.Controls.Add(labelDateTo);
            tabPageGeneral.Controls.Add(textBoxDateTo);
            tabPageGeneral.Controls.Add(labelStartPageNo);
            tabPageGeneral.Controls.Add(textBoxStartPageNo);
            tabPageGeneral.Controls.Add(labelRemarks);
            tabPageGeneral.Controls.Add(textBoxRemarks);
            tabPageGeneral.Controls.Add(labelRevision);
            tabPageGeneral.Controls.Add(textBoxRevision);
            tabPageGeneral.Controls.Add(labelSeparator);
            tabPageGeneral.Controls.Add(labelSeparator2);
            tabPageGeneral.Controls.Add(fileControl);
            //
            // labelAircraft
            //
            labelAircraft.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelAircraft.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelAircraft.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            labelAircraft.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelAircraft.Text      = "Aircraft:";
            labelAircraft.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxAircraft
            //
            textBoxAircraft.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxAircraft.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxAircraft.Location  = new Point(labelAircraft.Right, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            textBoxAircraft.ReadOnly  = true;
            //
            // labelSeparator
            //
            labelSeparator.AutoSize    = false;
            labelSeparator.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, labelAircraft.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator.Height      = 2;
            labelSeparator.BorderStyle = BorderStyle.Fixed3D;
            //
            // labelATLBNo
            //
            labelATLBNo.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelATLBNo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelATLBNo.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelATLBNo.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelATLBNo.Text      = "ATLB No:";
            labelATLBNo.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxATLBNo
            //
            textBoxATLBNo.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxATLBNo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxATLBNo.BackColor = Color.White;
            textBoxATLBNo.Location  = new Point(labelATLBNo.Right, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // labelDate
            //
            labelDate.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelDate.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelDate.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelATLBNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelDate.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelDate.Text      = "Date:";
            labelDate.TextAlign = ContentAlignment.MiddleLeft;
            //
            // labelDateFrom
            //
            labelDateFrom.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelDateFrom.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelDateFrom.Location  = new Point(labelDate.Right - 2, labelATLBNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelDateFrom.Size      = new Size(LABEL_DATE_WIDTH, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            labelDateFrom.Text      = "From";
            labelDateFrom.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxDateFrom
            //
            textBoxDateFrom.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxDateFrom.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxDateFrom.Location  = new Point(labelDateFrom.Right, labelATLBNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxDateFrom.Size      = new Size(TEXT_BOX_DATE_WIDTH, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            textBoxDateFrom.ReadOnly  = true;
            //
            // labelDateTo
            //
            labelDateTo.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelDateTo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelDateTo.Location  = new Point(textBoxDateFrom.Right + DATE_INTERVAL, labelATLBNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelDateTo.Size      = new Size(LABEL_DATE_WIDTH - 2, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            labelDateTo.Text      = "To";
            labelDateTo.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxDateTo
            //
            textBoxDateTo.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxDateTo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxDateTo.Location  = new Point(labelDateTo.Right, labelATLBNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxDateTo.Size      = new Size(TEXT_BOX_DATE_WIDTH, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            textBoxDateTo.ReadOnly  = true;
            //
            // labelStartPageNo
            //
            labelStartPageNo.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelStartPageNo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelStartPageNo.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelStartPageNo.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelStartPageNo.Text      = "Start Page No:";
            labelStartPageNo.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxStartPageNo
            //
            textBoxStartPageNo.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxStartPageNo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxStartPageNo.BackColor = Color.White;
            textBoxStartPageNo.Location  = new Point(labelStartPageNo.Right, labelDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelRemarks
            //
            labelRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelRemarks.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelStartPageNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelRemarks.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelRemarks.Text      = "Remarks:";
            labelRemarks.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxRemarks
            //
            textBoxRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxRemarks.BackColor = Color.White;
            textBoxRemarks.Location  = new Point(labelRemarks.Right, labelStartPageNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxRemarks.Multiline = true;
            textBoxRemarks.Height    = Css.WindowsForm.Constants.BIG_TEXT_BOX_HEIGHT;
            //
            // labelRevision
            //
            labelRevision.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelRevision.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelRevision.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, textBoxRemarks.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelRevision.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelRevision.Text      = "Revision:";
            labelRevision.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxRevision
            //
            textBoxRevision.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxRevision.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxRevision.BackColor = Color.White;
            textBoxRevision.Location  = new Point(labelRevision.Right, textBoxRemarks.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelSeparator2
            //
            labelSeparator2.AutoSize    = false;
            labelSeparator2.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, labelRevision.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator2.Height      = 2;
            labelSeparator2.BorderStyle = BorderStyle.Fixed3D;
            //
            // fileControl
            //
            fileControl.Location = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator2.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // buttonOK
            //
            buttonOK.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonOK.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonOK.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonOK.Text      = "OK";
            buttonOK.Click    += buttonOK_Click;
            //
            // buttonApply
            //
            buttonApply.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonApply.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonApply.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonApply.Text      = "Apply";
            buttonApply.Click    += buttonApply_Click;
            //
            // buttonCancel
            //
            buttonCancel.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonCancel.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonCancel.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonCancel.Text      = "Cancel";
            buttonCancel.Click    += buttonCancel_Click;


            AcceptButton    = buttonOK;
            CancelButton    = buttonCancel;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            MaximizeBox     = false;
            MinimizeBox     = false;
            ClientSize      = Css.WindowsForm.Constants.DefaultFormSize;

            /*string complianceText = ". Compliance";
             * if (currentATLB != null)
             *  Text = "SN " + currentATLB.SerialNumber + complianceText;
             * else
             *  Text = currentDirective.Title + complianceText;*/
            Text          = "Aircraft Technical Log Book";
            StartPosition = FormStartPosition.CenterScreen;
            Controls.Add(tabControl);
            Controls.Add(buttonOK);
            Controls.Add(buttonApply);
            Controls.Add(buttonCancel);
        }
コード例 #2
0
        private void InitializeComponent(DirectiveType directiveType)
        {
            AutoSize     = true;
            AutoSizeMode = AutoSizeMode.GrowAndShrink;

            checkBoxNDT        = new CheckBox();
            labelNDT           = new Label();
            labelManHours      = new Label();
            textboxManHours    = new TextBox();
            labelCost          = new Label();
            textboxCost        = new TextBox();
            labelEngOrderNo    = new Label();
            textBoxEngOrderNo  = new TextBox();
            linkLabelJobCard   = new LinkLabel();
            labelKitRequired   = new Label();
            textBoxKitRequired = new TextBox();
            fileControl        = new WindowsFormAttachedFileControl(null, "Adobe PDF Files|*.pdf",
                                                                    "This record does not contain a file proving the compliance. Enclose PDF file to prove the compliance.",
                                                                    "Attached file proves the compliance.", icons.PDFSmall);
            //
            // labelManHours
            //
            labelManHours.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelManHours.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelManHours.Location  = new Point(MARGIN, MARGIN);
            labelManHours.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelManHours.Text      = "Man Hours";
            //
            // textboxManHours
            //
            textboxManHours.BackColor = Color.White;
            textboxManHours.Font      = Css.OrdinaryText.Fonts.RegularFont;
            textboxManHours.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            textboxManHours.Location  = new Point(labelManHours.Right, MARGIN);
            textboxManHours.Size      = new Size(TEXTBOX_WIDTH, LABEL_HEIGHT);
            //
            // labelCost
            //
            labelCost.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelCost.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelCost.Location  = new Point(MARGIN, labelManHours.Bottom + HEIGHT_INTERVAL);
            labelCost.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelCost.Text      = "Cost (USD)";
            //
            // textboxCost
            //
            textboxCost.BackColor = Color.White;
            textboxCost.Font      = Css.OrdinaryText.Fonts.RegularFont;
            textboxCost.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            textboxCost.Location  = new Point(labelCost.Right, labelManHours.Bottom + HEIGHT_INTERVAL);
            textboxCost.Size      = new Size(TEXTBOX_WIDTH, LABEL_HEIGHT);
            //
            // checkBoxNDT
            //
            checkBoxNDT.Cursor    = Cursors.Hand;
            checkBoxNDT.FlatStyle = FlatStyle.Flat;
            checkBoxNDT.Font      = Css.SimpleLink.Fonts.Font;
            checkBoxNDT.ForeColor = Css.SimpleLink.Colors.LinkColor;
            checkBoxNDT.Size      = new Size(CHECKBOX_WIDTH, LABEL_HEIGHT);
            checkBoxNDT.Text      = "NDT";
            //
            // labelNDT
            //
            labelNDT.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelNDT.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelNDT.Size      = new Size(LABEL_REMARK_WIDTH, LABEL_HEIGHT);
            labelNDT.Text      = "The work requires Non Destructive Test equipment";
            labelNDT.TextAlign = ContentAlignment.MiddleLeft;
            //
            // labelEngOrderNo
            //
            labelEngOrderNo.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelEngOrderNo.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelEngOrderNo.Location  = new Point(WIDTH_INTERVAL, MARGIN);
            labelEngOrderNo.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelEngOrderNo.Text      = "Eng. Order No:";
            //
            // textBoxEngOrderNo
            //
            textBoxEngOrderNo.BackColor = Color.White;
            textBoxEngOrderNo.Font      = Css.OrdinaryText.Fonts.RegularFont;
            textBoxEngOrderNo.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            textBoxEngOrderNo.Location  = new Point(labelEngOrderNo.Right, MARGIN);
            textBoxEngOrderNo.Size      = new Size(TEXTBOX_WIDTH, LABEL_HEIGHT);
            textBoxEngOrderNo.MaxLength = 200;
            //
            // linkLabelJobCard
            //
            linkLabelJobCard.Font         = Css.SimpleLink.Fonts.Font;
            linkLabelJobCard.LinkColor    = Css.SimpleLink.Colors.LinkColor;
            linkLabelJobCard.Text         = "Job Card";
            linkLabelJobCard.Location     = new Point(WIDTH_INTERVAL, textBoxEngOrderNo.Bottom + HEIGHT_INTERVAL);
            linkLabelJobCard.LinkClicked += linkLabelJobCard_LinkClicked;
            linkLabelJobCard.Size         = new Size(LABEL_WIDTH + TEXTBOX_WIDTH, LABEL_HEIGHT);
            //
            // labelKitRequired
            //
            labelKitRequired.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelKitRequired.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelKitRequired.Location  = new Point(WIDTH_INTERVAL, linkLabelJobCard.Bottom + HEIGHT_INTERVAL);
            labelKitRequired.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelKitRequired.Text      = "Kit Required:";
            //
            // textBoxKitRequired
            //
            textBoxKitRequired.BackColor = Color.White;
            textBoxKitRequired.Font      = Css.OrdinaryText.Fonts.RegularFont;
            textBoxKitRequired.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            textBoxKitRequired.Location  = new Point(labelKitRequired.Right, linkLabelJobCard.Bottom + HEIGHT_INTERVAL);
            textBoxKitRequired.Size      = new Size(TEXTBOX_WIDTH, LABEL_HEIGHT);
            textBoxKitRequired.MaxLength = 50;
            //
            // DirectiveAttributesControl
            //
            BackColor = Css.CommonAppearance.Colors.BackColor;
            if (directiveType == DirectiveTypeCollection.Instance.ADDirectiveType)
            {
                checkBoxNDT.Location = new Point(MARGIN, labelCost.Bottom + HEIGHT_INTERVAL);
                labelNDT.Location    = new Point(checkBoxNDT.Right, labelCost.Bottom + HEIGHT_INTERVAL);
                fileControl.Location = new Point(MARGIN, checkBoxNDT.Bottom + HEIGHT_INTERVAL);
                Controls.Add(labelManHours);
                Controls.Add(textboxManHours);
                Controls.Add(labelCost);
                Controls.Add(textboxCost);
            }
            else
            {
                checkBoxNDT.Location = new Point(MARGIN, MARGIN);
                labelNDT.Location    = new Point(checkBoxNDT.Right, MARGIN);
                fileControl.Location = new Point(MARGIN, checkBoxNDT.Bottom + HEIGHT_INTERVAL);
            }
            Controls.Add(checkBoxNDT);
            Controls.Add(labelNDT);
            Controls.Add(labelEngOrderNo);
            Controls.Add(textBoxEngOrderNo);
            Controls.Add(linkLabelJobCard);
            Controls.Add(labelKitRequired);
            Controls.Add(textBoxKitRequired);
            Controls.Add(fileControl);

            //fileControl.Width = LABEL_WIDTH + TEXTBOX_WIDTH;
        }
コード例 #3
0
ファイル: MoveDetailForm.cs プロジェクト: mkbiltek2019/Cas
        private void InitializeComponent()
        {
            tabControl                  = new TabControl();
            tabPageGeneral              = new TabPage();
            labelComponent              = new Label();
            textBoxComponent            = new TextBox();
            labelDate                   = new Label();
            dateTimePickerDate          = new DateTimePicker();
            labelMoveTo                 = new Label();
            comboBoxBaseDetailContainer = new ComboBox();
            labelInstallToBaseDetails   = new Label();
            comboBoxBaseDetails         = new ComboBox();
            labelPosition               = new Label();
            textBoxPosition             = new TextBox();
            labelReference              = new Label();
            textBoxReference            = new TextBox();
            labelRemarks                = new Label();
            textBoxRemarks              = new TextBox();
            fileControl                 = new WindowsFormAttachedFileControl(null, "Adobe PDF Files|*.pdf",
                                                                             "This record does not contain a file proving the tranfering of the component.\r\nEnclose PDF file to prove the transfer of the component.",
                                                                             "Attached file proves the transfer of the component.", icons.PDFSmall);
            labelSeparator  = new Label();
            labelSeparator2 = new Label();
            labelSeparator3 = new Label();
            buttonOK        = new Button();
            buttonApply     = new Button();
            buttonCancel    = new Button();
            //
            // tabControl
            //
            tabControl.Controls.Add(tabPageGeneral);
            tabControl.Location = new Point(Css.WindowsForm.Constants.LEFT_MARGIN, Css.WindowsForm.Constants.TOP_MARGIN);
            //
            // tabPageGeneral
            //
            tabPageGeneral.BackColor = Css.WindowsForm.Colors.TabBackColor;
            tabPageGeneral.Text      = "General";
            tabPageGeneral.Controls.Add(labelComponent);
            tabPageGeneral.Controls.Add(textBoxComponent);
            tabPageGeneral.Controls.Add(labelSeparator);
            tabPageGeneral.Controls.Add(labelDate);
            tabPageGeneral.Controls.Add(dateTimePickerDate);
            tabPageGeneral.Controls.Add(labelMoveTo);
            tabPageGeneral.Controls.Add(comboBoxBaseDetailContainer);
            tabPageGeneral.Controls.Add(labelInstallToBaseDetails);
            tabPageGeneral.Controls.Add(comboBoxBaseDetails);
            tabPageGeneral.Controls.Add(labelPosition);
            tabPageGeneral.Controls.Add(textBoxPosition);
            tabPageGeneral.Controls.Add(labelSeparator2);
            tabPageGeneral.Controls.Add(labelReference);
            tabPageGeneral.Controls.Add(textBoxReference);
            tabPageGeneral.Controls.Add(labelRemarks);
            tabPageGeneral.Controls.Add(textBoxRemarks);
            tabPageGeneral.Controls.Add(labelSeparator3);
            tabPageGeneral.Controls.Add(fileControl);
            //
            // labelComponent
            //
            labelComponent.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelComponent.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelComponent.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            labelComponent.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelComponent.Text      = "Component:";
            labelComponent.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxComponent
            //
            textBoxComponent.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxComponent.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxComponent.Location  = new Point(labelComponent.Right, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            textBoxComponent.ReadOnly  = true;
            //
            // labelSeparator
            //
            labelSeparator.AutoSize    = false;
            labelSeparator.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, labelComponent.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator.Height      = 2;
            labelSeparator.BorderStyle = BorderStyle.Fixed3D;
            //
            // labelDate
            //
            labelDate.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelDate.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelDate.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelDate.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelDate.Text      = "Date:";
            labelDate.TextAlign = ContentAlignment.MiddleLeft;
            //
            // dateTimePickerDate
            //
            dateTimePickerDate.Font         = Css.WindowsForm.Fonts.RegularFont;
            dateTimePickerDate.ForeColor    = Css.WindowsForm.Colors.ForeColor;
            dateTimePickerDate.BackColor    = Color.White;
            dateTimePickerDate.Location     = new Point(labelDate.Right, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            dateTimePickerDate.Format       = DateTimePickerFormat.Custom;
            dateTimePickerDate.CustomFormat = new TermsProvider()["DateFormat"].ToString();
            //
            // labelMoveTo
            //
            labelMoveTo.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelMoveTo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelMoveTo.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, dateTimePickerDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelMoveTo.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelMoveTo.TextAlign = ContentAlignment.MiddleLeft;
            //
            // comboBoxWorkType
            //
            comboBoxBaseDetailContainer.BackColor             = Color.White;
            comboBoxBaseDetailContainer.Font                  = Css.WindowsForm.Fonts.RegularFont;
            comboBoxBaseDetailContainer.ForeColor             = Css.WindowsForm.Colors.ForeColor;
            comboBoxBaseDetailContainer.Location              = new Point(labelMoveTo.Right, dateTimePickerDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            comboBoxBaseDetailContainer.SelectedIndexChanged += new EventHandler(comboBoxBaseDetailContainer_SelectedIndexChanged);
            //
            // labelPosition
            //
            labelPosition.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelPosition.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelPosition.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelPosition.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxPosition
            //
            textBoxPosition.BackColor = Color.White;
            textBoxPosition.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxPosition.ForeColor = Css.WindowsForm.Colors.ForeColor;
            if (mode == MoveDetailFormMode.MoveToAircraft)
            {
                labelPosition.Text = "Position:";
            }
            else
            {
                labelPosition.Text = "Location:";
            }


            if (mode == MoveDetailFormMode.MoveToAircraft && !moveBaseDetails)
            {
                labelMoveTo.Text = "Aircraft:";
                //
                // labelInstallToBaseDetails
                //
                labelInstallToBaseDetails.Font      = Css.WindowsForm.Fonts.RegularFont;
                labelInstallToBaseDetails.ForeColor = Css.WindowsForm.Colors.ForeColor;
                labelInstallToBaseDetails.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
                labelInstallToBaseDetails.TextAlign = ContentAlignment.MiddleLeft;
                labelInstallToBaseDetails.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, comboBoxBaseDetailContainer.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
                labelInstallToBaseDetails.Text      = "Base Detail:";
                //
                // comboBoxBaseDetails
                //
                comboBoxBaseDetails.BackColor = Color.White;
                comboBoxBaseDetails.Font      = Css.WindowsForm.Fonts.RegularFont;
                comboBoxBaseDetails.ForeColor = Css.WindowsForm.Colors.ForeColor;
                comboBoxBaseDetails.Location  = new Point(labelInstallToBaseDetails.Right, comboBoxBaseDetailContainer.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);



                labelPosition.Location   = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, comboBoxBaseDetails.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
                textBoxPosition.Location = new Point(labelPosition.Right, comboBoxBaseDetails.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            }
            else
            {
                labelMoveTo.Text = "Store:";
                labelInstallToBaseDetails.Visible = false;
                comboBoxBaseDetails.Visible       = false;
                labelPosition.Location            = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, comboBoxBaseDetailContainer.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
                textBoxPosition.Location          = new Point(labelPosition.Right, comboBoxBaseDetailContainer.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            }
            //
            // labelSeparator2
            //
            labelSeparator2.AutoSize    = false;
            labelSeparator2.Height      = 2;
            labelSeparator2.BorderStyle = BorderStyle.Fixed3D;
            labelSeparator2.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, textBoxPosition.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // labelReference
            //
            labelReference.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelReference.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelReference.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelReference.TextAlign = ContentAlignment.MiddleLeft;
            labelReference.Text      = "Reference:";
            labelReference.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator2.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // textBoxReference
            //
            textBoxReference.BackColor = Color.White;
            textBoxReference.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxReference.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxReference.Location  = new Point(labelPosition.Right, labelSeparator2.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // labelRemarks
            //
            labelRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelRemarks.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelRemarks.Text      = "Remarks:";
            labelRemarks.TextAlign = ContentAlignment.MiddleLeft;
            labelRemarks.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, textBoxReference.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // textBoxRemarks
            //
            textBoxRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxRemarks.BackColor = Color.White;
            textBoxRemarks.Multiline = true;
            textBoxRemarks.Height    = Css.WindowsForm.Constants.BIG_TEXT_BOX_HEIGHT;
            textBoxRemarks.Location  = new Point(labelRemarks.Right, textBoxReference.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelSeparator3
            //
            labelSeparator3.AutoSize    = false;
            labelSeparator3.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, textBoxRemarks.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator3.Height      = 2;
            labelSeparator3.BorderStyle = BorderStyle.Fixed3D;
            //
            // fileControl
            //
            fileControl.Location = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator3.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // buttonOK
            //
            buttonOK.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonOK.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonOK.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonOK.Text      = "OK";
            buttonOK.Click    += buttonOK_Click;
            //
            // buttonApply
            //
            buttonApply.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonApply.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonApply.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonApply.Text      = "Apply";
            buttonApply.Click    += buttonApply_Click;
            //
            // buttonCancel
            //
            buttonCancel.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonCancel.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonCancel.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonCancel.Text      = "Cancel";
            buttonCancel.Click    += buttonCancel_Click;


            AcceptButton    = buttonOK;
            CancelButton    = buttonCancel;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            MaximizeBox     = false;
            MinimizeBox     = false;
            ClientSize      = Css.WindowsForm.Constants.DefaultFormSize;
            Text            = "Install";
            StartPosition   = FormStartPosition.CenterScreen;
            Controls.Add(tabControl);
            Controls.Add(buttonOK);
            Controls.Add(buttonApply);
            Controls.Add(buttonCancel);
        }
コード例 #4
0
        private void InitializeComponent()
        {
            AutoSize     = true;
            AutoSizeMode = AutoSizeMode.GrowAndShrink;
            BackColor    = Css.CommonAppearance.Colors.BackColor;

            labelTitle              = new Label();
            labelDescription        = new Label();
            labelInitialDocuments   = new Label();
            labelRequiredInspection = new Label();
            labelSinceNew           = new Label();
            labelRepeatInterval     = new Label();
            labelNotifyBefore       = new Label();
            labelRemarks            = new Label();
            labelHiddenRemarks      = new Label();
            labelLastCompliance     = new Label();
            labelDate = new Label();
            labelLastComplianceTSNCSN = new Label();
            labelInspectionDocument   = new Label();
            textboxTitle                   = new TextBox();
            radioButtonSDR                 = new RadioButton();
            radioButtonDBC                 = new RadioButton();
            textboxDescription             = new TextBox();
            textBoxInitialDocuments        = new TextBox();
            textBoxRequiredInspection      = new TextBox();
            lifelengthViewerSinceNew       = new LifelengthViewer();
            lifelengthViewerRepeatInterval = new LifelengthViewer();
            lifelengthViewerNotifyBefore   = new LifelengthViewer();
            textBoxRemarks                 = new TextBox();
            textBoxHiddenRemarks           = new TextBox();
            dateTimePickerDate             = new DateTimePicker();
            lifelengthViewerLastCompliance = new LifelengthViewer();
            textBoxInspectionDocument      = new TextBox();
            fileControl = new WindowsFormAttachedFileControl(null, "Adobe PDF Files|*.pdf",
                                                             "This record does not contain a file proving the compliance. Enclose PDF file to prove the compliance.",
                                                             "Attached file proves the compliance.", icons.PDFSmall);
            //
            // labelTitle
            //
            labelTitle.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelTitle.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelTitle.Location  = new Point(MARGIN, TOP_MARGIN);
            labelTitle.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelTitle.Text      = "Title";
            //
            // textboxTitle
            //
            textboxTitle.BackColor = Color.White;
            textboxTitle.Font      = Css.OrdinaryText.Fonts.RegularFont;
            textboxTitle.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            textboxTitle.Location  = new Point(labelTitle.Right, TOP_MARGIN);
            textboxTitle.Size      = new Size(TEXTBOX_WIDTH, LABEL_HEIGHT);
            textboxTitle.MaxLength = 50;
            textboxTitle.TabIndex  = 2;
            //
            // radioButtonSDR
            //
            radioButtonSDR.Cursor    = Cursors.Hand;
            radioButtonSDR.FlatStyle = FlatStyle.Flat;
            radioButtonSDR.Font      = new Font(Css.OrdinaryText.Fonts.RegularFont, FontStyle.Underline);
            radioButtonSDR.ForeColor = Css.SimpleLink.Colors.LinkColor;
            radioButtonSDR.Location  = new Point(MARGIN + LABEL_WIDTH, textboxTitle.Bottom + HEIGHT_INTERVAL);
            radioButtonSDR.Size      = new Size(TEXTBOX_WIDTH / 3, LABEL_HEIGHT);
            radioButtonSDR.Text      = "SDR";
            radioButtonSDR.Checked   = true;
            //
            // radioButtonDBC
            //
            radioButtonDBC.Cursor    = Cursors.Hand;
            radioButtonDBC.FlatStyle = FlatStyle.Flat;
            radioButtonDBC.Font      = new Font(Css.OrdinaryText.Fonts.RegularFont, FontStyle.Underline);
            radioButtonDBC.ForeColor = Css.SimpleLink.Colors.LinkColor;
            radioButtonDBC.Location  = new Point(radioButtonSDR.Right, textboxTitle.Bottom + HEIGHT_INTERVAL);
            radioButtonDBC.Size      = new Size(TEXTBOX_WIDTH / 3, LABEL_HEIGHT);
            radioButtonDBC.Text      = "DBC";
            //
            // labelDescription
            //
            labelDescription.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelDescription.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelDescription.Location  = new Point(MARGIN, radioButtonSDR.Bottom + HEIGHT_INTERVAL);
            labelDescription.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelDescription.Text      = "Description:";
            //
            // textboxDescription
            //
            textboxDescription.BackColor  = Color.White;
            textboxDescription.Font       = Css.OrdinaryText.Fonts.RegularFont;
            textboxDescription.ForeColor  = Css.OrdinaryText.Colors.ForeColor;
            textboxDescription.Location   = new Point(labelDescription.Right, radioButtonSDR.Bottom + HEIGHT_INTERVAL);
            textboxDescription.Size       = new Size(TEXTBOX_WIDTH, 3 * LABEL_HEIGHT + 2 * HEIGHT_INTERVAL);
            textboxDescription.Multiline  = true;
            textboxDescription.ScrollBars = ScrollBars.Vertical;
            //
            // labelInitialDocuments
            //
            labelInitialDocuments.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelInitialDocuments.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelInitialDocuments.Location  = new Point(MARGIN, textboxDescription.Bottom + HEIGHT_INTERVAL);
            labelInitialDocuments.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelInitialDocuments.Text      = "Initial Documents:";
            //
            //  textBoxInitialDocuments
            //
            textBoxInitialDocuments.BackColor = Color.White;
            textBoxInitialDocuments.Font      = Css.OrdinaryText.Fonts.RegularFont;
            textBoxInitialDocuments.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            textBoxInitialDocuments.Location  = new Point(labelInitialDocuments.Right, textboxDescription.Bottom + HEIGHT_INTERVAL);
            textBoxInitialDocuments.Size      = new Size(TEXTBOX_WIDTH, LABEL_HEIGHT);
            //
            // labelRequiredInspection
            //
            labelRequiredInspection.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelRequiredInspection.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelRequiredInspection.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelRequiredInspection.Text      = "Required Inspection:";
            labelRequiredInspection.Location  = new Point(MARGIN, textBoxInitialDocuments.Bottom + HEIGHT_INTERVAL);
            //
            //  textBoxRequiredInspection
            //
            textBoxRequiredInspection.BackColor  = Color.White;
            textBoxRequiredInspection.Font       = Css.OrdinaryText.Fonts.RegularFont;
            textBoxRequiredInspection.ForeColor  = Css.OrdinaryText.Colors.ForeColor;
            textBoxRequiredInspection.Size       = new Size(TEXTBOX_WIDTH, 3 * LABEL_HEIGHT + 2 * HEIGHT_INTERVAL);
            textBoxRequiredInspection.Multiline  = true;
            textBoxRequiredInspection.ScrollBars = ScrollBars.Vertical;
            textBoxRequiredInspection.Location   = new Point(labelRequiredInspection.Right, textBoxInitialDocuments.Bottom + HEIGHT_INTERVAL);
            //
            // labelSinceNew
            //
            labelSinceNew.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelSinceNew.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelSinceNew.Location  = new Point(MARGIN, textBoxRequiredInspection.Bottom + HEIGHT_INTERVAL + 17);
            labelSinceNew.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelSinceNew.Text      = "First Inspection:";
            //
            // lifelengthViewerSinceNew
            //
            lifelengthViewerSinceNew.Font            = Css.OrdinaryText.Fonts.RegularFont;
            lifelengthViewerSinceNew.ForeColor       = Css.OrdinaryText.Colors.ForeColor;
            lifelengthViewerSinceNew.ShowLeftHeader  = false;
            lifelengthViewerSinceNew.LeftHeaderWidth = 0;
            lifelengthViewerSinceNew.ShowMinutes     = false;
            lifelengthViewerSinceNew.TabIndex        = 13;
            lifelengthViewerSinceNew.Location        = new Point(labelSinceNew.Right, textBoxRequiredInspection.Bottom + HEIGHT_LIFELENGTH_INTERVAL);
            //
            // labelRepeatInterval
            //
            labelRepeatInterval.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelRepeatInterval.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelRepeatInterval.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelRepeatInterval.Text      = "Repeat Interval:";
            //
            // lifelengthViewerNotifyBefore
            //
            lifelengthViewerRepeatInterval.ShowHeaders     = false;
            lifelengthViewerRepeatInterval.Font            = Css.OrdinaryText.Fonts.RegularFont;
            lifelengthViewerRepeatInterval.ForeColor       = Css.OrdinaryText.Colors.ForeColor;
            lifelengthViewerRepeatInterval.ShowLeftHeader  = false;
            lifelengthViewerRepeatInterval.LeftHeaderWidth = 0;
            lifelengthViewerRepeatInterval.ShowMinutes     = false;
            //
            // labelNotifyBefore
            //
            labelNotifyBefore.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelNotifyBefore.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelNotifyBefore.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelNotifyBefore.Text      = "Notify Before:";
            //
            // lifelengthViewerNotifyBefore
            //
            lifelengthViewerNotifyBefore.ShowHeaders     = false;
            lifelengthViewerNotifyBefore.Font            = Css.OrdinaryText.Fonts.RegularFont;
            lifelengthViewerNotifyBefore.ForeColor       = Css.OrdinaryText.Colors.ForeColor;
            lifelengthViewerNotifyBefore.ShowLeftHeader  = false;
            lifelengthViewerNotifyBefore.LeftHeaderWidth = 0;
            lifelengthViewerNotifyBefore.ShowMinutes     = false;
            //
            // labelRemarks
            //
            labelRemarks.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelRemarks.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelRemarks.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelRemarks.Text      = "Remarks:";
            //
            // textBoxRemarks
            //
            textBoxRemarks.BackColor  = Color.White;
            textBoxRemarks.Font       = Css.OrdinaryText.Fonts.RegularFont;
            textBoxRemarks.ForeColor  = Css.OrdinaryText.Colors.ForeColor;
            textBoxRemarks.Size       = new Size(TEXTBOX_WIDTH, 3 * LABEL_HEIGHT + 2 * HEIGHT_INTERVAL);
            textBoxRemarks.Multiline  = true;
            textBoxRemarks.ScrollBars = ScrollBars.Vertical;
            //
            // labelHiddenRemarks
            //
            labelHiddenRemarks.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelHiddenRemarks.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelHiddenRemarks.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelHiddenRemarks.Text      = "Hidden remarks:";
            //
            // textBoxHiddenRemarks
            //
            textBoxHiddenRemarks.BackColor  = Color.White;
            textBoxHiddenRemarks.Font       = Css.OrdinaryText.Fonts.RegularFont;
            textBoxHiddenRemarks.ForeColor  = Css.OrdinaryText.Colors.ForeColor;
            textBoxHiddenRemarks.Size       = new Size(TEXTBOX_WIDTH, 3 * LABEL_HEIGHT + 2 * HEIGHT_INTERVAL);
            textBoxHiddenRemarks.Multiline  = true;
            textBoxHiddenRemarks.ScrollBars = ScrollBars.Vertical;
            //
            // labelLastCompliance
            //
            labelLastCompliance.Font      = Css.OrdinaryText.Fonts.BoldFont;
            labelLastCompliance.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelLastCompliance.Location  = new Point(WIDTH_INTERVAL, TOP_MARGIN);
            labelLastCompliance.Size      = new Size(WIDTH_INTERVAL, TOP_MARGIN);
            labelLastCompliance.Text      = "Last Inspection";
            //
            // labelDate
            //
            labelDate.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelDate.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelDate.Location  = new Point(WIDTH_INTERVAL, labelLastCompliance.Bottom + HEIGHT_INTERVAL);
            labelDate.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelDate.Text      = "Date:";
            labelDate.TextAlign = ContentAlignment.MiddleLeft;
            //
            // dateTimePickerDate
            //
            dateTimePickerDate.Font         = Css.OrdinaryText.Fonts.RegularFont;
            dateTimePickerDate.ForeColor    = Css.OrdinaryText.Colors.ForeColor;
            dateTimePickerDate.Location     = new Point(labelDate.Right, labelLastCompliance.Bottom + HEIGHT_INTERVAL);
            dateTimePickerDate.Size         = new Size(TEXTBOX_WIDTH, LABEL_HEIGHT);
            dateTimePickerDate.Format       = DateTimePickerFormat.Custom;
            dateTimePickerDate.CustomFormat = new TermsProvider()["DateFormat"].ToString();
            dateTimePickerDate.Enabled      = false;
            //
            // labelLastComplianceTSNCSN
            //
            labelLastComplianceTSNCSN.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelLastComplianceTSNCSN.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelLastComplianceTSNCSN.Location  = new Point(WIDTH_INTERVAL, dateTimePickerDate.Bottom + HEIGHT_INTERVAL + 17);
            labelLastComplianceTSNCSN.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelLastComplianceTSNCSN.Text      = "TSN CSN:";
            //
            // lifelengthViewerLastCompliance
            //
            lifelengthViewerLastCompliance.Font            = Css.OrdinaryText.Fonts.RegularFont;
            lifelengthViewerLastCompliance.ForeColor       = Css.OrdinaryText.Colors.ForeColor;
            lifelengthViewerLastCompliance.ShowLeftHeader  = false;
            lifelengthViewerLastCompliance.LeftHeaderWidth = 0;
            lifelengthViewerLastCompliance.ShowMinutes     = false;
            lifelengthViewerLastCompliance.Location        = new Point(labelLastComplianceTSNCSN.Right, dateTimePickerDate.Bottom + HEIGHT_LIFELENGTH_INTERVAL);
            lifelengthViewerLastCompliance.ReadOnly        = true;
            //
            // labelInspectionDocument
            //
            labelInspectionDocument.Font      = Css.OrdinaryText.Fonts.RegularFont;
            labelInspectionDocument.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelInspectionDocument.Location  = new Point(WIDTH_INTERVAL, lifelengthViewerLastCompliance.Bottom + HEIGHT_INTERVAL);
            labelInspectionDocument.Size      = new Size(LABEL_WIDTH, LABEL_HEIGHT);
            labelInspectionDocument.Text      = "Inspection Document:";
            //
            // textBoxInspectionDocument
            //
            textBoxInspectionDocument.Font      = Css.OrdinaryText.Fonts.RegularFont;
            textBoxInspectionDocument.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            textBoxInspectionDocument.Location  = new Point(labelInspectionDocument.Right, lifelengthViewerLastCompliance.Bottom + HEIGHT_INTERVAL);
            textBoxInspectionDocument.Size      = new Size(TEXTBOX_WIDTH, LABEL_HEIGHT);
            textBoxInspectionDocument.ReadOnly  = true;
            //
            // fileControl
            //
            fileControl.Location = new Point(WIDTH_INTERVAL, textBoxInspectionDocument.Bottom + HEIGHT_INTERVAL);


            Controls.Add(labelTitle);
            Controls.Add(textboxTitle);
            Controls.Add(radioButtonSDR);
            Controls.Add(radioButtonDBC);
            Controls.Add(labelDescription);
            Controls.Add(textboxDescription);
            Controls.Add(labelInitialDocuments);
            Controls.Add(textBoxInitialDocuments);
            Controls.Add(labelRequiredInspection);
            Controls.Add(textBoxRequiredInspection);
            Controls.Add(labelSinceNew);
            Controls.Add(lifelengthViewerSinceNew);
            Controls.Add(labelRepeatInterval);
            Controls.Add(lifelengthViewerRepeatInterval);
            Controls.Add(labelNotifyBefore);
            Controls.Add(lifelengthViewerNotifyBefore);
            Controls.Add(labelRemarks);
            Controls.Add(textBoxRemarks);
            Controls.Add(labelHiddenRemarks);
            Controls.Add(textBoxHiddenRemarks);
            Controls.Add(labelLastCompliance);
            Controls.Add(labelDate);
            Controls.Add(dateTimePickerDate);
            Controls.Add(labelLastComplianceTSNCSN);
            Controls.Add(lifelengthViewerLastCompliance);
            Controls.Add(labelInspectionDocument);
            Controls.Add(textBoxInspectionDocument);
            Controls.Add(fileControl);


            labelRepeatInterval.Location            = new Point(MARGIN, lifelengthViewerSinceNew.Bottom + HEIGHT_INTERVAL);
            lifelengthViewerRepeatInterval.Location = new Point(labelRepeatInterval.Right, lifelengthViewerSinceNew.Bottom + HEIGHT_LIFELENGTH_INTERVAL);
            labelNotifyBefore.Location            = new Point(MARGIN, lifelengthViewerRepeatInterval.Bottom + HEIGHT_INTERVAL);
            lifelengthViewerNotifyBefore.Location = new Point(labelNotifyBefore.Right, lifelengthViewerRepeatInterval.Bottom + HEIGHT_LIFELENGTH_INTERVAL);
            labelRemarks.Location         = new Point(MARGIN, labelNotifyBefore.Bottom + HEIGHT_INTERVAL);
            textBoxRemarks.Location       = new Point(labelRemarks.Right, lifelengthViewerNotifyBefore.Bottom + HEIGHT_INTERVAL);
            labelHiddenRemarks.Location   = new Point(MARGIN, textBoxRemarks.Bottom + HEIGHT_INTERVAL);
            textBoxHiddenRemarks.Location = new Point(labelHiddenRemarks.Right, textBoxRemarks.Bottom + HEIGHT_INTERVAL);
        }
コード例 #5
0
ファイル: ComplianceForm.cs プロジェクト: mkbiltek2019/Cas
        private void InitializeComponent()
        {
            labelAircraft                   = new Label();
            labelComponent                  = new Label();
            labelWorkType                   = new Label();
            labelDate                       = new Label();
            labelAircraftTSNCSN             = new Label();
            labelHours                      = new Label();
            labelCycles                     = new Label();
            labelRemarks                    = new Label();
            labelMaintenanceOrganization    = new Label();
            labelReference                  = new Label();
            textBoxAircraft                 = new TextBox();
            textBoxComponent                = new TextBox();
            comboBoxWorkType                = new ComboBox();
            dateTimePickerDate              = new DateTimePicker();
            textBoxHours                    = new TextBox();
            textBoxCycles                   = new TextBox();
            textBoxRemarks                  = new TextBox();
            textBoxMaintenanceOrganization  = new TextBox();
            textBoxReference                = new TextBox();
            checkBoxOfficialRecordsReceived = new CheckBox();
            fileControl                     = new WindowsFormAttachedFileControl(currentRecord.AttachedFile, "Adobe PDF Files|*.pdf",
                                                                                 "This record does not contain a file proving the compliance. Enclose PDF file to prove the compliance.",
                                                                                 "Attached file proves the compliance.", icons.PDFSmall);
            buttonOK              = new Button();
            buttonApply           = new Button();
            buttonCancel          = new Button();
            tabControl            = new TabControl();
            tabPageGeneral        = new TabPage();
            labelSeparator        = new Label();
            labelSeparator2       = new Label();
            labelSeparator3       = new Label();
            hashTextRecordType    = new Dictionary <string, RecordType>();
            recordTypesCollection = RecordTypesCollection.Instance;
            //
            // tabControl
            //
            tabControl.Controls.Add(tabPageGeneral);
            tabControl.Location = new Point(Css.WindowsForm.Constants.LEFT_MARGIN, Css.WindowsForm.Constants.TOP_MARGIN);
            //
            // labelAircraft
            //
            labelAircraft.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelAircraft.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelAircraft.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            labelAircraft.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelAircraft.Text      = "Aircraft:";
            labelAircraft.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxAircraft
            //
            textBoxAircraft.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxAircraft.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxAircraft.Location  = new Point(labelAircraft.Right, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            textBoxAircraft.ReadOnly  = true;
            //
            // labelComponent
            //
            labelComponent.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelComponent.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelComponent.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelAircraft.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelComponent.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelComponent.Text      = "Component:";
            labelComponent.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxComponent
            //
            textBoxComponent.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxComponent.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxComponent.Location  = new Point(labelComponent.Right, labelAircraft.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxComponent.ReadOnly  = true;
            //
            // labelSeparator
            //
            labelSeparator.AutoSize    = false;
            labelSeparator.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, labelComponent.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator.Height      = 2;
            labelSeparator.BorderStyle = BorderStyle.Fixed3D;
            //
            // labelWorkType
            //
            labelWorkType.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelWorkType.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelWorkType.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelWorkType.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelWorkType.Text      = "Work Type:";
            labelWorkType.TextAlign = ContentAlignment.MiddleLeft;
            //
            // comboBoxWorkType
            //
            comboBoxWorkType.BackColor = Color.White;
            comboBoxWorkType.Font      = Css.WindowsForm.Fonts.RegularFont;
            comboBoxWorkType.ForeColor = Css.WindowsForm.Colors.ForeColor;
            comboBoxWorkType.Location  = new Point(labelWorkType.Right, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            if (mode == ScreenMode.Edit)
            {
                comboBoxWorkType.Enabled = false;
            }
            //
            // labelDate
            //
            labelDate.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelDate.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelDate.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelWorkType.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelDate.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelDate.Text      = "Date:";
            labelDate.TextAlign = ContentAlignment.MiddleLeft;
            //
            // dateTimePickerDate
            //
            dateTimePickerDate.Font          = Css.WindowsForm.Fonts.RegularFont;
            dateTimePickerDate.ForeColor     = Css.WindowsForm.Colors.ForeColor;
            dateTimePickerDate.BackColor     = Color.White;
            dateTimePickerDate.Location      = new Point(labelDate.Right, labelWorkType.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            dateTimePickerDate.Format        = DateTimePickerFormat.Custom;
            dateTimePickerDate.CustomFormat  = new TermsProvider()["DateFormat"].ToString();
            dateTimePickerDate.ValueChanged += dateTimePickerDate_ValueChanged;
            //
            // labelAircraftTSNCSN
            //
            labelAircraftTSNCSN.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelAircraftTSNCSN.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelAircraftTSNCSN.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelAircraftTSNCSN.Text      = "TSN/CSN";
            labelAircraftTSNCSN.TextAlign = ContentAlignment.MiddleLeft;
            labelAircraftTSNCSN.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, dateTimePickerDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelHours
            //
            labelHours.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelHours.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelHours.Size      = new Size(Css.WindowsForm.Constants.LABEL_SHORT_WITH, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            labelHours.Text      = "Hours:";
            labelHours.TextAlign = ContentAlignment.MiddleLeft;
            labelHours.Location  = new Point(labelAircraftTSNCSN.Right, dateTimePickerDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // textBoxHours
            //
            textBoxHours.Font         = Css.WindowsForm.Fonts.RegularFont;
            textBoxHours.ForeColor    = Css.WindowsForm.Colors.ForeColor;
            textBoxHours.BackColor    = Color.White;
            textBoxHours.Location     = new Point(labelHours.Right, dateTimePickerDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxHours.Width        = Css.WindowsForm.Constants.TEXT_BOX_SHORT_WITH;
            textBoxHours.TextChanged += ActualState_TextChanged;
            //
            // labelCycles
            //
            labelCycles.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelCycles.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelCycles.Size      = new Size(Css.WindowsForm.Constants.LABEL_SHORT_WITH, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            labelCycles.Text      = "Cycles:";
            labelCycles.TextAlign = ContentAlignment.MiddleLeft;
            labelCycles.Location  = new Point(textBoxHours.Right + Css.WindowsForm.Constants.LABEL_MARGIN * 2, dateTimePickerDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // textBoxCycles
            //
            textBoxCycles.Font         = Css.WindowsForm.Fonts.RegularFont;
            textBoxCycles.ForeColor    = Css.WindowsForm.Colors.ForeColor;
            textBoxCycles.BackColor    = Color.White;
            textBoxCycles.Location     = new Point(labelCycles.Right, dateTimePickerDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxCycles.Width        = Css.WindowsForm.Constants.TEXT_BOX_SHORT_WITH;
            textBoxCycles.TextChanged += ActualState_TextChanged;
            //
            // labelRemarks
            //
            labelRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelRemarks.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelRemarks.Text      = "Remarks:";
            labelRemarks.TextAlign = ContentAlignment.MiddleLeft;
            labelRemarks.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, textBoxHours.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // textBoxRemarks
            //
            textBoxRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxRemarks.BackColor = Color.White;
            textBoxRemarks.Multiline = true;
            textBoxRemarks.Height    = Css.WindowsForm.Constants.BIG_TEXT_BOX_HEIGHT;
            textBoxRemarks.Location  = new Point(labelRemarks.Right, textBoxHours.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelSeparator2
            //
            labelSeparator2.AutoSize    = false;
            labelSeparator2.Height      = 2;
            labelSeparator2.BorderStyle = BorderStyle.Fixed3D;
            labelSeparator2.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, textBoxRemarks.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // labelMaintenanceOrganization
            //
            labelMaintenanceOrganization.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelMaintenanceOrganization.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelMaintenanceOrganization.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelMaintenanceOrganization.Text      = "MO:";
            labelMaintenanceOrganization.TextAlign = ContentAlignment.MiddleLeft;
            labelMaintenanceOrganization.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator2.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // textBoxMaintenanceOrganization
            //
            textBoxMaintenanceOrganization.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxMaintenanceOrganization.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxMaintenanceOrganization.BackColor = Color.White;
            textBoxMaintenanceOrganization.Location  = new Point(labelMaintenanceOrganization.Right, labelSeparator2.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // labelReference
            //
            labelReference.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelReference.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelReference.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelReference.Text      = "Reference:";
            labelReference.TextAlign = ContentAlignment.MiddleLeft;
            labelReference.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, textBoxMaintenanceOrganization.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // textBoxReference
            //
            textBoxReference.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxReference.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxReference.BackColor = Color.White;
            textBoxReference.Location  = new Point(labelMaintenanceOrganization.Right, textBoxMaintenanceOrganization.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // checkBoxOfficialRecordsReceived
            //
            checkBoxOfficialRecordsReceived.Font      = Css.WindowsForm.Fonts.RegularFont;
            checkBoxOfficialRecordsReceived.ForeColor = Css.WindowsForm.Colors.ForeColor;
            checkBoxOfficialRecordsReceived.TextAlign = ContentAlignment.MiddleLeft;
            checkBoxOfficialRecordsReceived.Text      = "Official Records Received:";
            checkBoxOfficialRecordsReceived.Location  = new Point(labelReference.Right, textBoxReference.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelSeparator3
            //
            labelSeparator3.AutoSize    = false;
            labelSeparator3.Height      = 2;
            labelSeparator3.BorderStyle = BorderStyle.Fixed3D;
            labelSeparator3.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, checkBoxOfficialRecordsReceived.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // fileControl
            //
            fileControl.Location = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator3.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // buttonOK
            //
            buttonOK.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonOK.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonOK.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonOK.Text      = "OK";
            buttonOK.Click    += buttonOK_Click;
            //
            // buttonApply
            //
            buttonApply.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonApply.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonApply.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonApply.Text      = "Apply";
            buttonApply.Click    += buttonApply_Click;
            //
            // buttonCancel
            //
            buttonCancel.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonCancel.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonCancel.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonCancel.Text      = "Cancel";
            buttonCancel.Click    += buttonCancel_Click;
            //
            // tabPageGeneral
            //
            tabPageGeneral.BackColor = Css.WindowsForm.Colors.TabBackColor;
            tabPageGeneral.Text      = "General";
            tabPageGeneral.Controls.Add(labelAircraft);
            tabPageGeneral.Controls.Add(textBoxAircraft);
            tabPageGeneral.Controls.Add(labelComponent);
            tabPageGeneral.Controls.Add(textBoxComponent);
            tabPageGeneral.Controls.Add(labelSeparator);
            tabPageGeneral.Controls.Add(labelWorkType);
            tabPageGeneral.Controls.Add(comboBoxWorkType);
            tabPageGeneral.Controls.Add(labelDate);
            tabPageGeneral.Controls.Add(dateTimePickerDate);
            tabPageGeneral.Controls.Add(labelAircraftTSNCSN);
            tabPageGeneral.Controls.Add(labelHours);
            tabPageGeneral.Controls.Add(textBoxHours);
            tabPageGeneral.Controls.Add(labelCycles);
            tabPageGeneral.Controls.Add(textBoxCycles);
            tabPageGeneral.Controls.Add(labelRemarks);
            tabPageGeneral.Controls.Add(textBoxRemarks);
            tabPageGeneral.Controls.Add(labelSeparator2);
            tabPageGeneral.Controls.Add(labelMaintenanceOrganization);
            tabPageGeneral.Controls.Add(textBoxMaintenanceOrganization);
            tabPageGeneral.Controls.Add(labelReference);
            tabPageGeneral.Controls.Add(textBoxReference);
            tabPageGeneral.Controls.Add(checkBoxOfficialRecordsReceived);
            tabPageGeneral.Controls.Add(labelSeparator3);
            tabPageGeneral.Controls.Add(fileControl);

            string complianceText = ". Compliance";

            if (currentDetail != null)
            {
                Text = "SN " + currentDetail.SerialNumber + complianceText;
                if (!currentDetail.InUse)
                {
                    labelAircraft.Text = "Store:";
                }
            }
            else
            {
                Text = currentDirective.Title + complianceText;
            }
            AcceptButton    = buttonOK;
            CancelButton    = buttonCancel;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            MaximizeBox     = false;
            MinimizeBox     = false;
            ClientSize      = Css.WindowsForm.Constants.DefaultFormSize;
            StartPosition   = FormStartPosition.CenterScreen;
            Controls.Add(tabControl);
            Controls.Add(buttonOK);
            Controls.Add(buttonApply);
            Controls.Add(buttonCancel);
        }
コード例 #6
0
        private void InitializeComponent()
        {
            labelComponent        = new Label();
            labelFrom             = new Label();
            labelFromAdditional   = new Label();
            labelDate             = new Label();
            labelTo               = new Label();
            labelToAdditional     = new Label();
            labelRemarks          = new Label();
            textBoxSerialNumber   = new TextBox();
            textBoxPartNumber     = new TextBox();
            textBoxFrom           = new TextBox();
            textBoxFromAdditional = new TextBox();
            textBoxDate           = new TextBox();
            textBoxTo             = new TextBox();
            textBoxToAdditional   = new TextBox();
            textBoxRemarks        = new TextBox();
            fileControl           = new WindowsFormAttachedFileControl(currentRecord.AttachedFile, "Adobe PDF Files|*.pdf",
                                                                       "This record does not contain a file proving the compliance. Enclose PDF file to prove the compliance.",
                                                                       "Attached file proves the compliance.", icons.PDFSmall);
            buttonOK        = new Button();
            buttonApply     = new Button();
            buttonCancel    = new Button();
            tabControl      = new TabControl();
            tabPageGeneral  = new TabPage();
            labelSeparator  = new Label();
            labelSeparator2 = new Label();
            labelSeparator3 = new Label();
            labelSeparator4 = new Label();
            //
            // tabControl
            //
            tabControl.Controls.Add(tabPageGeneral);
            tabControl.Location = new Point(Css.WindowsForm.Constants.LEFT_MARGIN, Css.WindowsForm.Constants.TOP_MARGIN);
            //
            // tabPageGeneral
            //
            tabPageGeneral.BackColor = Css.WindowsForm.Colors.TabBackColor;
            tabPageGeneral.Text      = "General";
            tabPageGeneral.Controls.Add(labelComponent);
            tabPageGeneral.Controls.Add(textBoxSerialNumber);
            tabPageGeneral.Controls.Add(textBoxPartNumber);
            tabPageGeneral.Controls.Add(labelDate);
            tabPageGeneral.Controls.Add(textBoxDate);
            tabPageGeneral.Controls.Add(labelSeparator);
            tabPageGeneral.Controls.Add(labelFrom);
            tabPageGeneral.Controls.Add(textBoxFrom);
            tabPageGeneral.Controls.Add(labelFromAdditional);
            tabPageGeneral.Controls.Add(textBoxFromAdditional);
            tabPageGeneral.Controls.Add(labelSeparator2);
            tabPageGeneral.Controls.Add(labelTo);
            tabPageGeneral.Controls.Add(textBoxTo);
            tabPageGeneral.Controls.Add(labelToAdditional);
            tabPageGeneral.Controls.Add(textBoxToAdditional);
            tabPageGeneral.Controls.Add(labelSeparator3);
            tabPageGeneral.Controls.Add(labelRemarks);
            tabPageGeneral.Controls.Add(textBoxRemarks);
            tabPageGeneral.Controls.Add(labelSeparator4);
            tabPageGeneral.Controls.Add(fileControl);
            //
            // labelComponent
            //
            labelComponent.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelComponent.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelComponent.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            labelComponent.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelComponent.Text      = "Component:";
            labelComponent.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxSerialNumber
            //
            textBoxSerialNumber.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxSerialNumber.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxSerialNumber.Location  = new Point(labelComponent.Right, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            textBoxSerialNumber.ReadOnly  = true;
            //
            // textBoxPartNumber
            //
            textBoxPartNumber.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxPartNumber.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxPartNumber.Location  = new Point(labelComponent.Right, labelComponent.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxPartNumber.ReadOnly  = true;
            //
            // labelDate
            //
            labelDate.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelDate.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelDate.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, textBoxPartNumber.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelDate.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelDate.Text      = "Date:";
            labelDate.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxDate
            //
            textBoxDate.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxDate.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxDate.Location  = new Point(labelDate.Right, textBoxPartNumber.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxDate.ReadOnly  = true;
            //
            // labelSeparator
            //
            labelSeparator.AutoSize    = false;
            labelSeparator.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, textBoxDate.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator.Height      = 2;
            labelSeparator.BorderStyle = BorderStyle.Fixed3D;
            //
            // labelFrom
            //
            labelFrom.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelFrom.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelFrom.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelFrom.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelFrom.Text      = "From:";
            labelFrom.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxFrom
            //
            textBoxFrom.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxFrom.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxFrom.Location  = new Point(labelFrom.Right, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            textBoxFrom.ReadOnly  = true;
            //
            // labelFromAdditional
            //
            labelFromAdditional.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelFromAdditional.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelFromAdditional.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, textBoxFrom.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelFromAdditional.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelFromAdditional.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxFromAdditional
            //
            textBoxFromAdditional.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxFromAdditional.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxFromAdditional.Location  = new Point(labelFromAdditional.Right, textBoxFrom.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            textBoxFromAdditional.ReadOnly  = true;
            //
            // labelSeparator2
            //
            labelSeparator2.AutoSize    = false;
            labelSeparator2.Height      = 2;
            labelSeparator2.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, textBoxFromAdditional.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator2.BorderStyle = BorderStyle.Fixed3D;
            //
            // labelTo
            //
            labelTo.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelTo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelTo.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator2.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelTo.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelTo.Text      = "To:";
            labelTo.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxTo
            //
            textBoxTo.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxTo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxTo.Location  = new Point(labelTo.Right, labelSeparator2.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            textBoxTo.ReadOnly  = true;
            //
            // labelToAdditional
            //
            labelToAdditional.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelToAdditional.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelToAdditional.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, textBoxTo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelToAdditional.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelToAdditional.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxToAdditional
            //
            textBoxToAdditional.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxToAdditional.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxToAdditional.Location  = new Point(labelTo.Right, textBoxTo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //textBoxToAdditional.ReadOnly = true;
            //
            // labelSeparator3
            //
            labelSeparator3.AutoSize    = false;
            labelSeparator3.Height      = 2;
            labelSeparator3.BorderStyle = BorderStyle.Fixed3D;
            labelSeparator3.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, textBoxToAdditional.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // labelRemarks
            //
            labelRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelRemarks.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator3.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelRemarks.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelRemarks.Text      = "Remarks:";
            labelRemarks.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxRemarks
            //
            textBoxRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxRemarks.BackColor = Color.White;
            textBoxRemarks.Multiline = true;
            textBoxRemarks.Height    = Css.WindowsForm.Constants.BIG_TEXT_BOX_HEIGHT;
            textBoxRemarks.Location  = new Point(labelRemarks.Right, labelSeparator3.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // labelSeparator4
            //
            labelSeparator4.AutoSize    = false;
            labelSeparator4.Height      = 2;
            labelSeparator4.BorderStyle = BorderStyle.Fixed3D;
            labelSeparator4.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, textBoxRemarks.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // fileControl
            //
            fileControl.Location = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator4.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // buttonOK
            //
            buttonOK.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonOK.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonOK.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonOK.Text      = "OK";
            buttonOK.Click    += buttonOK_Click;
            //
            // buttonApply
            //
            buttonApply.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonApply.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonApply.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonApply.Text      = "Apply";
            buttonApply.Click    += buttonApply_Click;
            //
            // buttonCancel
            //
            buttonCancel.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonCancel.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonCancel.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonCancel.Text      = "Cancel";
            buttonCancel.Click    += buttonCancel_Click;


            Text            = "SN " + currentDetail.SerialNumber + ". Transfer record";
            AcceptButton    = buttonOK;
            CancelButton    = buttonCancel;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            MaximizeBox     = false;
            MinimizeBox     = false;
            ClientSize      = Css.WindowsForm.Constants.DefaultFormSize;
            StartPosition   = FormStartPosition.CenterScreen;
            Controls.Add(tabControl);
            Controls.Add(buttonOK);
            Controls.Add(buttonApply);
            Controls.Add(buttonCancel);
        }
コード例 #7
0
        private void InitializeComponent()
        {
            tabControl         = new TabControl();
            tabPageGeneral     = new TabPage();
            tabPageMaintenance = new TabPage();
            labelWorkPackage   = new Label();
            labelDescription   = new Label();
            labelCheckType     = new Label();
            labelAuthor        = new Label();
            labelOpeningDate   = new Label();
            checkBoxPublish    = new CheckBox();
            checkBoxClose      = new CheckBox();
            labelStation       = new Label();
            labelRemarks       = new Label();
            labelMaintenanceReleaseCertificateNo = new Label();
            labelMaintenanceReportNo             = new Label();
            textBoxWorkPackage                     = new TextBox();
            textBoxCheckType                       = new TextBox();
            textBoxAuthor                          = new TextBox();
            textBoxDescription                     = new TextBox();
            dateTimePickerOpeningDate              = new DateTimePicker();
            dateTimePickerPublishingDate           = new DateTimePicker();
            dateTimePickerClosingDate              = new DateTimePicker();
            textBoxStation                         = new TextBox();
            textBoxRemarks                         = new TextBox();
            textBoxMaintenanceReleaseCertificateNo = new TextBox();
            textBoxMaintenanceReportNo             = new TextBox();
            AttachedFile file = new AttachedFile();

            file.FileData = currentWorkPackage.AttachmentData;
            file.FileName = currentWorkPackage.AttachmentFileName;
            fileControl   = new WindowsFormAttachedFileControl(file, "Adobe PDF Files|*.pdf",
                                                               "There is no associated document proving the compliance of the work package. Enclose PDF file to prove the compliance.",
                                                               "Associated document proves the compliance of the work package. Open the document to see details.", icons.PDFSmall);
            labelSeparator  = new Label();
            labelSeparator2 = new Label();
            labelSeparator3 = new Label();
            buttonOK        = new Button();
            buttonApply     = new Button();
            buttonCancel    = new Button();
            //
            // tabControl
            //
            tabControl.Controls.Add(tabPageGeneral);
            tabControl.Controls.Add(tabPageMaintenance);
            tabControl.Location = new Point(Css.WindowsForm.Constants.LEFT_MARGIN, Css.WindowsForm.Constants.TOP_MARGIN);
            //
            // tabPageGeneral
            //
            tabPageGeneral.BackColor = Css.WindowsForm.Colors.TabBackColor;
            tabPageGeneral.Text      = "General";
            tabPageGeneral.Controls.Add(labelWorkPackage);
            tabPageGeneral.Controls.Add(textBoxWorkPackage);
            tabPageGeneral.Controls.Add(labelSeparator);
            tabPageGeneral.Controls.Add(labelDescription);
            tabPageGeneral.Controls.Add(textBoxDescription);
            tabPageGeneral.Controls.Add(labelCheckType);
            tabPageGeneral.Controls.Add(textBoxCheckType);
            tabPageGeneral.Controls.Add(labelAuthor);
            tabPageGeneral.Controls.Add(textBoxAuthor);
            tabPageGeneral.Controls.Add(labelOpeningDate);
            tabPageGeneral.Controls.Add(dateTimePickerOpeningDate);
            tabPageGeneral.Controls.Add(checkBoxPublish);
            tabPageGeneral.Controls.Add(dateTimePickerPublishingDate);
            tabPageGeneral.Controls.Add(checkBoxClose);
            tabPageGeneral.Controls.Add(dateTimePickerClosingDate);
            tabPageGeneral.Controls.Add(labelStation);
            tabPageGeneral.Controls.Add(textBoxStation);
            tabPageGeneral.Controls.Add(labelSeparator3);
            tabPageGeneral.Controls.Add(labelRemarks);
            tabPageGeneral.Controls.Add(textBoxRemarks);
            //
            // tabPageMaintenance
            //
            tabPageMaintenance.BackColor = Css.WindowsForm.Colors.TabBackColor;
            tabPageMaintenance.Text      = "Maintenance";
            tabPageMaintenance.Controls.Add(labelMaintenanceReleaseCertificateNo);
            tabPageMaintenance.Controls.Add(textBoxMaintenanceReleaseCertificateNo);
            tabPageMaintenance.Controls.Add(labelMaintenanceReportNo);
            tabPageMaintenance.Controls.Add(textBoxMaintenanceReportNo);
            tabPageMaintenance.Controls.Add(labelSeparator2);
            tabPageMaintenance.Controls.Add(fileControl);
            //
            // labelWorkPackage
            //
            labelWorkPackage.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelWorkPackage.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelWorkPackage.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            labelWorkPackage.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelWorkPackage.Text      = "Work Package:";
            labelWorkPackage.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxWorkPackage
            //
            textBoxWorkPackage.BackColor = Color.White;
            textBoxWorkPackage.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxWorkPackage.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxWorkPackage.Location  = new Point(labelWorkPackage.Right, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            textBoxWorkPackage.Multiline = true;
            textBoxWorkPackage.Height    = Css.WindowsForm.Constants.TEXT_BOX_WITH_PICTURE_BOX_HEIGHT;
            //
            // labelSeparator
            //
            labelSeparator.AutoSize    = false;
            labelSeparator.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, labelWorkPackage.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator.Height      = 2;
            labelSeparator.BorderStyle = BorderStyle.Fixed3D;
            //
            // labelDescription
            //
            labelDescription.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelDescription.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelDescription.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelDescription.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelDescription.Text      = "Description:";
            labelDescription.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxDescription
            //
            textBoxDescription.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxDescription.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxDescription.BackColor = Color.White;
            textBoxDescription.Location  = new Point(labelDescription.Right, labelSeparator.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            textBoxDescription.Multiline = true;
            textBoxDescription.Height    = Css.WindowsForm.Constants.BIG_TEXT_BOX_HEIGHT;
            //
            // labelCheckType
            //
            labelCheckType.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelCheckType.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelCheckType.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, textBoxDescription.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelCheckType.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelCheckType.Text      = "Check Type:";
            labelCheckType.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxCheckType
            //
            textBoxCheckType.BackColor = Color.White;
            textBoxCheckType.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxCheckType.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxCheckType.Location  = new Point(labelCheckType.Right, textBoxDescription.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelAuthor
            //
            labelAuthor.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelAuthor.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelAuthor.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelCheckType.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelAuthor.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelAuthor.Text      = "Author:";
            labelAuthor.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxAuthor
            //
            textBoxAuthor.BackColor = Color.White;
            textBoxAuthor.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxAuthor.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxAuthor.Location  = new Point(labelAuthor.Right, labelCheckType.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelOpeningDate
            //
            labelOpeningDate.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelOpeningDate.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelOpeningDate.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelAuthor.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelOpeningDate.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelOpeningDate.Text      = "Opening Date:";
            labelOpeningDate.TextAlign = ContentAlignment.MiddleLeft;
            //
            // dateTimePickerOpeningDate
            //
            dateTimePickerOpeningDate.Font         = Css.WindowsForm.Fonts.RegularFont;
            dateTimePickerOpeningDate.ForeColor    = Css.WindowsForm.Colors.ForeColor;
            dateTimePickerOpeningDate.BackColor    = Color.White;
            dateTimePickerOpeningDate.Location     = new Point(labelOpeningDate.Right, labelAuthor.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            dateTimePickerOpeningDate.Format       = DateTimePickerFormat.Custom;
            dateTimePickerOpeningDate.CustomFormat = new TermsProvider()["DateFormat"].ToString();
            //
            // checkBoxPublish
            //
            checkBoxPublish.CheckAlign      = ContentAlignment.MiddleRight;
            checkBoxPublish.Font            = Css.WindowsForm.Fonts.RegularFont;
            checkBoxPublish.ForeColor       = Css.WindowsForm.Colors.ForeColor;
            checkBoxPublish.Location        = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelOpeningDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            checkBoxPublish.Size            = new Size(Css.WindowsForm.Constants.DefaultLabelSize.Width - 5, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            checkBoxPublish.TextAlign       = ContentAlignment.MiddleLeft;
            checkBoxPublish.Text            = "Published:";
            checkBoxPublish.CheckedChanged += checkBoxPublish_CheckedChanged;
            //
            // dateTimePickerPublishingDate
            //
            dateTimePickerPublishingDate.Font         = Css.WindowsForm.Fonts.RegularFont;
            dateTimePickerPublishingDate.ForeColor    = Css.WindowsForm.Colors.ForeColor;
            dateTimePickerPublishingDate.BackColor    = Color.White;
            dateTimePickerPublishingDate.Location     = new Point(labelOpeningDate.Right, labelOpeningDate.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            dateTimePickerPublishingDate.Format       = DateTimePickerFormat.Custom;
            dateTimePickerPublishingDate.CustomFormat = new TermsProvider()["DateFormat"].ToString();
            dateTimePickerPublishingDate.GotFocus    += dateTimePickerPublishingDate_GotFocus;
            //
            // checkBoxClose
            //
            checkBoxClose.CheckAlign      = ContentAlignment.MiddleRight;
            checkBoxClose.Font            = Css.WindowsForm.Fonts.RegularFont;
            checkBoxClose.ForeColor       = Css.WindowsForm.Colors.ForeColor;
            checkBoxClose.Location        = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, checkBoxPublish.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            checkBoxClose.Size            = new Size(Css.WindowsForm.Constants.DefaultLabelSize.Width - 5, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            checkBoxClose.TextAlign       = ContentAlignment.MiddleLeft;
            checkBoxClose.Text            = "Closed:";
            checkBoxClose.CheckedChanged += checkBoxClose_CheckedChanged;
            //
            // dateTimePickerClosingDate
            //
            dateTimePickerClosingDate.Font         = Css.WindowsForm.Fonts.RegularFont;
            dateTimePickerClosingDate.ForeColor    = Css.WindowsForm.Colors.ForeColor;
            dateTimePickerClosingDate.BackColor    = Color.White;
            dateTimePickerClosingDate.Location     = new Point(labelOpeningDate.Right, checkBoxPublish.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            dateTimePickerClosingDate.Format       = DateTimePickerFormat.Custom;
            dateTimePickerClosingDate.CustomFormat = new TermsProvider()["DateFormat"].ToString();
            dateTimePickerClosingDate.GotFocus    += dateTimePickerClosingDate_GotFocus;
            //
            // labelStation
            //
            labelStation.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelStation.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelStation.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, checkBoxClose.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelStation.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelStation.Text      = "Station:";
            labelStation.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxStation
            //
            textBoxStation.BackColor = Color.White;
            textBoxStation.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxStation.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxStation.Location  = new Point(labelStation.Right, checkBoxClose.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelSeparator3
            //
            labelSeparator3.AutoSize    = false;
            labelSeparator3.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, labelStation.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator3.Height      = 2;
            labelSeparator3.BorderStyle = BorderStyle.Fixed3D;
            //
            // labelRemarks
            //
            labelRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelRemarks.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator3.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelRemarks.Size      = Css.WindowsForm.Constants.DefaultLabelSize;
            labelRemarks.Text      = "Remarks:";
            labelRemarks.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxRemarks
            //
            textBoxRemarks.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxRemarks.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxRemarks.BackColor = Color.White;
            textBoxRemarks.Location  = new Point(labelRemarks.Right, labelSeparator3.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            textBoxRemarks.Multiline = true;
            textBoxRemarks.Height    = Css.WindowsForm.Constants.BIG_TEXT_BOX_HEIGHT;
            //
            // labelMaintenanceReleaseCertificateNo
            //
            labelMaintenanceReleaseCertificateNo.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelMaintenanceReleaseCertificateNo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelMaintenanceReleaseCertificateNo.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            labelMaintenanceReleaseCertificateNo.Size      = new Size(LABEL_WIDTH, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            labelMaintenanceReleaseCertificateNo.Text      = "Release Certificate No:";
            labelMaintenanceReleaseCertificateNo.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxMaintenanceReleaseCertificateNo
            //
            textBoxMaintenanceReleaseCertificateNo.BackColor = Color.White;
            textBoxMaintenanceReleaseCertificateNo.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxMaintenanceReleaseCertificateNo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxMaintenanceReleaseCertificateNo.Location  = new Point(labelMaintenanceReleaseCertificateNo.Right, Css.WindowsForm.Constants.TAB_TOP_MARGIN);
            //
            // labelMaintenanceReportNo
            //
            labelMaintenanceReportNo.Font      = Css.WindowsForm.Fonts.RegularFont;
            labelMaintenanceReportNo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            labelMaintenanceReportNo.Location  = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelMaintenanceReleaseCertificateNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            labelMaintenanceReportNo.Size      = new Size(LABEL_WIDTH, Css.WindowsForm.Constants.DefaultLabelSize.Height);
            labelMaintenanceReportNo.Text      = "Report No:";
            labelMaintenanceReportNo.TextAlign = ContentAlignment.MiddleLeft;
            //
            // textBoxMaintenanceReportNo
            //
            textBoxMaintenanceReportNo.BackColor = Color.White;
            textBoxMaintenanceReportNo.Font      = Css.WindowsForm.Fonts.RegularFont;
            textBoxMaintenanceReportNo.ForeColor = Css.WindowsForm.Colors.ForeColor;
            textBoxMaintenanceReportNo.Location  = new Point(labelMaintenanceReportNo.Right, labelMaintenanceReleaseCertificateNo.Bottom + Css.WindowsForm.Constants.HEIGHT_INTERVAL);
            //
            // labelSeparator2
            //
            labelSeparator2.AutoSize    = false;
            labelSeparator2.Location    = new Point(Css.WindowsForm.Constants.TAB_SEPARATOR_LEFT_MARGIN, labelMaintenanceReportNo.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            labelSeparator2.Height      = 2;
            labelSeparator2.BorderStyle = BorderStyle.Fixed3D;
            //
            // fileControl
            //
            fileControl.Location = new Point(Css.WindowsForm.Constants.TAB_LEFT_MARGIN, labelSeparator2.Bottom + Css.WindowsForm.Constants.SEPARATOR_INTERVAL);
            //
            // buttonOK
            //
            buttonOK.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonOK.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonOK.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonOK.Text      = "OK";
            buttonOK.Click    += buttonOK_Click;
            //
            // buttonApply
            //
            buttonApply.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonApply.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonApply.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonApply.Text      = "Apply";
            buttonApply.Click    += buttonApply_Click;
            //
            // buttonCancel
            //
            buttonCancel.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonCancel.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonCancel.Size      = new Size(Css.WindowsForm.Constants.BUTTON_WIDTH, Css.WindowsForm.Constants.BUTTON_HEIGHT);
            buttonCancel.Text      = "Cancel";
            buttonCancel.Click    += buttonCancel_Click;


            AcceptButton    = buttonOK;
            CancelButton    = buttonCancel;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            MaximizeBox     = false;
            MinimizeBox     = false;
            ClientSize      = Css.WindowsForm.Constants.DefaultFormSize;
            if (mode == ScreenMode.Edit)
            {
                Text = ((Aircraft)currentWorkPackage.Parent).RegistrationNumber + ". " + currentWorkPackage.Title;
            }
            else
            {
                Text = parentAircraft.RegistrationNumber + ". New Work Package";
            }
            StartPosition = FormStartPosition.CenterScreen;
            Controls.Add(tabControl);
            Controls.Add(buttonOK);
            Controls.Add(buttonApply);
            Controls.Add(buttonCancel);
        }