Esempio n. 1
0
 private void InitListView()
 {
     _directivesViewer          = new ComponentChangeListView();
     _directivesViewer.TabIndex = 2;
     _directivesViewer.Location = new Point(panel1.Left, panel1.Top);
     _directivesViewer.Dock     = DockStyle.Fill;
     Controls.Add(_directivesViewer);
     panel1.Controls.Add(_directivesViewer);
 }
Esempio n. 2
0
/*        #region public Statuses Status
 *
 *      /// <summary>
 *      /// Возвращает или устанавливает статус
 *      /// </summary>
 *      public Statuses Status
 *      {
 *          get { return statusImageLinkLabel1.Status; }
 *          set { statusImageLinkLabel1.Status = value; }
 *      }
 *
 #endregion
 *
 #region public string StatusText
 *
 *      /// <summary>
 *      /// Возвращает или устанавливает текст статуса
 *      /// </summary>
 *      public string StatusText
 *      {
 *          get { return statusImageLinkLabel1.Text; }
 *          set { statusImageLinkLabel1.Text = value; }
 *      }
 *
 #endregion*/



/*        #region public Aircraft Aircraft
 *
 *      /// <summary>
 *      /// Текущее ВС
 *      /// </summary>
 *      public Aircraft Aircraft
 *      {
 *          get { return currentAircraft; }
 *          set
 *          {
 *              currentAircraft = value;
 *              UpdateInformation();
 *          }
 *      }
 *
 #endregion*/

        #endregion

        #region Methods

        #region private void InitializeComponent()

        private void InitializeComponent()
        {
            panelTopContainer      = new Panel();
            footerControl1         = new FooterControl();
            headerControl          = new HeaderControl();
            aircraftHeaderControl  = new AircraftHeaderControl(currentAircraft, true, true);
            statusImageLinkLabel1  = new StatusImageLinkLabel();
            labelDateFrom          = new Label();
            dateTimePickerDateFrom = new DateTimePicker();
            labelDateTo            = new Label();
            dateTimePickerDateTo   = new DateTimePicker();
            buttonOK = new Button();
            componentChangeViewer = new ComponentChangeListView(currentAircraft);

            #region Context menu

            contextMenuStrip            = new ContextMenuStrip();
            toolStripMenuItemCopy       = new ToolStripMenuItem();
            toolStripMenuItemPaste      = new ToolStripMenuItem();
            toolStripMenuItemDelete     = new ToolStripMenuItem();
            toolStripSeparator1         = new ToolStripSeparator();
            toolStripMenuItemHighlight  = new ToolStripMenuItem();
            toolStripSeparator2         = new ToolStripSeparator();
            toolStripMenuItemProperties = new ToolStripMenuItem();

            /*//
             * // toolStripMenuItemCopy
             * //
             * toolStripMenuItemCopy.Text = "Copy (Ctrl+C)";
             * toolStripMenuItemCopy.Click += toolStripMenuItemCopy_Click;
             * toolStripMenuItemCopy.Enabled = false;
             * //
             * // toolStripMenuItemPaste
             * //
             * toolStripMenuItemPaste.Text = "Paste (Ctrl+V)";
             * toolStripMenuItemPaste.Click += toolStripMenuItemPaste_Click;
             * toolStripMenuItemPaste.Enabled = false;
             * //
             * // toolStripMenuItemDelete
             * //
             * toolStripMenuItemDelete.Text = "Delete";
             * toolStripMenuItemDelete.Click += toolStripMenuItemDelete_Click;
             * //
             * // toolStripMenuItemHighlight
             * //
             * toolStripMenuItemHighlight.Text = "Highlight";*/
            //
            // toolStripMenuItemProperties
            //
            toolStripMenuItemProperties.Text   = "Properties";
            toolStripMenuItemProperties.Click += toolStripMenuItemProperties_Click;

            #endregion

            //
            // panelTopContainer
            //
            panelTopContainer.AutoSize     = true;
            panelTopContainer.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            panelTopContainer.BackColor    = Color.FromArgb(211, 211, 211);
            panelTopContainer.Controls.Add(statusImageLinkLabel1);
            panelTopContainer.Controls.Add(labelDateFrom);
            panelTopContainer.Controls.Add(dateTimePickerDateFrom);
            panelTopContainer.Controls.Add(labelDateTo);
            panelTopContainer.Controls.Add(dateTimePickerDateTo);
            panelTopContainer.Controls.Add(buttonOK);
            panelTopContainer.Dock     = DockStyle.Top;
            panelTopContainer.Location = new Point(0, 0);
            panelTopContainer.Name     = "panelTopContainer";
            panelTopContainer.Size     = new Size(1042, 62);
            panelTopContainer.TabIndex = 14;
            //
            // footerControl1
            //
            footerControl1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            footerControl1.BackColor    = Color.Transparent;
            footerControl1.Dock         = DockStyle.Bottom;
            footerControl1.Location     = new Point(0, 568);
            footerControl1.Margin       = new Padding(0);
            footerControl1.MaximumSize  = new Size(0, 48);
            footerControl1.MinimumSize  = new Size(0, 48);
            footerControl1.Name         = "footerControl1";
            footerControl1.Size         = new Size(1042, 48);
            footerControl1.TabIndex     = 10;
            //
            // headerControl
            //
            headerControl.ActionControlSplitterVisible         = true;
            headerControl.ContextActionControl.ShowPrintButton = true;
            headerControl.BackColor       = Color.Transparent;
            headerControl.BackgroundImage = Resources.HeaderBar;
            headerControl.Controls.Add(aircraftHeaderControl);
            headerControl.Dock = DockStyle.Top;
            headerControl.EditDisplayerText            = "Component Status Operator";
            headerControl.EditReflectionType           = ReflectionTypes.DisplayInNew;
            headerControl.ActionControl.ShowEditButton = false;
            headerControl.Location = new Point(0, 0);
            headerControl.Name     = "headerControl";
            headerControl.Size     = new Size(1042, 58);
            headerControl.TabIndex = 6;
            headerControl.ContextActionControl.ButtonPrint.DisplayerRequested += PrintButton_DisplayerRequested;
            headerControl.ReloadRised += headerControl1_ReloadRised;
            headerControl.ContextActionControl.ButtonHelp.TopicID = "component-status.html";
            //
            // statusImageLinkLabel1
            //
            statusImageLinkLabel1.LinkColor = Color.DimGray;
            statusImageLinkLabel1.Location  = new Point(30, 3);
            statusImageLinkLabel1.Size      = new Size(412, 27);
            statusImageLinkLabel1.Status    = Statuses.Satisfactory;
            statusImageLinkLabel1.TabIndex  = 16;
            statusImageLinkLabel1.TextAlign = ContentAlignment.MiddleLeft;
            statusImageLinkLabel1.TextFont  = Css.HeaderLinkLabel.Fonts.Font;
            //
            // labelDateFrom
            //
            labelDateFrom.AutoSize  = true;
            labelDateFrom.Font      = Css.OrdinaryText.Fonts.SmallRegularFont;
            labelDateFrom.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelDateFrom.Location  = new Point(32, 35);
            labelDateFrom.Text      = "From";
            //
            // dateTimePickerDateFrom
            //
            dateTimePickerDateFrom.Font         = Css.WindowsForm.Fonts.RegularFont;
            dateTimePickerDateFrom.ForeColor    = Css.WindowsForm.Colors.ForeColor;
            dateTimePickerDateFrom.BackColor    = Color.White;
            dateTimePickerDateFrom.Location     = new Point(80, 32);
            dateTimePickerDateFrom.Width        = 100;
            dateTimePickerDateFrom.Format       = DateTimePickerFormat.Custom;
            dateTimePickerDateFrom.CustomFormat = new TermsProvider()["DateFormat"].ToString();
            if (DateTime.Now.Month == 1)
            {
                dateTimePickerDateFrom.Value = new DateTime(DateTime.Now.Year - 1, 12, 1);
            }
            else
            {
                dateTimePickerDateFrom.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, 1);
            }
            //
            // labelDateTo
            //
            labelDateTo.AutoSize  = true;
            labelDateTo.Font      = Css.OrdinaryText.Fonts.SmallRegularFont;
            labelDateTo.ForeColor = Css.OrdinaryText.Colors.ForeColor;
            labelDateTo.Location  = new Point(190, 35);
            labelDateTo.Text      = "to";
            //
            // dateTimePickerDateTo
            //
            dateTimePickerDateTo.Font         = Css.WindowsForm.Fonts.RegularFont;
            dateTimePickerDateTo.ForeColor    = Css.WindowsForm.Colors.ForeColor;
            dateTimePickerDateTo.BackColor    = Color.White;
            dateTimePickerDateTo.Location     = new Point(220, 32);
            dateTimePickerDateTo.Width        = 100;
            dateTimePickerDateTo.Format       = DateTimePickerFormat.Custom;
            dateTimePickerDateTo.CustomFormat = new TermsProvider()["DateFormat"].ToString();
            //
            // buttonOK
            //
            buttonOK.UseVisualStyleBackColor = true;
            buttonOK.Font      = Css.WindowsForm.Fonts.RegularFont;
            buttonOK.ForeColor = Css.WindowsForm.Colors.ForeColor;
            buttonOK.Location  = new Point(340, 30);
            buttonOK.Width     = 70;
            buttonOK.Text      = "OK";
            buttonOK.Click    += buttonOK_Click;
            //
            // monthlyUtilizationViewer
            //
            componentChangeViewer.ContextMenuStrip      = contextMenuStrip;
            componentChangeViewer.Location              = new Point(panelTopContainer.Left, panelTopContainer.Bottom);
            componentChangeViewer.Size                  = new Size(Width, Height - headerControl.Height - footerControl1.Height - panelTopContainer.Height);
            componentChangeViewer.SelectedItemsChanged += componentChangeViewer_SelectedItemsChanged;
            componentChangeViewer.ItemsPasted          += componentChangeViewer_ItemsPasted;
            componentChangeViewer.ItemsDeleted         += buttonDeleteSelected_Click;
            //
            // ComponentStatusControl
            //
            BackColor = Color.FromArgb(241, 241, 241);
            Controls.Add(footerControl1);
            Controls.Add(panelTopContainer);
            Controls.Add(componentChangeViewer);
            Controls.Add(headerControl);
            Size = new Size(1042, 616);
        }