/// <summary>
        /// Initialize a new instance of the KryptonHeaderActionList class.
        /// </summary>
        /// <param name="owner">Designer that owns this action list instance.</param>
        public KryptonHeaderActionList(KryptonHeaderDesigner owner)
            : base(owner.Component)
        {
            // Remember the header instance
            _header = owner.Component as KryptonHeader;

            // Cache service used to notify when a property has changed
            _service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
        }
예제 #2
0
 private void ChangeViewSingle(KryptonHeader view, bool selected)
 {
     if (!selected)
     {
         view.StateNormal.Back.Color1 = System.Drawing.SystemColors.GrayText;
         view.StateNormal.Back.Color2 = System.Drawing.SystemColors.InactiveCaption;
         view.StateNormal.Content.ShortText.Color1 = System.Drawing.SystemColors.GradientInactiveCaption;
         view.StateNormal.Content.ShortText.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     }
     else
     {
         view.StateNormal.Back.Color1 = System.Drawing.SystemColors.InactiveCaptionText;
         view.StateNormal.Back.Color2 = System.Drawing.SystemColors.InactiveCaption;
         view.StateNormal.Content.ShortText.Color1 = System.Drawing.SystemColors.Window;
         view.StateNormal.Content.ShortText.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     }
 }
예제 #3
0
        /**************************************\
         * Display Folder name in the summary *
        \**************************************/
        public void DisplayFolderName(String name)
        {
            this.SummarySplitContainer1.Panel1.Controls.Clear();

            // Display the name of the folder
            KryptonHeader header = new KryptonHeader();
            header.Dock = System.Windows.Forms.DockStyle.Top;
            header.Text = name;
            header.Values.Description = null;
            header.Values.Image = null;

            this.SummarySplitContainer1.Panel1.Controls.Add(header);
        }
예제 #4
0
        /**************************************************************\
         * Display Config Summary                                     *
         *   - The Name of the config (KryptonHeader).                *
         *   - Each process used in the config (KryptonHeaderGroup).  *
        \**************************************************************/
        public void DisplayConfigSummary(String name, List<Process>processList, String warning)
        {
            _ProcessHeaderGroupList.Clear();
            _ProcessHeaderGroupList = new List<KryptonHeaderGroup>();
            this.SummarySplitContainer1.Panel1.Controls.Clear();

            // Display the name of the config
            KryptonHeader header = new KryptonHeader();
            header.Dock = System.Windows.Forms.DockStyle.Top;
            header.Text = name;
            header.Values.Description = null;
            header.Values.Image = null;

            // Display each process
            foreach (Process element in processList)
            {
                KryptonHeaderGroup headerGroup = new KryptonHeaderGroup();
                ButtonSpecHeaderGroup buttonSpecHeaderGroup = new ButtonSpecHeaderGroup();
                headerGroup.Dock = System.Windows.Forms.DockStyle.Top;
                headerGroup.HeaderPositionSecondary = ComponentFactory.Krypton.Toolkit.VisualOrientation.Left;
                headerGroup.ValuesPrimary.Image = null;
                headerGroup.HeaderStylePrimary = ComponentFactory.Krypton.Toolkit.HeaderStyle.Secondary;
                headerGroup.ValuesSecondary.Heading = "Comments";
                headerGroup.Text = element.Get_Name() + " - ID : " + element.Get_OrderId();
                buttonSpecHeaderGroup.Tag = headerGroup;
                headerGroup.ButtonSpecs.AddRange(new ComponentFactory.Krypton.Toolkit.ButtonSpecHeaderGroup[] { buttonSpecHeaderGroup });
                headerGroup.ButtonSpecs[0].Type = ComponentFactory.Krypton.Toolkit.PaletteButtonSpecStyle.RibbonExpand;
                headerGroup.Size = new System.Drawing.Size(150, 23);

                KryptonRichTextBox richTextBox = new KryptonRichTextBox();
                richTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
                richTextBox.ReadOnly = true;
                richTextBox.Text = element.Get_Comment();

                headerGroup.Panel.Controls.Add(richTextBox);
                _ProcessHeaderGroupList.Add(headerGroup);

            }

            _ProcessHeaderGroupList.Reverse();
            foreach(KryptonHeaderGroup element in _ProcessHeaderGroupList)
                this.SummarySplitContainer1.Panel1.Controls.Add(element);

            var tmp = _WarningGroupBox.Panel.Controls.OfType<RichTextBox>();
            foreach (RichTextBox element in tmp)
            {
                element.Text = warning;
                if (!element.Text.Equals(""))
                    this.SummarySplitContainer1.Panel1.Controls.Add(_WarningGroupBox);
            }

            this.SummarySplitContainer1.Panel1.Controls.Add(header);
        }
예제 #5
0
        /**************************************************************\
         * Display Batch Summary                                     *
        \**************************************************************/
        public void DisplayBatchSummary(Batch batch)
        {
            _ProcessHeaderGroupList.Clear();
            _ProcessHeaderGroupList = new List<KryptonHeaderGroup>();
            this.SummarySplitContainer1.Panel1.Controls.Clear();

            // Display the name of the batch
            KryptonHeader header = new KryptonHeader();
            header.Dock = System.Windows.Forms.DockStyle.Top;
            header.Text = "Batch : " + batch.Get_Name();
            header.Values.Description = null;
            header.Values.Image = null;

            // Display all batch elements
            if (batch.Get_BatchElements().Count > 0)
            {
                foreach (KeyValuePair<string, Tuple<string, string, string>> element in batch.Get_BatchElements())
                {
                    KryptonHeaderGroup headerGroup = new KryptonHeaderGroup();
                    ButtonSpecHeaderGroup buttonSpecHeaderGroup = new ButtonSpecHeaderGroup();
                    headerGroup.Dock = System.Windows.Forms.DockStyle.Top;
                    headerGroup.HeaderPositionSecondary = ComponentFactory.Krypton.Toolkit.VisualOrientation.Left;
                    headerGroup.ValuesPrimary.Image = null;
                    headerGroup.HeaderStylePrimary = ComponentFactory.Krypton.Toolkit.HeaderStyle.Secondary;
                    headerGroup.ValuesSecondary.Heading = "Target";
                    headerGroup.Text = element.Value.Item1;
                    buttonSpecHeaderGroup.Tag = headerGroup;
                    headerGroup.ButtonSpecs.AddRange(new ComponentFactory.Krypton.Toolkit.ButtonSpecHeaderGroup[] { buttonSpecHeaderGroup });
                    headerGroup.ButtonSpecs[0].Type = ComponentFactory.Krypton.Toolkit.PaletteButtonSpecStyle.RibbonExpand;
                    headerGroup.Size = new System.Drawing.Size(150, 23);

                    KryptonRichTextBox richTextBox = new KryptonRichTextBox();
                    richTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
                    richTextBox.ReadOnly = true;
                    richTextBox.Text = element.Key + "\n\n FTP : " + element.Value.Item3;

                    headerGroup.Panel.Controls.Add(richTextBox);
                    _ProcessHeaderGroupList.Add(headerGroup);
                }
            }

            else if (batch.Get_BatchElementsMulti().Count > 0)
            {
                foreach (KeyValuePair<Tuple<string, string>, List<Tuple<string, string>>> element in batch.Get_BatchElementsMulti())
                {
                    KryptonHeaderGroup headerGroup = new KryptonHeaderGroup();
                    ButtonSpecHeaderGroup buttonSpecHeaderGroup = new ButtonSpecHeaderGroup();
                    headerGroup.Dock = System.Windows.Forms.DockStyle.Top;
                    headerGroup.HeaderPositionSecondary = ComponentFactory.Krypton.Toolkit.VisualOrientation.Left;
                    headerGroup.ValuesPrimary.Image = null;
                    headerGroup.HeaderStylePrimary = ComponentFactory.Krypton.Toolkit.HeaderStyle.Secondary;
                    headerGroup.ValuesSecondary.Heading = "Target";
                    headerGroup.Text = element.Value[0].Item1;
                    buttonSpecHeaderGroup.Tag = headerGroup;
                    headerGroup.ButtonSpecs.AddRange(new ComponentFactory.Krypton.Toolkit.ButtonSpecHeaderGroup[] { buttonSpecHeaderGroup });
                    headerGroup.ButtonSpecs[0].Type = ComponentFactory.Krypton.Toolkit.PaletteButtonSpecStyle.RibbonExpand;
                    headerGroup.Size = new System.Drawing.Size(150, 23);

                    KryptonRichTextBox richTextBox = new KryptonRichTextBox();
                    richTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
                    richTextBox.ReadOnly = true;
                    richTextBox.AppendText( "FTP : " + element.Key.Item2 + "\n\n");
                    richTextBox.AppendText("Target path : " + element.Key.Item1 + "\n\n");
                    richTextBox.AppendText("Configs :\n");

                    foreach (Tuple<string, string> config in element.Value)
                        richTextBox.AppendText(config.Item1 + "\n");

                    headerGroup.Panel.Controls.Add(richTextBox);
                    _ProcessHeaderGroupList.Add(headerGroup);
                }
            }

            _ProcessHeaderGroupList.Reverse();
            foreach (KryptonHeaderGroup element in _ProcessHeaderGroupList)
                this.SummarySplitContainer1.Panel1.Controls.Add(element);

            this.SummarySplitContainer1.Panel1.Controls.Add(header);
        }
예제 #6
0
 public KryptonHeaderProxy(KryptonHeader header)
 {
     _header = header;
 }
        /// <summary>
        /// Initializes the designer with the specified component.
        /// </summary>
        /// <param name="component">The IComponent to associate the designer with.</param>
        public override void Initialize(IComponent component)
        {
            // Let base class do standard stuff
            base.Initialize(component);

            // The resizing handles around the control need to change depending on the
            // value of the AutoSize and AutoSizeMode properties. When in AutoSize you
            // do not get the resizing handles, otherwise you do.
            AutoResizeHandles = true;

            // Cast to correct type
            _header = component as KryptonHeader;

            if (_header != null)
            {
                // Hook into header event
                _header.GetViewManager().MouseUpProcessed += new MouseEventHandler(OnHeaderMouseUp);
                _header.GetViewManager().DoubleClickProcessed += new PointHandler(OnHeaderDoubleClick);
            }

            // Get access to the design services
            _designerHost = (IDesignerHost)GetService(typeof(IDesignerHost));
            _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
            _selectionService = (ISelectionService)GetService(typeof(ISelectionService));

            // We need to know when we are being removed
            _changeService.ComponentRemoving += new ComponentEventHandler(OnComponentRemoving);
        }
예제 #8
0
 /// <summary>
 /// Initialize a new instance of the HeaderButtonSpecCollection class.
 /// </summary>
 /// <param name="owner">Reference to owning object.</param>
 public HeaderButtonSpecCollection(KryptonHeader owner)
     : base(owner)
 {
 }
예제 #9
0
 public KryptonHeaderProxy(KryptonHeader header) => _header = header;