KryptonHeaderGroup specific implementation of a button specification.
Inheritance: ButtonSpecAny
Exemplo n.º 1
0
        /// <summary>
        /// Value copy form the provided source to ourself.
        /// </summary>
        /// <param name="source">Source instance.</param>
        public void CopyFrom(ButtonSpecHeaderGroup source)
        {
            // Copy class specific values
            HeaderLocation = source.HeaderLocation;

            // Let base class copy the base values
            base.CopyFrom(source);
        }
Exemplo n.º 2
0
        private void kryptonButtonAdd_Click(object sender, EventArgs e)
        {
            // Create a new button spec entry
            ButtonSpecHeaderGroup spec = new ButtonSpecHeaderGroup();
            spec.Type = PaletteButtonSpecStyle.Close;

            // Need to know when button is selected
            spec.Click += new EventHandler(OnButtonSelected);

            // Add to end of the collection of button specs
            kryptonHeaderGroup1.ButtonSpecs.Add(spec);

            // Make it the selected button spec
            propertyGrid.SelectedObject = spec;

            UpdateActionButtons();
        }
        /// <summary>
        /// Value copy form the provided source to ourself.
        /// </summary>
        /// <param name="source">Source instance.</param>
        public void CopyFrom(ButtonSpecHeaderGroup source)
        {
            // Copy class specific values
            HeaderLocation = source.HeaderLocation;

            // Let base class copy the base values
            base.CopyFrom(source);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
 public void CopyFrom(ButtonSpecHeaderGroup source)
 {
     this.HeaderLocation = source.HeaderLocation;
     base.CopyFrom(source);
 }