public GraduationPlanSelector()
        {
            InitializeComponent();
            this.cardPanelEx1.SuspendLayout();
            int count = 0;

            foreach (GraduationPlanInfo info in SmartSchool.Evaluation.GraduationPlan.GraduationPlan.Instance.Items)
            {
                count++;
                DevComponents.DotNetBar.ButtonX item = new DevComponents.DotNetBar.ButtonX();
                item.Text          = (info.Name.Length > 10?info.Name.Substring(0, 10) + "...":info.Name);
                item.Tooltip       = info.Name;
                item.Tag           = info;
                item.TextAlignment = eButtonTextAlignment.Left;
                item.ColorTable    = eButtonColor.OrangeWithBackground;
                item.Size          = new Size(cardPanelEx1.CardWidth, 23);
                item.Click        += new EventHandler(item_Click);
                item.MouseHover   += new EventHandler(SetFocus);
                cardPanelEx1.Controls.Add(item);
            }
            if (count <= 13)
            {
                this.Size = new Size(155, 27 * count + 4);
            }
            else
            {
                if (count <= 26)
                {
                    this.Size = new Size(314, 27 * ((count + 1) / 2) + 4);
                }
            }
            this.cardPanelEx1.ResumeLayout();
        }
Ejemplo n.º 2
0
		public void LoadButtons()
		{
			int leftPosition = 10;
			int topPosition = 10;

			pnButtonContainer.Controls.Clear();
			FileInfo[] sourceFiles = (new DirectoryInfo(Path.Combine(Application.StartupPath, UsersSourceFolderName))).GetFiles(UsersSourceFileTemplate);
			laTotalUserLists.Text = String.Format(laTotalUserLists.Text, sourceFiles.Length);
			foreach (FileInfo sourceFile in sourceFiles)
			{
				var button = new ButtonX();
				button.ColorTable = eButtonColor.OrangeWithBackground;
				button.Text = sourceFile.Name.Replace(sourceFile.Extension, "").Replace("UL-", "");
				button.TextColor = Color.Black;
				button.Tag = sourceFile;
				button.Click += buttonXUsers_Click;
				button.Height = 80;
				button.Width = 160;
				button.Style = eDotNetBarStyle.StyleManagerControlled;

				button.Left = leftPosition;
				button.Top = topPosition;

				if ((leftPosition + 180 + 160) > pnButtonContainer.Width)
				{
					leftPosition = 10;
					topPosition += 100;
				}
				else
				{
					leftPosition += 180;
				}
				pnButtonContainer.Controls.Add(button);
			}
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Appends the add in button.
 /// </summary>
 /// <param name="PlugInButton">The plug in button.</param>
 private void AppendAddInButton(ButtonX PlugInButton)
 {
     if (this.InvokeRequired) {
         this.BeginInvoke(new AppendAddInButtonDelegate(AppendAddInButton), PlugInButton);
         return;
     }
     this.PanelAddIn.Controls.Add(PlugInButton);
 }
Ejemplo n.º 4
0
        private List <Control> CreateFilterControl()
        {
            List <Control> clist = new List <Control>();

            foreach (E_VIDEO_ANALYZE_TYPE item in Enum.GetValues(typeof(E_VIDEO_ANALYZE_TYPE)))
            {
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_NOUSE)
                {
                    continue;
                }
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_MOVEOBJ)
                {
                    continue;
                }
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_VEHICLE)
                {
                    continue;
                }
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_SPECIAL_EFFECT_WIPEOFF_FOG)
                {
                    continue;
                }
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_IMAGE_SEARCH)
                {
                    continue;
                }
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_ACCIDENT_ALARM)
                {
                    continue;
                }
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_BRIEAF)
                {
                    continue;
                }
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_DYNAMIC_VEHICLE)
                {
                    continue;
                }
                if (item == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_FACE)
                {
                    continue;
                }

                DevComponents.DotNetBar.ButtonX b = new DevComponents.DotNetBar.ButtonX();
                b.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
                b.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
                b.Name           = "btnSelectAnalyseType_" + item.ToString();
                b.Size           = new System.Drawing.Size(75, 23);
                b.Style          = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
                b.Click         += new System.EventHandler(this.btnSetAnalyseType_Click);
                b.Text           = DataModel.Constant.VideoAnalyzeTypeInfo.Single(it => it.Type == item).Name;
                b.Tag            = item;
                clist.Add(b);
            }
            return(clist);
        }
 private void InitializeComponent()
 {
     this.lbMessage = new LabelX();
     this.btnOK = new ButtonX();
     this.lkMail = new System.Windows.Forms.LinkLabel();
     base.SuspendLayout();
     this.lbMessage.BackColor = System.Drawing.Color.Transparent;
     this.lbMessage.BackgroundStyle.CornerType = eCornerType.Square;
     this.lbMessage.Font = new System.Drawing.Font("SimSun", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
     this.lbMessage.ForeColor = System.Drawing.Color.Black;
     this.lbMessage.Location = new System.Drawing.Point(12, 22);
     this.lbMessage.Name = "lbMessage";
     this.lbMessage.Size = new System.Drawing.Size(371, 133);
     this.lbMessage.TabIndex = 0;
     this.lbMessage.Text = "<div>杭州预约挂号辅助软件</div><div> </div><div>软件版本: V1.1.0</div><div></div><div>版权所有:Copyright© 2015 日行一米</div><div></div><div></div><div> </div><div>本软件是免费软件,使用过程中如果什么问题,请发送</div><div>内容到以下邮箱</div>";
     this.lbMessage.TextLineAlignment = System.Drawing.StringAlignment.Near;
     this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.btnOK.ColorTable = eButtonColor.OrangeWithBackground;
     this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.btnOK.Location = new System.Drawing.Point(162, 186);
     this.btnOK.Name = "btnOK";
     this.btnOK.Size = new System.Drawing.Size(75, 23);
     this.btnOK.Style = eDotNetBarStyle.StyleManagerControlled;
     this.btnOK.TabIndex = 1;
     this.btnOK.Text = "确定";
     this.lkMail.AccessibleRole = System.Windows.Forms.AccessibleRole.Document;
     this.lkMail.AutoSize = true;
     this.lkMail.BackColor = System.Drawing.Color.FromArgb(254, 254, 254);
     this.lkMail.Font = new System.Drawing.Font("SimSun", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
     this.lkMail.ForeColor = System.Drawing.Color.Black;
     this.lkMail.LinkColor = System.Drawing.Color.IndianRed;
     this.lkMail.Location = new System.Drawing.Point(98, 157);
     this.lkMail.Name = "lkMail";
     this.lkMail.Size = new System.Drawing.Size(200, 16);
     this.lkMail.TabIndex = 2;
     this.lkMail.TabStop = true;
     this.lkMail.Text = "*****@*****.**";
     this.lkMail.Click += new System.EventHandler(this.lkMail_Click);
     base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
     base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     base.ClientSize = new System.Drawing.Size(395, 217);
     base.Controls.Add(this.lkMail);
     base.Controls.Add(this.btnOK);
     base.Controls.Add(this.lbMessage);
     this.DoubleBuffered = true;
     base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     base.MaximizeBox = false;
     base.MinimizeBox = false;
     base.Name = "AboutForm";
     base.ShowIcon = false;
     base.ShowInTaskbar = false;
     base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text = "关于";
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Ejemplo n.º 6
0
 private void btnSetAnalyseType_Click(object sender, EventArgs e)
 {
     DevComponents.DotNetBar.ButtonX b = sender as DevComponents.DotNetBar.ButtonX;
     if (b != null && b.Tag is E_VIDEO_ANALYZE_TYPE)
     {
         E_VIDEO_ANALYZE_TYPE item = (E_VIDEO_ANALYZE_TYPE)b.Tag;
         SetSetAnalyseTypeBtnCheck(item);
         GetAnalyseSettingPanel(item);
     }
 }
Ejemplo n.º 7
0
 public void showchoosedtags()
 {
     int i;
     for (i = 0; i < Gib.choosedtagn; ++i)
     {
         ButtonX ctab = new ButtonX();
         ctab.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
         ctab.FocusCuesEnabled = false;
         ctab.Font = new Font("Consolas", 9F);
         ctab.Size = new Size(9 * getlen(Gib.choosedtags[i]) + 10, 27);
         ctab.Text = Gib.choosedtags[i];
         this.tagchoosed.Controls.Add(ctab);
     }
 }
Ejemplo n.º 8
0
        private void OnBtnSplitClick(object sender, EventArgs e)
        {
            // Get Offset and checked RadioButton
            DevComponents.DotNetBar.ButtonX rbtn = (DevComponents.DotNetBar.ButtonX)sender;
            String rbtnName = rbtn.Name;
            char chEndNum = rbtnName[rbtnName.Length - 1];
            Int32 nOffset = Convert.ToInt32(chEndNum.ToString()) - 1;
            if (nOffset < 0 || nOffset >= m_naTeamSplitIDs.Count) return;

            m_rbtnCurChkedSplit = rbtn;
            m_nCurSplitOffset = nOffset;

            ChangeTeamSplit(nOffset);
        }
Ejemplo n.º 9
0
 private void SetSetAnalyseTypeBtnCheck(E_VIDEO_ANALYZE_TYPE analyzeType)
 {
     foreach (var item in flowLayoutPanel1.Controls)
     {
         DevComponents.DotNetBar.ButtonX b = item as DevComponents.DotNetBar.ButtonX;
         if ((E_VIDEO_ANALYZE_TYPE)b.Tag == analyzeType)
         {
             b.Checked = true;
         }
         else
         {
             b.Checked = false;
         }
     }
 }
Ejemplo n.º 10
0
        private void FrmPtxt_Load(object sender, EventArgs e)
        {
            this.Left = Gib.mx;
            this.Top = Gib.my;

            //MessageBox.Show("Test");

            this.layoutmain.BackColor = Color.LightYellow;

            int i, x = -1;
            for (i = 0; i < Gib.ts[Gib.nowsysi].ftagn; ++i)
                if (Gib.ppath == Gib.ts[Gib.nowsysi].ftagpath[i])
                {
                    x = i;
                    break;
                }
            if (x > -1)
                for (i = 0; i < Gib.ts[Gib.nowsysi].ftags[x]; ++i)
                    if (Gib.ts[Gib.nowsysi].ftagname[x, i] != "")
                    {
                        ButtonX tagbutton = new ButtonX();
                        tagbutton.Font = new Font("Consolas", 8F);
                        tagbutton.Location = new Point(3, 3);
                        tagbutton.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
                        tagbutton.Size = new Size(8*getlen(Gib.ts[Gib.nowsysi].ftagname[x, i]) + 10, 25);
                        tagbutton.Style = DevComponents.DotNetBar.eDotNetBarStyle.Metro;
                        tagbutton.FocusCuesEnabled = false;
                        tagbutton.Text = Gib.ts[Gib.nowsysi].ftagname[x, i];
                        layoutmain.Controls.Add(tagbutton);
                    }
            /*
            if (Gib.plast == ".lrc" || Gib.plast == ".LRC")
            {
                StreamReader fileread = new StreamReader(Gib.ppath);
                textprev.Text = fileread.ReadToEnd();
                fileread.Close();
            }
            else if (Gib.plast == ".txt" || Gib.plast == ".TXT")
            {
                StreamReader fileread = new StreamReader(Gib.ppath, Encoding.GetEncoding("GB2312"));
                textprev.Text = fileread.ReadToEnd();
                fileread.Close();
            }
            */
        }
Ejemplo n.º 11
0
 private void FrmTagPageMan_Load(object sender, EventArgs e)
 {
     this.mainlayout.BackColor = Color.White;
     for (int i = 0; i < Gib.ts[Gib.nowsysi].pagen; ++i)
     {
         ButtonX pageb = new ButtonX();
         pageb.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
         pageb.Size = new Size(9 * getlen(Gib.ts[Gib.nowsysi].allpage[i]) + 10, 27);
         pageb.Style = DevComponents.DotNetBar.eDotNetBarStyle.Metro;
         pageb.Font = new Font("Consolas", 9F);
         pageb.FocusCuesEnabled = false;
         pageb.Text = Gib.ts[Gib.nowsysi].allpage[i];
         pageb.Tag = i;
         pageb.CheckedChanged += new System.EventHandler(pageb_CheckedChanged);
         pageb.MouseDown += new System.Windows.Forms.MouseEventHandler(pageb_MouseDown);
         pageb.ContextMenuStrip = rbmenu;
         this.mainlayout.Controls.Add(pageb);
     }
 }
Ejemplo n.º 12
0
        public ButtonX[] GetButtons()
        {
            ButtonX[] btns;
            if (0 >= m_Buttons.Count)
            {
                btns = null;
            }
            else
            {
                btns = new ButtonX[m_Buttons.Count];
                int i = 0;
                for (; i < m_Buttons.Count; i++)
                {
                    btns[i] = (ButtonX)m_Buttons[i];
                }
            } // end of else

            return btns;
        }
Ejemplo n.º 13
0
 public EmailBox(string sBtnText, int iSize, string sCheckCondition, string sURL)
 {
     cp         = new DevComponents.DotNetBar.Controls.CircularProgress();
     btn        = new ButtonX();
     sLink      = sURL;
     sCondition = sCheckCondition;
     //btn.UseVisualStyleBackColor = true;
     btn.Anchor         = (AnchorStyles.Right | AnchorStyles.Top);
     btn.Text           = sBtnText;
     btn.Width          = iSize;
     btn.Click         += new EventHandler(btn_Click);
     cp.Width           = 15;
     cp.Height          = 15;
     cp.BackColor       = Color.Transparent;
     this.ForeColor     = Color.Red;
     btn.Location       = new Point(this.Left - 7, this.Top);
     btn.Visible        = true;
     btn.Parent         = this.Parent;
     cp.ProgressBarType = DevComponents.DotNetBar.eCircularProgressType.Dot;
 }
Ejemplo n.º 14
0
        public void AddElement(string value, DADataManager.ExportModels.ElementType type, bool update=true)
        {
            var locX = GetNextLocation();

            var element = new ButtonX
            {
                Text = value,
                Size = new Size(GetStringWidth(value), 23),
                Location = new Point(locX, 1),
                Parent = ui_panelEx_formula,
                ContextMenuStrip = contextMenuStrip_element,
                Tag = type
            };
            element.Click += Element_Click;
            element.MouseDown += Element_MouseDown;

            ui_panelEx_formula.Controls.Add(element);
                SetCurrentElement(element, update);
            ShiftElements(_currentElement, GetStringWidth(value) + 1);

            if (type == ElementType.Equal)
            {
                element.ContextMenuStrip = contextMenuStrip_equal;
            }

            var listCnt = (from object control in ui_panelEx_formula.Controls select (control as ButtonX)).Cast<Control>().ToList().OrderBy(x => x.Location.X).ToList();

            _elements.Clear();
            for (var i = 0; i < listCnt.Count; i++)
            {
                listCnt[i].TabIndex = i;
                _elements.Add(new ElementStructure{Type = (ElementType)listCnt[i].Tag, Value = listCnt[i].Text});
            }

               // _elements.Add(new ElementStructure{Type = type, Value = value});
            if (update)
            {
                ui_labelX_arrow.Visible = true;
                OnFormulaChanged();
            }
        }
		private void Init()
		{
			ListBox = new CheckedListBoxControl();
			ListBox.Appearance.Font = new Font("Arial", 9.75F, FontStyle.Regular);
			ListBox.Appearance.Options.UseFont = true;
			ListBox.CheckOnClick = true;
			ListBox.ItemHeight = 30;
			ListBox.SelectionMode = SelectionMode.None;
			ListBox.Dock = DockStyle.Fill;
			ListBox.Items.AddRange(DataSource.Tags.Select(t => new CheckedListBoxItem(t, t.Name, false)).ToArray());

			ToggleButton = new ButtonX();
			ToggleButton.AccessibleRole = AccessibleRole.PushButton;
			ToggleButton.ColorTable = eButtonColor.OrangeWithBackground;
			ToggleButton.Size = new Size(250, 30);
			ToggleButton.Style = eDotNetBarStyle.StyleManagerControlled;
			ToggleButton.Text = DataSource.Description.Replace("&", "&&");
			ToggleButton.TextColor = Color.Black;
			ToggleButton.TextAlignment = eButtonTextAlignment.Left;
			ToggleButton.Tag = ListBox;
		}
Ejemplo n.º 16
0
 private void FrmTagSystem_Load(object sender, EventArgs e)
 {
     this.mainlayout.BackColor = Color.White;
     for (int i = 0; i < Gib.tsn; ++i)
     {
         ButtonX sys = new ButtonX();
         sys.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
         sys.Size = new Size(9*getlen(Gib.ts[i].name) + 10, 27);
         sys.Style = DevComponents.DotNetBar.eDotNetBarStyle.Metro;
         sys.Font = new Font("Consolas", 9F);
         sys.FocusCuesEnabled = false;
         sys.Tag = i;
         sys.Text = Gib.ts[i].name;
         sys.CheckedChanged += new System.EventHandler(sys_CheckedChanged);
         if (i == Gib.nowsysi)
             sys.Checked = true;
         if (i == Gib.defsysi)
             sys.Font = new Font("Consolas", 9F, FontStyle.Bold);
         sys.MouseDown += new System.Windows.Forms.MouseEventHandler(sys_MouseDown);
         this.mainlayout.Controls.Add(sys);
     }
 }
Ejemplo n.º 17
0
        void InitVariant()
        {
            SQCommon.g_ManageDB.InitGame();

            m_nCurMatchType   = -1;
            m_nAdvantage      = -1;
            m_nCurStatusID    = -1;
            m_nCurSetID       = -1;
            m_nCurTeamSplitID = -1;
            m_nSetsCount      = -1;
            m_nTeamSplitCount = -1;
            m_nCurPlayIDA     = -1;
            m_nCurPlayIDB     = -1;
            m_nRegIDA         = -1;
            m_nRegIDB         = -1;
            m_nRegAPos        = -1;
            m_nRegBPos        = -1;

            m_rbtnCurChkedSet   = null;
            m_rbtnCurChkedSplit = null;
            m_nCurSetOffset     = -1;
            m_nCurSplitOffset   = -1;
        }
		public void InitControls(IEnumerable<Quarter> quarters, Quarter selectedQuarter)
		{
			SelectedQuarter = selectedQuarter;
			Controls.Clear();
			_quarterButtons.Clear();
			foreach (var quarter in quarters)
			{
				var button = new ButtonX
				{
					ColorTable = eButtonColor.OrangeWithBackground,
					Style = eDotNetBarStyle.StyleManagerControlled,
					Text = quarter.ToString(),
					Cursor = Cursors.Hand,
					Tag = quarter,
					Checked = quarter == SelectedQuarter,
					Height = ButtonHeight,
					Width = ButtonWidth
				};
				button.Click += OnQuarterClick;
				_quarterButtons.Add(button);
				Controls.Add(button);
			}
			ResizeButtons();
		}
Ejemplo n.º 19
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.panelEx1        = new DevComponents.DotNetBar.PanelEx();
     this.chartTypes      = new DevComponents.DotNetBar.ItemPanel();
     this.buttonItem1     = new DevComponents.DotNetBar.ButtonItem();
     this.columnSelector  = new DevComponents.DotNetBar.ButtonItem();
     this.lineSelector    = new DevComponents.DotNetBar.ButtonItem();
     this.pieSelector     = new DevComponents.DotNetBar.ButtonItem();
     this.barSelector     = new DevComponents.DotNetBar.ButtonItem();
     this.areaSelector    = new DevComponents.DotNetBar.ButtonItem();
     this.xySelector      = new DevComponents.DotNetBar.ButtonItem();
     this.stockSelector   = new DevComponents.DotNetBar.ButtonItem();
     this.buttonX1        = new DevComponents.DotNetBar.ButtonX();
     this.buttonX2        = new DevComponents.DotNetBar.ButtonX();
     this.itemPanel2      = new DevComponents.DotNetBar.ItemPanel();
     this.labelItem1      = new DevComponents.DotNetBar.LabelItem();
     this.columnContainer = new DevComponents.DotNetBar.ItemContainer();
     this.buttonItem12    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem13    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem14    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem15    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem16    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem17    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem18    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem19    = new DevComponents.DotNetBar.ButtonItem();
     this.labelItem2      = new DevComponents.DotNetBar.LabelItem();
     this.lineContainer   = new DevComponents.DotNetBar.ItemContainer();
     this.buttonItem20    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem21    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem22    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem23    = new DevComponents.DotNetBar.ButtonItem();
     this.labelItem3      = new DevComponents.DotNetBar.LabelItem();
     this.pieContainer    = new DevComponents.DotNetBar.ItemContainer();
     this.buttonItem9     = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem10    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem11    = new DevComponents.DotNetBar.ButtonItem();
     this.labelItem4      = new DevComponents.DotNetBar.LabelItem();
     this.barContainer    = new DevComponents.DotNetBar.ItemContainer();
     this.buttonItem24    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem25    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem26    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem27    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem28    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem29    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem30    = new DevComponents.DotNetBar.ButtonItem();
     this.labelItem5      = new DevComponents.DotNetBar.LabelItem();
     this.areaContainer   = new DevComponents.DotNetBar.ItemContainer();
     this.buttonItem31    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem32    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem33    = new DevComponents.DotNetBar.ButtonItem();
     this.SuspendLayout();
     //
     // panelEx1
     //
     this.panelEx1.CanvasColor                     = System.Drawing.SystemColors.Control;
     this.panelEx1.Dock                            = System.Windows.Forms.DockStyle.Top;
     this.panelEx1.Font                            = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.panelEx1.Location                        = new System.Drawing.Point(0, 0);
     this.panelEx1.Name                            = "panelEx1";
     this.panelEx1.Size                            = new System.Drawing.Size(562, 32);
     this.panelEx1.Style.BackColor1.Color          = System.Drawing.Color.FromArgb(((System.Byte)(95)), ((System.Byte)(136)), ((System.Byte)(215)));
     this.panelEx1.Style.BackColor2.Color          = System.Drawing.Color.FromArgb(((System.Byte)(67)), ((System.Byte)(108)), ((System.Byte)(191)));
     this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
     this.panelEx1.Style.GradientAngle             = 90;
     this.panelEx1.Style.MarginLeft                = 8;
     this.panelEx1.TabIndex                        = 0;
     this.panelEx1.Text                            = "Choose a Chart Type";
     //
     // chartTypes
     //
     this.chartTypes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)));
     //
     // chartTypes.BackgroundStyle
     //
     this.chartTypes.BackgroundStyle.BackColor         = System.Drawing.Color.White;
     this.chartTypes.BackgroundStyle.BorderBottom      = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.chartTypes.BackgroundStyle.BorderBottomWidth = 1;
     this.chartTypes.BackgroundStyle.BorderColor       = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(157)), ((System.Byte)(185)));
     this.chartTypes.BackgroundStyle.BorderLeft        = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.chartTypes.BackgroundStyle.BorderLeftWidth   = 1;
     this.chartTypes.BackgroundStyle.BorderRight       = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.chartTypes.BackgroundStyle.BorderRightWidth  = 1;
     this.chartTypes.BackgroundStyle.BorderTop         = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.chartTypes.BackgroundStyle.BorderTopWidth    = 1;
     this.chartTypes.BackgroundStyle.PaddingBottom     = 1;
     this.chartTypes.BackgroundStyle.PaddingLeft       = 1;
     this.chartTypes.BackgroundStyle.PaddingRight      = 1;
     this.chartTypes.BackgroundStyle.PaddingTop        = 1;
     this.chartTypes.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.chartTypes.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.buttonItem1,
         this.columnSelector,
         this.lineSelector,
         this.pieSelector,
         this.barSelector,
         this.areaSelector,
         this.xySelector,
         this.stockSelector
     });
     this.chartTypes.LayoutOrientation = DevComponents.DotNetBar.eOrientation.Vertical;
     this.chartTypes.Location          = new System.Drawing.Point(6, 36);
     this.chartTypes.Name     = "chartTypes";
     this.chartTypes.Size     = new System.Drawing.Size(152, 262);
     this.chartTypes.TabIndex = 1;
     this.chartTypes.Text     = "itemPanel1";
     //
     // buttonItem1
     //
     this.buttonItem1.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.buttonItem1.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem1.Image")));
     this.buttonItem1.Name        = "buttonItem1";
     this.buttonItem1.OptionGroup = "charts";
     this.buttonItem1.Text        = "Templates";
     //
     // columnSelector
     //
     this.columnSelector.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.columnSelector.Checked     = true;
     this.columnSelector.Image       = ((System.Drawing.Image)(resources.GetObject("columnSelector.Image")));
     this.columnSelector.Name        = "columnSelector";
     this.columnSelector.OptionGroup = "charts";
     this.columnSelector.Text        = "Column";
     this.columnSelector.Click      += new System.EventHandler(this.columnSelector_Click);
     //
     // lineSelector
     //
     this.lineSelector.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.lineSelector.Image       = ((System.Drawing.Image)(resources.GetObject("lineSelector.Image")));
     this.lineSelector.Name        = "lineSelector";
     this.lineSelector.OptionGroup = "charts";
     this.lineSelector.Text        = "Line";
     this.lineSelector.Click      += new System.EventHandler(this.lineSelector_Click);
     //
     // pieSelector
     //
     this.pieSelector.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.pieSelector.Image       = ((System.Drawing.Image)(resources.GetObject("pieSelector.Image")));
     this.pieSelector.Name        = "pieSelector";
     this.pieSelector.OptionGroup = "charts";
     this.pieSelector.Text        = "Pie";
     this.pieSelector.Click      += new System.EventHandler(this.pieSelector_Click);
     //
     // barSelector
     //
     this.barSelector.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.barSelector.Image       = ((System.Drawing.Image)(resources.GetObject("barSelector.Image")));
     this.barSelector.Name        = "barSelector";
     this.barSelector.OptionGroup = "charts";
     this.barSelector.Text        = "Bar";
     this.barSelector.Click      += new System.EventHandler(this.barSelector_Click);
     //
     // areaSelector
     //
     this.areaSelector.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.areaSelector.Image       = ((System.Drawing.Image)(resources.GetObject("areaSelector.Image")));
     this.areaSelector.Name        = "areaSelector";
     this.areaSelector.OptionGroup = "charts";
     this.areaSelector.Text        = "Area";
     this.areaSelector.Click      += new System.EventHandler(this.areaSelector_Click);
     //
     // xySelector
     //
     this.xySelector.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.xySelector.Image       = ((System.Drawing.Image)(resources.GetObject("xySelector.Image")));
     this.xySelector.Name        = "xySelector";
     this.xySelector.OptionGroup = "charts";
     this.xySelector.Text        = "X Y (Scatter)";
     //
     // stockSelector
     //
     this.stockSelector.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.stockSelector.Image       = ((System.Drawing.Image)(resources.GetObject("stockSelector.Image")));
     this.stockSelector.Name        = "stockSelector";
     this.stockSelector.OptionGroup = "charts";
     this.stockSelector.Text        = "Stock";
     //
     // buttonX1
     //
     this.buttonX1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.buttonX1.ColorScheme.DockSiteBackColorGradientAngle = 0;
     this.buttonX1.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.buttonX1.Location     = new System.Drawing.Point(404, 304);
     this.buttonX1.Name         = "buttonX1";
     this.buttonX1.Size         = new System.Drawing.Size(72, 24);
     this.buttonX1.TabIndex     = 2;
     this.buttonX1.Text         = "OK";
     this.buttonX1.ThemeAware   = true;
     this.buttonX1.Click       += new System.EventHandler(this.buttonX1_Click);
     //
     // buttonX2
     //
     this.buttonX2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.buttonX2.ColorScheme.DockSiteBackColorGradientAngle = 0;
     this.buttonX2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.buttonX2.Location     = new System.Drawing.Point(482, 304);
     this.buttonX2.Name         = "buttonX2";
     this.buttonX2.Size         = new System.Drawing.Size(72, 24);
     this.buttonX2.TabIndex     = 3;
     this.buttonX2.Text         = "Cancel";
     this.buttonX2.ThemeAware   = true;
     this.buttonX2.Click       += new System.EventHandler(this.buttonX2_Click);
     //
     // itemPanel2
     //
     this.itemPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)
                                                                    | System.Windows.Forms.AnchorStyles.Right)));
     this.itemPanel2.AutoScroll        = true;
     this.itemPanel2.AutoScrollMinSize = new System.Drawing.Size(369, 493);
     //
     // itemPanel2.BackgroundStyle
     //
     this.itemPanel2.BackgroundStyle.BackColor         = System.Drawing.Color.White;
     this.itemPanel2.BackgroundStyle.BorderBottom      = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.itemPanel2.BackgroundStyle.BorderBottomWidth = 1;
     this.itemPanel2.BackgroundStyle.BorderColor       = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(157)), ((System.Byte)(185)));
     this.itemPanel2.BackgroundStyle.BorderLeft        = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.itemPanel2.BackgroundStyle.BorderLeftWidth   = 1;
     this.itemPanel2.BackgroundStyle.BorderRight       = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.itemPanel2.BackgroundStyle.BorderRightWidth  = 1;
     this.itemPanel2.BackgroundStyle.BorderTop         = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.itemPanel2.BackgroundStyle.BorderTopWidth    = 1;
     this.itemPanel2.BackgroundStyle.PaddingBottom     = 1;
     this.itemPanel2.BackgroundStyle.PaddingLeft       = 1;
     this.itemPanel2.BackgroundStyle.PaddingRight      = 1;
     this.itemPanel2.BackgroundStyle.PaddingTop        = 1;
     this.itemPanel2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.itemPanel2.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.labelItem1,
         this.columnContainer,
         this.labelItem2,
         this.lineContainer,
         this.labelItem3,
         this.pieContainer,
         this.labelItem4,
         this.barContainer,
         this.labelItem5,
         this.areaContainer
     });
     this.itemPanel2.LayoutOrientation = DevComponents.DotNetBar.eOrientation.Vertical;
     this.itemPanel2.Location          = new System.Drawing.Point(168, 36);
     this.itemPanel2.Name       = "itemPanel2";
     this.itemPanel2.Size       = new System.Drawing.Size(386, 262);
     this.itemPanel2.TabIndex   = 4;
     this.itemPanel2.Text       = "itemPanel2";
     this.itemPanel2.ItemClick += new System.EventHandler(this.itemPanel2_ItemClick);
     //
     // labelItem1
     //
     this.labelItem1.BackColor       = System.Drawing.Color.FromArgb(((System.Byte)(235)), ((System.Byte)(235)), ((System.Byte)(235)));
     this.labelItem1.BorderSide      = DevComponents.DotNetBar.eBorderSide.Bottom;
     this.labelItem1.BorderType      = DevComponents.DotNetBar.eBorderType.SingleLine;
     this.labelItem1.Name            = "labelItem1";
     this.labelItem1.PaddingBottom   = 1;
     this.labelItem1.PaddingLeft     = 1;
     this.labelItem1.PaddingRight    = 1;
     this.labelItem1.PaddingTop      = 1;
     this.labelItem1.SingleLineColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(197)), ((System.Byte)(197)));
     this.labelItem1.Text            = "<b>Column</b>";
     //
     // columnContainer
     //
     this.columnContainer.MinimumSize = new System.Drawing.Size(0, 0);
     this.columnContainer.MultiLine   = true;
     this.columnContainer.Name        = "columnContainer";
     this.columnContainer.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.buttonItem12,
         this.buttonItem13,
         this.buttonItem14,
         this.buttonItem15,
         this.buttonItem16,
         this.buttonItem17,
         this.buttonItem18,
         this.buttonItem19
     });
     //
     // buttonItem12
     //
     this.buttonItem12.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem12.Image")));
     this.buttonItem12.Name        = "buttonItem12";
     this.buttonItem12.OptionGroup = "chart";
     this.buttonItem12.Text        = "Clustered Column";
     this.buttonItem12.Tooltip     = "Clustered Column";
     //
     // buttonItem13
     //
     this.buttonItem13.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem13.Image")));
     this.buttonItem13.Name        = "buttonItem13";
     this.buttonItem13.OptionGroup = "chart";
     this.buttonItem13.Text        = "Stacked Column";
     this.buttonItem13.Tooltip     = "Stacked Column";
     //
     // buttonItem14
     //
     this.buttonItem14.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem14.Image")));
     this.buttonItem14.Name        = "buttonItem14";
     this.buttonItem14.OptionGroup = "chart";
     this.buttonItem14.Text        = "100% Stacked Column";
     this.buttonItem14.Tooltip     = "100% Stacked Column";
     //
     // buttonItem15
     //
     this.buttonItem15.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem15.Image")));
     this.buttonItem15.Name        = "buttonItem15";
     this.buttonItem15.OptionGroup = "chart";
     this.buttonItem15.Text        = "Clustered Column";
     this.buttonItem15.Tooltip     = "Clustered Column";
     //
     // buttonItem16
     //
     this.buttonItem16.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem16.Image")));
     this.buttonItem16.Name        = "buttonItem16";
     this.buttonItem16.OptionGroup = "chart";
     this.buttonItem16.Text        = "Stacked Column";
     this.buttonItem16.Tooltip     = "Stacked Column";
     //
     // buttonItem17
     //
     this.buttonItem17.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem17.Image")));
     this.buttonItem17.Name        = "buttonItem17";
     this.buttonItem17.OptionGroup = "chart";
     this.buttonItem17.Text        = "100% Stacked Column";
     this.buttonItem17.Tooltip     = "100% Stacked Column";
     //
     // buttonItem18
     //
     this.buttonItem18.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem18.Image")));
     this.buttonItem18.Name        = "buttonItem18";
     this.buttonItem18.OptionGroup = "chart";
     this.buttonItem18.Text        = "Clustered Column";
     this.buttonItem18.Tooltip     = "Clustered Column";
     //
     // buttonItem19
     //
     this.buttonItem19.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem19.Image")));
     this.buttonItem19.Name        = "buttonItem19";
     this.buttonItem19.OptionGroup = "chart";
     this.buttonItem19.Text        = "Stacked Column";
     this.buttonItem19.Tooltip     = "Stacked Column";
     //
     // labelItem2
     //
     this.labelItem2.BackColor       = System.Drawing.Color.FromArgb(((System.Byte)(235)), ((System.Byte)(235)), ((System.Byte)(235)));
     this.labelItem2.BorderSide      = DevComponents.DotNetBar.eBorderSide.Bottom;
     this.labelItem2.BorderType      = DevComponents.DotNetBar.eBorderType.SingleLine;
     this.labelItem2.Name            = "labelItem2";
     this.labelItem2.PaddingBottom   = 1;
     this.labelItem2.PaddingLeft     = 1;
     this.labelItem2.PaddingRight    = 1;
     this.labelItem2.PaddingTop      = 1;
     this.labelItem2.SingleLineColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(197)), ((System.Byte)(197)));
     this.labelItem2.Text            = "<b>Line</b>";
     //
     // lineContainer
     //
     this.lineContainer.MinimumSize = new System.Drawing.Size(0, 0);
     this.lineContainer.MultiLine   = true;
     this.lineContainer.Name        = "lineContainer";
     this.lineContainer.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.buttonItem20,
         this.buttonItem21,
         this.buttonItem22,
         this.buttonItem23
     });
     //
     // buttonItem20
     //
     this.buttonItem20.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem20.Image")));
     this.buttonItem20.Name        = "buttonItem20";
     this.buttonItem20.OptionGroup = "chart";
     this.buttonItem20.Text        = "Line";
     this.buttonItem20.Tooltip     = "Line";
     //
     // buttonItem21
     //
     this.buttonItem21.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem21.Image")));
     this.buttonItem21.Name        = "buttonItem21";
     this.buttonItem21.OptionGroup = "chart";
     this.buttonItem21.Text        = "Stacked Line";
     this.buttonItem21.Tooltip     = "Stacked Line";
     //
     // buttonItem22
     //
     this.buttonItem22.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem22.Image")));
     this.buttonItem22.Name        = "buttonItem22";
     this.buttonItem22.OptionGroup = "chart";
     this.buttonItem22.Text        = "100% Stacked Line";
     this.buttonItem22.Tooltip     = "100% Stacked Line";
     //
     // buttonItem23
     //
     this.buttonItem23.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem23.Image")));
     this.buttonItem23.Name        = "buttonItem23";
     this.buttonItem23.OptionGroup = "chart";
     this.buttonItem23.Text        = "Line With Markers";
     this.buttonItem23.Tooltip     = "Line With Markers";
     //
     // labelItem3
     //
     this.labelItem3.BackColor       = System.Drawing.Color.FromArgb(((System.Byte)(235)), ((System.Byte)(235)), ((System.Byte)(235)));
     this.labelItem3.BorderSide      = DevComponents.DotNetBar.eBorderSide.Bottom;
     this.labelItem3.BorderType      = DevComponents.DotNetBar.eBorderType.SingleLine;
     this.labelItem3.Name            = "labelItem3";
     this.labelItem3.PaddingBottom   = 1;
     this.labelItem3.PaddingLeft     = 1;
     this.labelItem3.PaddingRight    = 1;
     this.labelItem3.PaddingTop      = 1;
     this.labelItem3.SingleLineColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(197)), ((System.Byte)(197)));
     this.labelItem3.Text            = "<b>Pie</b>";
     //
     // pieContainer
     //
     this.pieContainer.MinimumSize = new System.Drawing.Size(0, 0);
     this.pieContainer.MultiLine   = true;
     this.pieContainer.Name        = "pieContainer";
     this.pieContainer.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.buttonItem9,
         this.buttonItem10,
         this.buttonItem11
     });
     //
     // buttonItem9
     //
     this.buttonItem9.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem9.Image")));
     this.buttonItem9.Name        = "buttonItem9";
     this.buttonItem9.OptionGroup = "chart";
     this.buttonItem9.Text        = "Pie";
     this.buttonItem9.Tooltip     = "Pie";
     //
     // buttonItem10
     //
     this.buttonItem10.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem10.Image")));
     this.buttonItem10.Name        = "buttonItem10";
     this.buttonItem10.OptionGroup = "chart";
     this.buttonItem10.Text        = "Pie";
     this.buttonItem10.Tooltip     = "Pie";
     //
     // buttonItem11
     //
     this.buttonItem11.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem11.Image")));
     this.buttonItem11.Name        = "buttonItem11";
     this.buttonItem11.OptionGroup = "chart";
     this.buttonItem11.Text        = "Pie";
     this.buttonItem11.Tooltip     = "Pie";
     //
     // labelItem4
     //
     this.labelItem4.BackColor       = System.Drawing.Color.FromArgb(((System.Byte)(235)), ((System.Byte)(235)), ((System.Byte)(235)));
     this.labelItem4.BorderSide      = DevComponents.DotNetBar.eBorderSide.Bottom;
     this.labelItem4.BorderType      = DevComponents.DotNetBar.eBorderType.SingleLine;
     this.labelItem4.Name            = "labelItem4";
     this.labelItem4.PaddingBottom   = 1;
     this.labelItem4.PaddingLeft     = 1;
     this.labelItem4.PaddingRight    = 1;
     this.labelItem4.PaddingTop      = 1;
     this.labelItem4.SingleLineColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(197)), ((System.Byte)(197)));
     this.labelItem4.Text            = "<b>Bar</b>";
     //
     // barContainer
     //
     this.barContainer.MinimumSize = new System.Drawing.Size(0, 0);
     this.barContainer.MultiLine   = true;
     this.barContainer.Name        = "barContainer";
     this.barContainer.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.buttonItem24,
         this.buttonItem25,
         this.buttonItem26,
         this.buttonItem27,
         this.buttonItem28,
         this.buttonItem29,
         this.buttonItem30
     });
     //
     // buttonItem24
     //
     this.buttonItem24.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem24.Image")));
     this.buttonItem24.Name        = "buttonItem24";
     this.buttonItem24.OptionGroup = "chart";
     this.buttonItem24.Text        = "Clustered Bar";
     this.buttonItem24.Tooltip     = "Clustered Bar";
     //
     // buttonItem25
     //
     this.buttonItem25.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem25.Image")));
     this.buttonItem25.Name        = "buttonItem25";
     this.buttonItem25.OptionGroup = "chart";
     this.buttonItem25.Text        = "Stacked Bar";
     this.buttonItem25.Tooltip     = "Stacked Bar";
     //
     // buttonItem26
     //
     this.buttonItem26.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem26.Image")));
     this.buttonItem26.Name        = "buttonItem26";
     this.buttonItem26.OptionGroup = "chart";
     this.buttonItem26.Text        = "100% Stacked Bar";
     this.buttonItem26.Tooltip     = "100% Stacked Bar";
     //
     // buttonItem27
     //
     this.buttonItem27.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem27.Image")));
     this.buttonItem27.Name        = "buttonItem27";
     this.buttonItem27.OptionGroup = "chart";
     this.buttonItem27.Text        = "Clustered Bar";
     this.buttonItem27.Tooltip     = "Clustered Bar";
     //
     // buttonItem28
     //
     this.buttonItem28.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem28.Image")));
     this.buttonItem28.Name        = "buttonItem28";
     this.buttonItem28.OptionGroup = "chart";
     this.buttonItem28.Text        = "Stacked Bar";
     this.buttonItem28.Tooltip     = "Stacked Bar";
     //
     // buttonItem29
     //
     this.buttonItem29.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem29.Image")));
     this.buttonItem29.Name        = "buttonItem29";
     this.buttonItem29.OptionGroup = "chart";
     this.buttonItem29.Text        = "100% Stacked Bar";
     this.buttonItem29.Tooltip     = "100% Stacked Bar";
     //
     // buttonItem30
     //
     this.buttonItem30.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem30.Image")));
     this.buttonItem30.Name        = "buttonItem30";
     this.buttonItem30.OptionGroup = "chart";
     this.buttonItem30.Text        = "Clustered Bar";
     this.buttonItem30.Tooltip     = "Clustered Bar";
     //
     // labelItem5
     //
     this.labelItem5.BackColor       = System.Drawing.Color.FromArgb(((System.Byte)(235)), ((System.Byte)(235)), ((System.Byte)(235)));
     this.labelItem5.BorderSide      = DevComponents.DotNetBar.eBorderSide.Bottom;
     this.labelItem5.BorderType      = DevComponents.DotNetBar.eBorderType.SingleLine;
     this.labelItem5.Name            = "labelItem5";
     this.labelItem5.PaddingBottom   = 1;
     this.labelItem5.PaddingLeft     = 1;
     this.labelItem5.PaddingRight    = 1;
     this.labelItem5.PaddingTop      = 1;
     this.labelItem5.SingleLineColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(197)), ((System.Byte)(197)));
     this.labelItem5.Text            = "<b>Area</b>";
     //
     // areaContainer
     //
     this.areaContainer.MinimumSize = new System.Drawing.Size(0, 0);
     this.areaContainer.MultiLine   = true;
     this.areaContainer.Name        = "areaContainer";
     this.areaContainer.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.buttonItem31,
         this.buttonItem32,
         this.buttonItem33
     });
     //
     // buttonItem31
     //
     this.buttonItem31.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem31.Image")));
     this.buttonItem31.Name        = "buttonItem31";
     this.buttonItem31.OptionGroup = "chart";
     this.buttonItem31.Text        = "Area";
     this.buttonItem31.Tooltip     = "Area";
     //
     // buttonItem32
     //
     this.buttonItem32.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem32.Image")));
     this.buttonItem32.Name        = "buttonItem32";
     this.buttonItem32.OptionGroup = "chart";
     this.buttonItem32.Text        = "Stacked Area";
     this.buttonItem32.Tooltip     = "Stacked Area";
     //
     // buttonItem33
     //
     this.buttonItem33.Image       = ((System.Drawing.Image)(resources.GetObject("buttonItem33.Image")));
     this.buttonItem33.Name        = "buttonItem33";
     this.buttonItem33.OptionGroup = "chart";
     this.buttonItem33.Text        = "100% Stacked Area";
     this.buttonItem33.Tooltip     = "100% Stacked Area";
     //
     // Form1
     //
     this.AcceptButton      = this.buttonX1;
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.CancelButton      = this.buttonX2;
     this.ClientSize        = new System.Drawing.Size(562, 332);
     this.Controls.Add(this.itemPanel2);
     this.Controls.Add(this.buttonX2);
     this.Controls.Add(this.buttonX1);
     this.Controls.Add(this.chartTypes);
     this.Controls.Add(this.panelEx1);
     this.MinimumSize = new System.Drawing.Size(234, 132);
     this.Name        = "Form1";
     this.Text        = "Create Chart";
     this.ResumeLayout(false);
 }
Ejemplo n.º 20
0
 public void Clear()
 {
     ui_labelX_arrow.Visible = false;
     _currentElement = null;
     ui_panelEx_formula.Controls.Clear();
     ui_labelX_arrow.Location= new Point(11,56);
     _elements.Clear();
 }
Ejemplo n.º 21
0
 private void SetCurrentElement(ButtonX sender, bool update=true)
 {
     foreach (var item in ui_panelEx_formula.Controls)
     {
         if (item == sender)
         {
             var buttonX = item as ButtonX;
             if (buttonX != null)
             {
                 if(update)
                     ChangeArrowLocation(buttonX);
                 _currentElement = buttonX;
             }
         }
     }
 }
Ejemplo n.º 22
0
 private void ShiftElements(ButtonX button, int offset, int from = 0)
 {
     for (int i = ui_panelEx_formula.Controls.Count - 1; i >= 0; i--)
     {
         if (button == null && ui_panelEx_formula.Controls[i].Location.X < from)
             continue;
         if (button != null && ui_panelEx_formula.Controls[i].Location.X < button.Location.X)
             continue;
         if (ui_panelEx_formula.Controls[i] == button)
             continue;
         ui_panelEx_formula.Controls[i].Location = new Point(ui_panelEx_formula.Controls[i].Location.X + offset,
                                                             ui_panelEx_formula.Controls[i].Location.Y);
     }
     //ChangeArrowLocation(button);
 }
Ejemplo n.º 23
0
 private void ChangeArrowLocation(ButtonX buttonX)
 {
     if (buttonX == null)
     {
         ui_labelX_arrow.Visible = false;
         ui_labelX_arrow.Location = new Point(11, ui_labelX_arrow.Location.Y);
         return;
     }
     ui_labelX_arrow.Location = new Point(buttonX.Location.X + 5 + buttonX.Size.Width / 2, ui_labelX_arrow.Location.Y);
 }
Ejemplo n.º 24
0
        private void DeleteCurentElement()
        {
            if (_currentElement == null) return;
            var currWidth = GetStringWidth(_currentElement.Text) + 1;
            var currLeft = _currentElement.Location.X;

            if (ui_panelEx_formula.Controls.Contains(_currentElement))
            {
                var currIndex = GetCurrentIndex();
                var item = _elements[currIndex];
                _elements.Remove(item);

                ui_panelEx_formula.Controls.Remove(_currentElement);
            }

            if (ui_panelEx_formula.Controls.Count == 0)
            {
                _currentElement = null;
                ChangeArrowLocation(null);
            }
            else
            {
                ShiftElements(null, -currWidth, currLeft);
                SetNextElement(currLeft);
            }

            OnFormulaChanged();
        }
Ejemplo n.º 25
0
 public void EnableBtn(ButtonX buttonX)
 {
     if (buttonX.InvokeRequired)
     {
         buttonX.BeginInvoke(
             new MethodInvoker(
                 delegate { EnableBtn(buttonX); }));
     }
     else
     {
         buttonX.Enabled = true;
     }
 }
Ejemplo n.º 26
0
        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
            this.buttonX1 = new DevComponents.DotNetBar.ButtonX();
            this.buttonRemoveItem = new DevComponents.DotNetBar.ButtonX();
            this.buttonAddItem = new DevComponents.DotNetBar.ButtonX();
            this.advTree1 = new DevComponents.AdvTree.AdvTree();
            this.columnHeader1 = new DevComponents.AdvTree.ColumnHeader();
            this.columnHeader2 = new DevComponents.AdvTree.ColumnHeader();
            this.node1 = new DevComponents.AdvTree.Node();
            this.elementStyle1 = new DevComponents.DotNetBar.ElementStyle();
            this.label1 = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.advTree1)).BeginInit();
            this.SuspendLayout();
            // 
            // propertyGrid1
            // 
            this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.propertyGrid1.Location = new System.Drawing.Point(300, 3);
            this.propertyGrid1.Name = "propertyGrid1";
            this.propertyGrid1.Size = new System.Drawing.Size(284, 331);
            this.propertyGrid1.TabIndex = 4;
            this.propertyGrid1.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.propertyGrid1_PropertyValueChanged);
            // 
            // buttonX1
            // 
            this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            this.buttonX1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
            this.buttonX1.Location = new System.Drawing.Point(515, 341);
            this.buttonX1.Name = "buttonX1";
            this.buttonX1.Shape = new DevComponents.DotNetBar.RoundRectangleShapeDescriptor();
            this.buttonX1.Size = new System.Drawing.Size(69, 24);
            this.buttonX1.TabIndex = 5;
            this.buttonX1.Text = "&Close";
            this.buttonX1.Click += new System.EventHandler(this.buttonX1_Click);
            // 
            // buttonRemoveItem
            // 
            this.buttonRemoveItem.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            this.buttonRemoveItem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.buttonRemoveItem.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
            this.buttonRemoveItem.Enabled = false;
            this.buttonRemoveItem.FocusCuesEnabled = false;
            this.buttonRemoveItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonRemoveItem.Location = new System.Drawing.Point(32, 341);
            this.buttonRemoveItem.Name = "buttonRemoveItem";
            this.buttonRemoveItem.Shape = new DevComponents.DotNetBar.RoundRectangleShapeDescriptor();
            this.buttonRemoveItem.Size = new System.Drawing.Size(24, 24);
            this.buttonRemoveItem.TabIndex = 3;
            this.buttonRemoveItem.Click += new System.EventHandler(this.buttonRemoveItem_Click);
            // 
            // buttonAddItem
            // 
            this.buttonAddItem.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            this.buttonAddItem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.buttonAddItem.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
            this.buttonAddItem.FocusCuesEnabled = false;
            this.buttonAddItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonAddItem.Location = new System.Drawing.Point(4, 341);
            this.buttonAddItem.Name = "buttonAddItem";
            this.buttonAddItem.Shape = new DevComponents.DotNetBar.RoundRectangleShapeDescriptor();
            this.buttonAddItem.Size = new System.Drawing.Size(24, 24);
            this.buttonAddItem.TabIndex = 1;
            this.buttonAddItem.Click += new System.EventHandler(this.buttonAddItem_Click);
            // 
            // advTree1
            // 
            this.advTree1.AccessibleRole = System.Windows.Forms.AccessibleRole.Outline;
            this.advTree1.AllowDrop = true;
            this.advTree1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)));
            this.advTree1.BackColor = System.Drawing.SystemColors.Window;
            // 
            // 
            // 
            this.advTree1.BackgroundStyle.Class = "TreeBorderKey";
            this.advTree1.Columns.Add(this.columnHeader1);
            this.advTree1.Columns.Add(this.columnHeader2);
            this.advTree1.ExpandButtonType = DevComponents.AdvTree.eExpandButtonType.Triangle;
            this.advTree1.ExpandWidth = 18;
            this.advTree1.Location = new System.Drawing.Point(3, 3);
            this.advTree1.Name = "advTree1";
            this.advTree1.Nodes.AddRange(new DevComponents.AdvTree.Node[] {
            this.node1});
            this.advTree1.NodeStyle = this.elementStyle1;
            this.advTree1.PathSeparator = ";";
            this.advTree1.SelectionBoxStyle = DevComponents.AdvTree.eSelectionStyle.FullRowSelect;
            this.advTree1.Size = new System.Drawing.Size(291, 332);
            this.advTree1.Styles.Add(this.elementStyle1);
            this.advTree1.SuspendPaint = false;
            this.advTree1.TabIndex = 0;
            this.advTree1.Text = "advTree1";
            this.advTree1.AfterNodeDrop += new DevComponents.AdvTree.TreeDragDropEventHandler(this.advTree1_AfterNodeDrop);
            this.advTree1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.advTree1_MouseUp);
            this.advTree1.AfterNodeSelect += new DevComponents.AdvTree.AdvTreeNodeEventHandler(this.advTree1_AfterNodeSelect);
            // 
            // columnHeader1
            // 
            this.columnHeader1.Name = "columnHeader1";
            this.columnHeader1.Text = "Text";
            this.columnHeader1.Width.Relative = 70;
            // 
            // columnHeader2
            // 
            this.columnHeader2.Name = "columnHeader2";
            this.columnHeader2.Text = "Name";
            this.columnHeader2.Width.Relative = 30;
            // 
            // node1
            // 
            this.node1.Expanded = true;
            this.node1.Name = "node1";
            this.node1.Text = "node1";
            // 
            // elementStyle1
            // 
            this.elementStyle1.Name = "elementStyle1";
            this.elementStyle1.TextColor = System.Drawing.SystemColors.ControlText;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(153, 352);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(141, 13);
            this.label1.TabIndex = 6;
            this.label1.Text = "Drag && drop items to re-order";
            this.label1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
            // 
            // CrumbBarItemsEditor
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = Color.White;
            this.Controls.Add(this.label1);
            this.Controls.Add(this.buttonX1);
            this.Controls.Add(this.propertyGrid1);
            this.Controls.Add(this.buttonRemoveItem);
            this.Controls.Add(this.buttonAddItem);
            this.Controls.Add(this.advTree1);
            this.Name = "CrumbBarItemsEditor";
            this.Size = new System.Drawing.Size(587, 373);
            this.Load += new System.EventHandler(this.CrumbBarItemsEditor_Load);
            ((System.ComponentModel.ISupportInitialize)(this.advTree1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }
Ejemplo n.º 27
0
        public void FlashKey(ButtonX keyButton)
        {
            if (_KeyTimer == null)
            {
                _KeyTimer = new Timer();

                _KeyTimer.Interval = 125;
                _KeyTimer.Tick += KeyTimerTick;
            }

            ButtonX btn = _KeyTimer.Tag as ButtonX;

            if (btn != null)
            {
                _KeyTimer.Stop();

                DoKeyTimerUp(btn);
            }

            DoKeyTimerDown(keyButton);

            _KeyTimer.Tag = keyButton;

            _KeyTimer.Start();
        }
Ejemplo n.º 28
0
        private void DoKeyTimerDown(ButtonX btn)
        {
            MouseEventArgs args = new MouseEventArgs(
                MouseButtons.Left, 1, btn.Location.X, btn.Location.Y, 0);

            btn.InternalItem.InternalMouseDown(args);
        }
Ejemplo n.º 29
0
        private ButtonX OnOperatorSelect(ButtonX btn, Operators op)
        {
            if (string.IsNullOrEmpty(_StringValue) == false)
                UpdateTotal();

            SetOperator(op);
            OnValueChanged();

            return (btn);
        }
Ejemplo n.º 30
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBarChartRenderer));
     this.panelEx1         = new DevComponents.DotNetBar.PanelEx();
     this.panelEx5         = new DevComponents.DotNetBar.PanelEx();
     this.panelEx3         = new DevComponents.DotNetBar.PanelEx();
     this.buttonDel        = new DevComponents.DotNetBar.ButtonX();
     this.buttonAdd        = new DevComponents.DotNetBar.ButtonX();
     this.listAddField     = new DevComponents.DotNetBar.Controls.ListViewEx();
     this.listAllField     = new DevComponents.DotNetBar.Controls.ListViewEx();
     this.buttonDown       = new DevComponents.DotNetBar.ButtonX();
     this.buttonUp         = new DevComponents.DotNetBar.ButtonX();
     this.panelEx2         = new DevComponents.DotNetBar.PanelEx();
     this.sizeInput        = new DevComponents.Editors.DoubleInput();
     this.chkIsUnOverlap   = new DevComponents.DotNetBar.Controls.CheckBoxX();
     this.cmbColorRamp     = new DevComponents.DotNetBar.Controls.ComboBoxEx();
     this.labelX6          = new DevComponents.DotNetBar.LabelX();
     this.labelX4          = new DevComponents.DotNetBar.LabelX();
     this.labelX5          = new DevComponents.DotNetBar.LabelX();
     this.labelPreviewBack = new DevComponents.DotNetBar.LabelX();
     this.panelEx1.SuspendLayout();
     this.panelEx5.SuspendLayout();
     this.panelEx3.SuspendLayout();
     this.panelEx2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.sizeInput)).BeginInit();
     this.SuspendLayout();
     //
     // panelEx1
     //
     this.panelEx1.CanvasColor      = System.Drawing.SystemColors.Control;
     this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.panelEx1.Controls.Add(this.panelEx5);
     this.panelEx1.Controls.Add(this.panelEx2);
     this.panelEx1.Dock            = System.Windows.Forms.DockStyle.Fill;
     this.panelEx1.Location        = new System.Drawing.Point(0, 0);
     this.panelEx1.Name            = "panelEx1";
     this.panelEx1.Size            = new System.Drawing.Size(465, 370);
     this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
     this.panelEx1.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
     this.panelEx1.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
     this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
     this.panelEx1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.panelEx1.Style.ForeColor.ColorSchemePart   = DevComponents.DotNetBar.eColorSchemePart.PanelText;
     this.panelEx1.Style.GradientAngle = 90;
     this.panelEx1.TabIndex            = 0;
     //
     // panelEx5
     //
     this.panelEx5.CanvasColor      = System.Drawing.SystemColors.Control;
     this.panelEx5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.panelEx5.Controls.Add(this.panelEx3);
     this.panelEx5.Controls.Add(this.buttonDown);
     this.panelEx5.Controls.Add(this.buttonUp);
     this.panelEx5.Location        = new System.Drawing.Point(2, 92);
     this.panelEx5.Name            = "panelEx5";
     this.panelEx5.Size            = new System.Drawing.Size(460, 272);
     this.panelEx5.Style.Alignment = System.Drawing.StringAlignment.Center;
     this.panelEx5.Style.BackColor1.ColorSchemePart  = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
     this.panelEx5.Style.BackColor2.ColorSchemePart  = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
     this.panelEx5.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
     this.panelEx5.Style.ForeColor.ColorSchemePart   = DevComponents.DotNetBar.eColorSchemePart.ItemText;
     this.panelEx5.Style.GradientAngle = 90;
     this.panelEx5.TabIndex            = 52;
     //
     // panelEx3
     //
     this.panelEx3.CanvasColor      = System.Drawing.SystemColors.Control;
     this.panelEx3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.panelEx3.Controls.Add(this.buttonDel);
     this.panelEx3.Controls.Add(this.buttonAdd);
     this.panelEx3.Controls.Add(this.listAddField);
     this.panelEx3.Controls.Add(this.listAllField);
     this.panelEx3.Dock            = System.Windows.Forms.DockStyle.Left;
     this.panelEx3.Location        = new System.Drawing.Point(0, 0);
     this.panelEx3.Name            = "panelEx3";
     this.panelEx3.Size            = new System.Drawing.Size(420, 272);
     this.panelEx3.Style.Alignment = System.Drawing.StringAlignment.Center;
     this.panelEx3.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
     this.panelEx3.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
     this.panelEx3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
     this.panelEx3.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.panelEx3.Style.ForeColor.ColorSchemePart   = DevComponents.DotNetBar.eColorSchemePart.PanelText;
     this.panelEx3.Style.GradientAngle = 90;
     this.panelEx3.TabIndex            = 5;
     //
     // buttonDel
     //
     this.buttonDel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.buttonDel.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
     this.buttonDel.Image          = ((System.Drawing.Image)(resources.GetObject("buttonDel.Image")));
     this.buttonDel.Location       = new System.Drawing.Point(160, 112);
     this.buttonDel.Name           = "buttonDel";
     this.buttonDel.Size           = new System.Drawing.Size(30, 25);
     this.buttonDel.TabIndex       = 6;
     this.buttonDel.Click         += new System.EventHandler(this.buttonDel_Click);
     //
     // buttonAdd
     //
     this.buttonAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.buttonAdd.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
     this.buttonAdd.Image          = ((System.Drawing.Image)(resources.GetObject("buttonAdd.Image")));
     this.buttonAdd.Location       = new System.Drawing.Point(160, 81);
     this.buttonAdd.Name           = "buttonAdd";
     this.buttonAdd.Size           = new System.Drawing.Size(30, 25);
     this.buttonAdd.TabIndex       = 5;
     this.buttonAdd.Click         += new System.EventHandler(this.buttonAdd_Click);
     //
     // listAddField
     //
     //
     //
     //
     this.listAddField.Border.Class  = "ListViewBorder";
     this.listAddField.Dock          = System.Windows.Forms.DockStyle.Right;
     this.listAddField.FullRowSelect = true;
     this.listAddField.Location      = new System.Drawing.Point(198, 0);
     this.listAddField.Name          = "listAddField";
     this.listAddField.Size          = new System.Drawing.Size(222, 272);
     this.listAddField.TabIndex      = 2;
     this.listAddField.UseCompatibleStateImageBehavior = false;
     this.listAddField.View                  = System.Windows.Forms.View.Details;
     this.listAddField.MouseDoubleClick     += new System.Windows.Forms.MouseEventHandler(this.listAddField_MouseDoubleClick);
     this.listAddField.SelectedIndexChanged += new System.EventHandler(this.listAddField_SelectedIndexChanged);
     //
     // listAllField
     //
     //
     //
     //
     this.listAllField.Border.Class  = "ListViewBorder";
     this.listAllField.Dock          = System.Windows.Forms.DockStyle.Left;
     this.listAllField.FullRowSelect = true;
     this.listAllField.Location      = new System.Drawing.Point(0, 0);
     this.listAllField.Name          = "listAllField";
     this.listAllField.Size          = new System.Drawing.Size(153, 272);
     this.listAllField.TabIndex      = 1;
     this.listAllField.UseCompatibleStateImageBehavior = false;
     this.listAllField.View              = System.Windows.Forms.View.Details;
     this.listAllField.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.DoListViewMouseDoubleClick);
     //
     // buttonDown
     //
     this.buttonDown.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.buttonDown.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
     this.buttonDown.Image          = ((System.Drawing.Image)(resources.GetObject("buttonDown.Image")));
     this.buttonDown.ImagePosition  = DevComponents.DotNetBar.eImagePosition.Bottom;
     this.buttonDown.Location       = new System.Drawing.Point(428, 115);
     this.buttonDown.Name           = "buttonDown";
     this.buttonDown.Size           = new System.Drawing.Size(22, 35);
     this.buttonDown.TabIndex       = 4;
     this.buttonDown.Click         += new System.EventHandler(this.buttonDown_Click);
     //
     // buttonUp
     //
     this.buttonUp.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.buttonUp.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
     this.buttonUp.Image          = ((System.Drawing.Image)(resources.GetObject("buttonUp.Image")));
     this.buttonUp.ImagePosition  = DevComponents.DotNetBar.eImagePosition.Top;
     this.buttonUp.Location       = new System.Drawing.Point(428, 71);
     this.buttonUp.Name           = "buttonUp";
     this.buttonUp.Size           = new System.Drawing.Size(22, 35);
     this.buttonUp.TabIndex       = 3;
     this.buttonUp.Click         += new System.EventHandler(this.buttonUp_Click);
     //
     // panelEx2
     //
     this.panelEx2.CanvasColor      = System.Drawing.SystemColors.Control;
     this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.panelEx2.Controls.Add(this.sizeInput);
     this.panelEx2.Controls.Add(this.chkIsUnOverlap);
     this.panelEx2.Controls.Add(this.cmbColorRamp);
     this.panelEx2.Controls.Add(this.labelX6);
     this.panelEx2.Controls.Add(this.labelX4);
     this.panelEx2.Controls.Add(this.labelX5);
     this.panelEx2.Controls.Add(this.labelPreviewBack);
     this.panelEx2.Location        = new System.Drawing.Point(3, 3);
     this.panelEx2.Name            = "panelEx2";
     this.panelEx2.Size            = new System.Drawing.Size(459, 82);
     this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center;
     this.panelEx2.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
     this.panelEx2.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
     this.panelEx2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
     this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.panelEx2.Style.ForeColor.ColorSchemePart   = DevComponents.DotNetBar.eColorSchemePart.PanelText;
     this.panelEx2.Style.GradientAngle = 90;
     this.panelEx2.TabIndex            = 47;
     //
     // sizeInput
     //
     //
     //
     //
     this.sizeInput.BackgroundStyle.Class   = "DateTimeInputBackground";
     this.sizeInput.ButtonFreeText.Shortcut = DevComponents.DotNetBar.eShortcut.F2;
     this.sizeInput.Increment  = 1;
     this.sizeInput.Location   = new System.Drawing.Point(244, 45);
     this.sizeInput.MinValue   = 0.001;
     this.sizeInput.Name       = "sizeInput";
     this.sizeInput.ShowUpDown = true;
     this.sizeInput.Size       = new System.Drawing.Size(63, 21);
     this.sizeInput.TabIndex   = 49;
     this.sizeInput.Value      = 1;
     //
     // chkIsUnOverlap
     //
     this.chkIsUnOverlap.AutoSize = true;
     this.chkIsUnOverlap.Location = new System.Drawing.Point(67, 48);
     this.chkIsUnOverlap.Name     = "chkIsUnOverlap";
     this.chkIsUnOverlap.Size     = new System.Drawing.Size(76, 18);
     this.chkIsUnOverlap.TabIndex = 48;
     this.chkIsUnOverlap.Text     = "·ÀÖ¹¸²¸Ç";
     //
     // cmbColorRamp
     //
     this.cmbColorRamp.DisplayMember     = "Text";
     this.cmbColorRamp.DrawMode          = System.Windows.Forms.DrawMode.OwnerDrawFixed;
     this.cmbColorRamp.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cmbColorRamp.FormattingEnabled = true;
     this.cmbColorRamp.ItemHeight        = 21;
     this.cmbColorRamp.Location          = new System.Drawing.Point(67, 11);
     this.cmbColorRamp.Name     = "cmbColorRamp";
     this.cmbColorRamp.Size     = new System.Drawing.Size(274, 27);
     this.cmbColorRamp.TabIndex = 2;
     //
     // labelX6
     //
     this.labelX6.AutoSize  = true;
     this.labelX6.BackColor = System.Drawing.Color.Transparent;
     this.labelX6.Location  = new System.Drawing.Point(347, 16);
     this.labelX6.Name      = "labelX6";
     this.labelX6.Size      = new System.Drawing.Size(19, 31);
     this.labelX6.TabIndex  = 36;
     this.labelX6.Text      = "±³\r\n¾°";
     //
     // labelX4
     //
     this.labelX4.AutoSize = true;
     this.labelX4.Location = new System.Drawing.Point(207, 48);
     this.labelX4.Name     = "labelX4";
     this.labelX4.Size     = new System.Drawing.Size(31, 18);
     this.labelX4.TabIndex = 10;
     this.labelX4.Text     = "´óС";
     //
     // labelX5
     //
     this.labelX5.AutoSize = true;
     this.labelX5.Location = new System.Drawing.Point(10, 16);
     this.labelX5.Name     = "labelX5";
     this.labelX5.Size     = new System.Drawing.Size(56, 18);
     this.labelX5.TabIndex = 11;
     this.labelX5.Text     = "ÑÕÉ«·½°¸";
     //
     // labelPreviewBack
     //
     this.labelPreviewBack.BackColor = System.Drawing.Color.Transparent;
     this.labelPreviewBack.Location  = new System.Drawing.Point(367, 11);
     this.labelPreviewBack.Name      = "labelPreviewBack";
     this.labelPreviewBack.Size      = new System.Drawing.Size(80, 40);
     this.labelPreviewBack.TabIndex  = 12;
     this.labelPreviewBack.Click    += new System.EventHandler(this.labelPreviewBack_Click);
     //
     // frmBarChartRenderer
     //
     this.Controls.Add(this.panelEx1);
     this.Name = "frmBarChartRenderer";
     this.Size = new System.Drawing.Size(465, 370);
     this.panelEx1.ResumeLayout(false);
     this.panelEx5.ResumeLayout(false);
     this.panelEx3.ResumeLayout(false);
     this.panelEx2.ResumeLayout(false);
     this.panelEx2.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.sizeInput)).EndInit();
     this.ResumeLayout(false);
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.bar1 = new DevComponents.DotNetBar.Bar();
     this.buttonBlackScheme       = new DevComponents.DotNetBar.ButtonItem();
     this.buttonSilverScheme      = new DevComponents.DotNetBar.ButtonItem();
     this.buttonBlueScheme        = new DevComponents.DotNetBar.ButtonItem();
     this.colorPickerCustomScheme = new DevComponents.DotNetBar.ColorPickerDropDown();
     this.groupPanel1             = new DevComponents.DotNetBar.Controls.GroupPanel();
     this.textBoxX5   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
     this.textBoxX4   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.textBoxX3   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.textBoxX2   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.textBoxX1   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.buttonX1    = new DevComponents.DotNetBar.ButtonX();
     ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit();
     this.groupPanel1.SuspendLayout();
     this.SuspendLayout();
     //
     // bar1
     //
     this.bar1.BarType = DevComponents.DotNetBar.eBarType.StatusBar;
     this.bar1.Dock    = System.Windows.Forms.DockStyle.Top;
     this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.buttonBlackScheme,
         this.buttonSilverScheme,
         this.buttonBlueScheme,
         this.colorPickerCustomScheme
     });
     this.bar1.Name         = "bar1";
     this.bar1.RoundCorners = false;
     this.bar1.Size         = new System.Drawing.Size(338, 25);
     this.bar1.Stretch      = true;
     this.bar1.Style        = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.bar1.TabIndex     = 0;
     this.bar1.TabStop      = false;
     this.bar1.Text         = "bar1";
     //
     // buttonBlackScheme
     //
     this.buttonBlackScheme.Name   = "buttonBlackScheme";
     this.buttonBlackScheme.Text   = "Black";
     this.buttonBlackScheme.Click += new System.EventHandler(this.buttonBlackScheme_Click);
     //
     // buttonSilverScheme
     //
     this.buttonSilverScheme.Name   = "buttonSilverScheme";
     this.buttonSilverScheme.Text   = "Silver";
     this.buttonSilverScheme.Click += new System.EventHandler(this.buttonSilverScheme_Click);
     //
     // buttonBlueScheme
     //
     this.buttonBlueScheme.Name   = "buttonBlueScheme";
     this.buttonBlueScheme.Text   = "Blue";
     this.buttonBlueScheme.Click += new System.EventHandler(this.buttonBlueScheme_Click);
     //
     // colorPickerCustomScheme
     //
     this.colorPickerCustomScheme.AutoExpandOnClick = true;
     this.colorPickerCustomScheme.Image             = ((System.Drawing.Bitmap)(resources.GetObject("colorPickerCustomScheme.Image")));
     this.colorPickerCustomScheme.Name = "colorPickerCustomScheme";
     this.colorPickerCustomScheme.Text = "Custom";
     this.colorPickerCustomScheme.SelectedColorChanged += new System.EventHandler(this.colorPickerCustomScheme_SelectedColorChanged);
     this.colorPickerCustomScheme.ExpandChange         += new System.EventHandler(this.colorPickerCustomScheme_ExpandChange);
     this.colorPickerCustomScheme.ColorPreview         += new DevComponents.DotNetBar.ColorPreviewEventHandler(this.colorPickerCustomScheme_ColorPreview);
     //
     // groupPanel1
     //
     this.groupPanel1.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                 | System.Windows.Forms.AnchorStyles.Left)
                                | System.Windows.Forms.AnchorStyles.Right);
     this.groupPanel1.AutoScroll       = true;
     this.groupPanel1.CanvasColor      = System.Drawing.SystemColors.Control;
     this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.groupPanel1.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.textBoxX5,
         this.comboBoxEx1,
         this.textBoxX4,
         this.textBoxX3,
         this.textBoxX2,
         this.textBoxX1
     });
     this.groupPanel1.Location = new System.Drawing.Point(8, 40);
     this.groupPanel1.Name     = "groupPanel1";
     this.groupPanel1.Size     = new System.Drawing.Size(322, 199);
     //
     // groupPanel1.Style
     //
     this.groupPanel1.Style.BackColor2SchemePart   = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
     this.groupPanel1.Style.BackColorGradientAngle = 90;
     this.groupPanel1.Style.BackColorSchemePart    = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
     this.groupPanel1.Style.BorderBottom           = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.groupPanel1.Style.BorderBottomWidth      = 1;
     this.groupPanel1.Style.BorderColorSchemePart  = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.groupPanel1.Style.BorderLeft             = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.groupPanel1.Style.BorderLeftWidth        = 1;
     this.groupPanel1.Style.BorderRight            = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.groupPanel1.Style.BorderRightWidth       = 1;
     this.groupPanel1.Style.BorderTop           = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.groupPanel1.Style.BorderTopWidth      = 1;
     this.groupPanel1.Style.CornerDiameter      = 4;
     this.groupPanel1.Style.CornerType          = DevComponents.DotNetBar.eCornerType.Rounded;
     this.groupPanel1.Style.Font                = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.groupPanel1.Style.TextAlignment       = DevComponents.DotNetBar.eStyleTextAlignment.Center;
     this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
     this.groupPanel1.Style.TextLineAlignment   = DevComponents.DotNetBar.eStyleTextAlignment.Near;
     this.groupPanel1.TabIndex = 1;
     this.groupPanel1.Text     = "Customer Data";
     //
     // textBoxX5
     //
     this.textBoxX5.AutoSize = false;
     //
     // textBoxX5.Border
     //
     this.textBoxX5.Border.Class = "TextBoxBorder";
     this.textBoxX5.Location     = new System.Drawing.Point(16, 168);
     this.textBoxX5.Multiline    = true;
     this.textBoxX5.Name         = "textBoxX5";
     this.textBoxX5.ScrollBars   = System.Windows.Forms.ScrollBars.Vertical;
     this.textBoxX5.Size         = new System.Drawing.Size(264, 104);
     this.textBoxX5.TabIndex     = 5;
     //
     // comboBoxEx1
     //
     this.comboBoxEx1.DisplayMember = "Text";
     this.comboBoxEx1.DrawMode      = System.Windows.Forms.DrawMode.OwnerDrawFixed;
     this.comboBoxEx1.Location      = new System.Drawing.Point(16, 104);
     this.comboBoxEx1.Name          = "comboBoxEx1";
     this.comboBoxEx1.Size          = new System.Drawing.Size(264, 21);
     this.comboBoxEx1.TabIndex      = 4;
     this.comboBoxEx1.WatermarkText = "Choose State";
     //
     // textBoxX4
     //
     this.textBoxX4.AutoSize = false;
     //
     // textBoxX4.Border
     //
     this.textBoxX4.Border.Class  = "TextBoxBorder";
     this.textBoxX4.Location      = new System.Drawing.Point(16, 136);
     this.textBoxX4.Name          = "textBoxX4";
     this.textBoxX4.Size          = new System.Drawing.Size(264, 20);
     this.textBoxX4.TabIndex      = 3;
     this.textBoxX4.WatermarkText = "Post code";
     //
     // textBoxX3
     //
     this.textBoxX3.AutoSize = false;
     //
     // textBoxX3.Border
     //
     this.textBoxX3.Border.Class  = "TextBoxBorder";
     this.textBoxX3.Location      = new System.Drawing.Point(16, 72);
     this.textBoxX3.Name          = "textBoxX3";
     this.textBoxX3.Size          = new System.Drawing.Size(264, 20);
     this.textBoxX3.TabIndex      = 2;
     this.textBoxX3.WatermarkText = "Address";
     //
     // textBoxX2
     //
     this.textBoxX2.AutoSize = false;
     //
     // textBoxX2.Border
     //
     this.textBoxX2.Border.Class  = "TextBoxBorder";
     this.textBoxX2.Location      = new System.Drawing.Point(16, 40);
     this.textBoxX2.Name          = "textBoxX2";
     this.textBoxX2.Size          = new System.Drawing.Size(264, 20);
     this.textBoxX2.TabIndex      = 1;
     this.textBoxX2.WatermarkText = "Last Name";
     //
     // textBoxX1
     //
     this.textBoxX1.AutoSize = false;
     //
     // textBoxX1.Border
     //
     this.textBoxX1.Border.Class  = "TextBoxBorder";
     this.textBoxX1.Location      = new System.Drawing.Point(16, 8);
     this.textBoxX1.Name          = "textBoxX1";
     this.textBoxX1.Size          = new System.Drawing.Size(264, 20);
     this.textBoxX1.TabIndex      = 0;
     this.textBoxX1.WatermarkText = "First Name";
     //
     // buttonX1
     //
     this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.buttonX1.Anchor         = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
     this.buttonX1.ColorScheme.DockSiteBackColorGradientAngle = 0;
     this.buttonX1.Location = new System.Drawing.Point(258, 247);
     this.buttonX1.Name     = "buttonX1";
     this.buttonX1.Size     = new System.Drawing.Size(72, 24);
     this.buttonX1.TabIndex = 2;
     this.buttonX1.Text     = "Close";
     this.buttonX1.Click   += new System.EventHandler(this.buttonX1_Click);
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackColor         = System.Drawing.Color.FromArgb(((System.Byte)(194)), ((System.Byte)(217)), ((System.Byte)(247)));
     this.ClientSize        = new System.Drawing.Size(338, 277);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.buttonX1,
         this.groupPanel1,
         this.bar1
     });
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "Form1";
     this.Text            = "Drop-in replacement controls";
     this.Load           += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit();
     this.groupPanel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Ejemplo n.º 32
0
        private void StartCollect(List<string> symbols, bool isGroup, int groupID)
        {
            ui_componentList.HorizontalScroll.Visible = true;
            if (symbols.Count == 0) return;

            ui_buttonX_localConnect.Enabled = false;
            ui_buttonX_shareConnect.Enabled = false;

            TickNetClientDataManager.MaxQueueSize = (int)ui_SQL_PacketSize.Value;
            TickNetClientDataManager.MaxBufferSize = (int)ui_BufferSizeValue.Value;

            ui_componentList.ColumnCount = 1;
            ui_componentList.AutoSize = true;
            ui_componentList.AutoSizeMode = AutoSizeMode.GrowOnly;
            ui_componentList.AutoScroll = true;
            //
            ui_componentList.MaximumSize = ui_componentList.Size;

            _connector = new CQGConnector();

            _connector.addDataConnectionStatusChangedListener(CEL_DataConnectionStatusChanged);

            _sdr = new SymbolDataWriter(_connector, _client.UserName)
            {

                IsMi = cbUsMI.Checked,
                Depth = (int)ui_nudDOMDepth.Value
            };

            for (var i = 0; i < symbols.Count; i++)
            {
                var container = new Panel
                {
                    BorderStyle = BorderStyle.FixedSingle,
                    Size = new Size(370, 45),
                    AutoSize = false
                };

                var symbolDescription = new Label
                {
                    Text = symbols[i],
                    Location = new Point(20, 4),
                    Size = new Size(100, 20),
                    Dock = DockStyle.None
                };
                container.Controls.Add(symbolDescription);

                var btnCancel = new ButtonX
                {
                    Text = @"cancel",
                    Location = new Point(200, 4),
                    Size = new Size(70, 20),
                    Dock = DockStyle.None,
                    AutoSize = false,
                    Style = ui_collect_buttonX_start.Style
                };
                btnCancel.Click += btnCommandExec;
                container.Controls.Add(btnCancel);

                var btnStop = new ButtonX
                {
                    Text = @"stop",
                    Location = new Point(290, 4),
                    Size = new Size(70, 20),
                    Dock = DockStyle.None,
                    AutoSize = false,
                    Style = ui_collect_buttonX_start.Style
                };
                btnStop.Click += btnCommandExec;
                container.Controls.Add(btnStop);

                var mDesc = new Label
                {
                    Text = @"Status: ",
                    Location = new Point(5, 24),
                    Size = new Size(50, 20),
                    Dock = DockStyle.None
                };
                container.Controls.Add(mDesc);

                var message = new LabelX
                {
                    Text = @"Waiting for processing...",
                    Size = new Size(295, 17),
                    Location = new Point(55, 24),
                    AutoSize = false,
                    Dock = DockStyle.None,
                    PaddingLeft = 5
                };
                message.BackgroundStyle.BorderLeft = eStyleBorderType.Solid;
                message.BackgroundStyle.BorderLeftColor = Color.Gray;
                message.BackgroundStyle.BorderLeftWidth = 3;

                message.MouseMove += labelMessage_MouseMove;

                container.Controls.Add(message);

                ui_componentList.RowCount = i;
                ui_componentList.Controls.Add(container, 0, ui_componentList.RowCount);

                _sdr.AddSymbol(symbols[i], message);
            }
            if (TickNetClientDataManager.CurrentDbIsShared)
            {
                _sdr.SymbolSubscribed += CollectRequest;
            }
            _connector.ICEL.Startup();

            ui_collect_buttonX_start.Enabled =
                ui_collect_buttonX_startGroup.Enabled =
                ui_listBox_symbols.Enabled =
                ui_listBox_groups.Enabled = false;
            ui_collect_buttonX_stop.Enabled = true;
        }
Ejemplo n.º 33
0
        /*
         * public void CreateWinControls(Control dockWinControl)
         * {
         * dockWinControl.SuspendLayout();
         * listWinControls.Clear();
         * string type;
         * foreach (TlControl tlControl in _clmb.listTlControls)
         * {
         * Control winControl = null;
         * type = tlControl.Type;
         *
         * if (type == "GroupBox")
         * {
         *   winControl = new GroupBox();
         *   winControl.SuspendLayout();
         *
         *   ((GroupBox)winControl).ForeColor = ((TlGroupBox)tlControl).ForeColor;
         *   ((GroupBox)winControl).Text = ((TlGroupBox)tlControl).Text;
         * }
         * else if (type == "Label")
         * {
         *   winControl = new Label();
         *
         *   ((Label)winControl).ForeColor = ((TlLabel)tlControl).ForeColor;
         *   ((Label)winControl).AutoSize = ((TlLabel)tlControl).AutoSize;
         *   ((Label)winControl).Text = ((TlLabel)tlControl).Text;
         * }
         * else if (type == "ComboBox")
         * {
         *   winControl = new ComboBox();
         *
         *   ((ComboBox)winControl).DropDownStyle = (ComboBoxStyle)((TlComboBox)tlControl).DropDownStyle;
         *   ((ComboBox)winControl).Items.AddRange(((TlComboBox)tlControl).ListItems.ToArray());
         *
         * }
         * else if (type == "TextBox")
         * {
         *   winControl = new TextBox();
         * }
         * else if (type == "Button")
         * {
         *   winControl = new Button();
         *   ((Button)winControl).Text = ((TlButton)tlControl).Text;
         * }
         * else if (type == "CheckBox")
         * {
         *   winControl = new CheckBox();
         *
         *   ((CheckBox)winControl).ForeColor = ((TlCheckBox)tlControl).ForeColor;
         *   ((CheckBox)winControl).AutoSize = ((TlCheckBox)tlControl).AutoSize;
         *   ((CheckBox)winControl).Text = ((TlCheckBox)tlControl).Text;
         * }
         * else if (type == "ListBox")
         * {
         *   winControl = new ListBox();
         * }
         * else if (type == "Panel")
         * {
         *   winControl = new Panel();
         *   winControl.SuspendLayout();
         * }
         * else if (type == "DateTimePicker")
         * {
         *   winControl = new DateTimePicker();
         *
         *   ((DateTimePicker)winControl).ShowUpDown = ((TlDateTimePicker)tlControl).ShowUpDown;
         *   ((DateTimePicker)winControl).Format = (DateTimePickerFormat)((TlDateTimePicker)tlControl).Format;
         *   ((DateTimePicker)winControl).CustomFormat = ((TlDateTimePicker)tlControl).CustomFormat;
         * }
         *
         * if (winControl != null)
         * {
         *   winControl.Name = tlControl.Name;
         *   winControl.Location = new Point(tlControl.X, tlControl.Y);
         *   winControl.Size = new Size(tlControl.Width, tlControl.Height);
         *   winControl.TabIndex = tlControl.TabIndex;
         *   winControl.Visible = tlControl.Visable;
         *   winControl.Enabled = tlControl.Enable;
         *   winControl.TabStop = tlControl.TabStop;
         *   winControl.Dock = (DockStyle)tlControl.Dock;
         *
         *   foreach (TlFont tlFont in listTlFonts)
         *   {
         *       if (tlControl.FontName == tlFont.Name)
         *       {
         *           winControl.Font = new Font(tlFont.FamilyName, tlFont.EmSize, (FontStyle)tlFont.Style);
         *           break;
         *       }
         *   }
         *
         *   listWinControls.Add(winControl);
         *
         * }
         * }
         *
         * //遍历处理控件Controls.Add();
         * foreach (Control winControl in listWinControls)
         * {
         * foreach (TlControl tlControl in _clmb.listTlControls)
         * {
         *   if (winControl.Name == tlControl.Name)
         *   {
         *       foreach (Control winParentControl in listWinControls)
         *       {
         *           if (tlControl.TlParentControl == null)
         *           {
         *               if (!dockWinControl.Controls.Contains(winControl))
         *               {
         *                   dockWinControl.Controls.Add(winControl);
         *               }
         *               break;
         *           }
         *           else if (winParentControl.Name == tlControl.TlParentControl.Name)
         *           {
         *               winParentControl.Controls.Add(winControl);
         *               break;
         *           }
         *       }
         *       break;
         *   }
         * }
         * }
         *
         *
         * foreach (Control winControl in listWinControls)
         * {
         * foreach (TlControl tlControl in _clmb.listTlControls)
         * {
         *   if (winControl.Name == tlControl.Name)
         *   {
         *       if (tlControl.Type == "Panel" || tlControl.Type == "GroupBox")
         *       {
         *           winControl.ResumeLayout(true);
         *           break;
         *       }
         *   }
         * }
         * }
         * dockWinControl.ResumeLayout(false);
         * }
         */
        #endregion

        #region 第2种实现方式, 要求:listTlControlst和listWinControls一一对应,效率更高
        public void CreateWinControls(Control dockWinControl)
        {
            //dockWinControl.SuspendLayout();
            listWinControls.Clear();
            string type;

            for (int i = 0; i < _clmb.listTlControls.Count; i++)
            {
                Control winControl = null;
                type = _clmb.listTlControls[i].Type;

                if (type == "GroupBox")
                {
                    winControl = new GroupBox();
                    //winControl.SuspendLayout();

                    ((GroupBox)winControl).ForeColor = ((TlGroupBox)_clmb.listTlControls[i]).ForeColor;
                    // ((GroupBox)winControl).Text = ((TlGroupBox)_clmb.listTlControls[i]).Text;
                }
                else if (type == "Label")
                {
                    winControl = new Label();

                    ((Label)winControl).ForeColor = ((TlLabel)_clmb.listTlControls[i]).ForeColor;
                    ((Label)winControl).AutoSize  = ((TlLabel)_clmb.listTlControls[i]).AutoSize;
                    // ((Label)winControl).Text = ((TlLabel)_clmb.listTlControls[i]).Text;
                }
                else if (type == "ComboBox")
                {
                    winControl = new ComboBox();

                    ((ComboBox)winControl).DropDownStyle = (ComboBoxStyle)((TlComboBox)_clmb.listTlControls[i]).DropDownStyle;
                    ((ComboBox)winControl).Items.AddRange(((TlComboBox)_clmb.listTlControls[i]).ListItems.ToArray());

                    if (_clmb.listTlControls[i].DicEvents.ContainsKey("SelectedIndexChanged"))
                    {
                        ((ComboBox)winControl).SelectedIndexChanged += new EventHandler(controlEvent_SelectedIndexChanged);
                    }
                }
                else if (type == "TextBox")
                {
                    winControl = new TextBox();
                }
                else if (type == "Button")
                {
                    winControl = new Button();
                }
                else if (type == "ButtonX")
                {
                    winControl = new DevComponents.DotNetBar.ButtonX();

                    if (((TlButtonX)_clmb.listTlControls[i]).Image != "")
                    {
                        ((DevComponents.DotNetBar.ButtonX)winControl).Image = (System.Drawing.Bitmap)(global::TempertureEditor.Properties.Resources.ResourceManager.GetObject(((TlButtonX)_clmb.listTlControls[i]).Image, global::TempertureEditor.Properties.Resources.Culture));
                    }

                    ((DevComponents.DotNetBar.ButtonX)winControl).AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
                    ((DevComponents.DotNetBar.ButtonX)winControl).ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
                }
                else if (type == "PrintPreviewControl")
                {
                    winControl = new PrintPreviewControl();

                    ((PrintPreviewControl)winControl).UseAntiAlias = true;
                    ((PrintPreviewControl)winControl).AutoZoom     = false;
                    ((PrintPreviewControl)winControl).Zoom         = 1D;
                }
                else if (type == "CheckBox")
                {
                    winControl = new CheckBox();

                    ((CheckBox)winControl).ForeColor = ((TlCheckBox)_clmb.listTlControls[i]).ForeColor;
                    ((CheckBox)winControl).AutoSize  = ((TlCheckBox)_clmb.listTlControls[i]).AutoSize;
                    ((CheckBox)winControl).Text      = ((TlCheckBox)_clmb.listTlControls[i]).Text;
                    ((CheckBox)winControl).Checked   = ((TlCheckBox)_clmb.listTlControls[i]).Checked;

                    ((CheckBox)winControl).CheckedChanged    += new EventHandler(controlEvent_CheckedChanged);
                    ((CheckBox)winControl).CheckStateChanged += new EventHandler(controlEvent_CheckStateChanged);
                }
                else if (type == "RadioButton")
                {
                    winControl = new RadioButton();

                    ((RadioButton)winControl).ForeColor = ((TlRadioButton)_clmb.listTlControls[i]).ForeColor;
                    ((RadioButton)winControl).AutoSize  = ((TlRadioButton)_clmb.listTlControls[i]).AutoSize;
                    // ((RadioButton)winControl).Text = ((TlRadioButton)_clmb.listTlControls[i]).Text;
                    ((RadioButton)winControl).UseVisualStyleBackColor = ((TlRadioButton)_clmb.listTlControls[i]).UseVisualStyleBackColor;
                    ((RadioButton)winControl).Checked = ((TlRadioButton)_clmb.listTlControls[i]).Checked;

                    ((RadioButton)winControl).CheckedChanged += new EventHandler(controlEvent_CheckedChanged);
                }
                else if (type == "ListBox")
                {
                    winControl = new ListBox();
                }
                else if (type == "Panel" || type == "PanelControl" || type == "GroupPanel")
                {
                    if (type == "Panel")
                    {
                        winControl = new Panel();
                    }
                    else
                    {
                        if (type == "PanelControl")
                        {
                            winControl = new PanelControl();
                        }
                        else
                        {
                            if (type == "GroupPanel")
                            {
                                winControl = new GroupPanel();
                            }
                            else
                            {
                            }
                        }
                        #region 未实现配置样式
                        ((PanelControl)winControl).Style.BackColor2SchemePart   = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
                        ((PanelControl)winControl).Style.BackColorGradientAngle = 90;
                        ((PanelControl)winControl).Style.BackColorSchemePart    = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
                        ((PanelControl)winControl).Style.BorderBottom           = DevComponents.DotNetBar.eStyleBorderType.Solid;
                        ((PanelControl)winControl).Style.BorderBottomWidth      = 1;
                        ((PanelControl)winControl).Style.BorderColorSchemePart  = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
                        ((PanelControl)winControl).Style.BorderLeft             = DevComponents.DotNetBar.eStyleBorderType.Solid;
                        ((PanelControl)winControl).Style.BorderLeftWidth        = 1;
                        ((PanelControl)winControl).Style.BorderRight            = DevComponents.DotNetBar.eStyleBorderType.Solid;
                        ((PanelControl)winControl).Style.BorderRightWidth       = 1;
                        ((PanelControl)winControl).Style.BorderTop           = DevComponents.DotNetBar.eStyleBorderType.Solid;
                        ((PanelControl)winControl).Style.BorderTopWidth      = 1;
                        ((PanelControl)winControl).Style.CornerDiameter      = 4;
                        ((PanelControl)winControl).Style.CornerType          = DevComponents.DotNetBar.eCornerType.Rounded;
                        ((PanelControl)winControl).Style.TextAlignment       = DevComponents.DotNetBar.eStyleTextAlignment.Center;
                        ((PanelControl)winControl).Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
                        ((PanelControl)winControl).Style.TextLineAlignment   = DevComponents.DotNetBar.eStyleTextAlignment.Near;
                        ((PanelControl)winControl).StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
                        ((PanelControl)winControl).StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
                        #endregion

                        ((PanelControl)winControl).ShowFocusRectangle = ((TlPanelControl)_clmb.listTlControls[i]).ShowFocusRectangle;
                        ((PanelControl)winControl).ColorSchemeStyle   = (eDotNetBarStyle)((TlPanelControl)_clmb.listTlControls[i]).ColorSchemeStyle;
                        ((PanelControl)winControl).CanvasColor        = ((TlPanelControl)_clmb.listTlControls[i]).CanvasColor;
                    }
                    ((Panel)winControl).AutoScroll = ((TlPanel)_clmb.listTlControls[i]).AutoScroll;
                }
                else if (type == "DateTimePicker")
                {
                    winControl = new DateTimePicker();

                    ((DateTimePicker)winControl).ShowUpDown   = ((TlDateTimePicker)_clmb.listTlControls[i]).ShowUpDown;
                    ((DateTimePicker)winControl).Format       = (DateTimePickerFormat)((TlDateTimePicker)_clmb.listTlControls[i]).Format;
                    ((DateTimePicker)winControl).CustomFormat = ((TlDateTimePicker)_clmb.listTlControls[i]).CustomFormat;

                    if (_clmb.listTlControls[i].DicEvents.ContainsKey("ValueChanged"))
                    {
                        ((DateTimePicker)winControl).ValueChanged += new EventHandler(controlEvent_ValueChanged);
                    }
                }
                else if (type == "PictureBox")
                {
                    winControl = new PictureBox();
                    ((PictureBox)winControl).BackColor = ((TlPictureBox)_clmb.listTlControls[i]).BackColor;
                }
                else if (type == "ExpandableSplitter")
                {
                    winControl = new DevComponents.DotNetBar.ExpandableSplitter();
                    ((DevComponents.DotNetBar.ExpandableSplitter)winControl).Style = (DevComponents.DotNetBar.eSplitterStyle)((TlExpandableSplitter)_clmb.listTlControls[i]).Style;
                }
                else if (type == "AdvTree")
                {
                    winControl = new DevComponents.AdvTree.AdvTree();
                    ((DevComponents.AdvTree.AdvTree)winControl).ForeColor = ((TlAdvTree)_clmb.listTlControls[i]).ForeColor;
                    ((DevComponents.AdvTree.AdvTree)winControl).AllowDrop = ((TlAdvTree)_clmb.listTlControls[i]).AllowDrop;

                    ((DevComponents.AdvTree.AdvTree)winControl).AccessibleRole             = System.Windows.Forms.AccessibleRole.Outline;
                    ((DevComponents.AdvTree.AdvTree)winControl).BackgroundStyle.Class      = "TreeBorderKey";
                    ((DevComponents.AdvTree.AdvTree)winControl).BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
                    ((DevComponents.AdvTree.AdvTree)winControl).NodeSpacing   = 2;
                    ((DevComponents.AdvTree.AdvTree)winControl).PathSeparator = ";";
                }
                else if (type == "Slider")
                {
                    winControl = new DevComponents.DotNetBar.Controls.Slider();
                    ((DevComponents.DotNetBar.Controls.Slider)winControl).Minimum = ((TlSlider)_clmb.listTlControls[i]).Minimum;
                    ((DevComponents.DotNetBar.Controls.Slider)winControl).Maximum = ((TlSlider)_clmb.listTlControls[i]).Maximum;
                    ((DevComponents.DotNetBar.Controls.Slider)winControl).Value   = ((TlSlider)_clmb.listTlControls[i]).Value;

                    ((DevComponents.DotNetBar.Controls.Slider)winControl).BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
                    ((DevComponents.DotNetBar.Controls.Slider)winControl).Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
                }
                else if (type == "ucAiTemperature")
                {
                    winControl = new ucAiTemperature(((TlAiTemperature)_clmb.listTlControls[i]).ClmbFileName);
                }

                /*
                 * else if (type == "ucTemperatureFrame")
                 * {
                 *  winControl = new ucTemperatureFrame(((TlAiTemperature)_clmb.listTlControls[i]).ClmbFileName);
                 * }
                 */
                else if (type == "ucTemperatureReport")
                {
                    winControl = new ucTemperatureReport(((TlTemperatureReport)_clmb.listTlControls[i]).TmbFileName);
                }
                else if (type == "RibbonBar")
                {
                    winControl = new RibbonBar();
                    ((RibbonBar)winControl).Style               = (eDotNetBarStyle)((TlRibbonBar)_clmb.listTlControls[i]).Style;
                    ((RibbonBar)winControl).TitleVisible        = ((TlRibbonBar)_clmb.listTlControls[i]).TitleVisible;
                    ((RibbonBar)winControl).AutoOverflowEnabled = ((TlRibbonBar)_clmb.listTlControls[i]).AutoOverflowEnabled;
                    ((RibbonBar)winControl).ContainerControlProcessDialogKey = ((TlRibbonBar)_clmb.listTlControls[i]).ContainerControlProcessDialogKey;
                }

                if (winControl != null)
                {
                    if (_clmb.listTlControls[i].BackColor != null)
                    {
                        winControl.BackColor = (Color)_clmb.listTlControls[i].BackColor;
                    }
                    winControl.Name     = _clmb.listTlControls[i].Name;
                    winControl.Location = new Point(_clmb.listTlControls[i].X, _clmb.listTlControls[i].Y);
                    winControl.Size     = new Size(_clmb.listTlControls[i].Width, _clmb.listTlControls[i].Height);
                    winControl.TabIndex = _clmb.listTlControls[i].TabIndex;
                    winControl.Visible  = _clmb.listTlControls[i].Visable;
                    winControl.Enabled  = _clmb.listTlControls[i].Enable;
                    winControl.TabStop  = _clmb.listTlControls[i].TabStop;
                    foreach (TlFont tlFont in _clmb.listTlFonts)
                    {
                        if (_clmb.listTlControls[i].FontName == tlFont.Name)
                        {
                            winControl.Font = new Font(tlFont.FamilyName, tlFont.EmSize, (FontStyle)tlFont.Style);
                            break;
                        }
                    }
                    winControl.Dock = (DockStyle)_clmb.listTlControls[i].Dock;
                    winControl.Text = _clmb.listTlControls[i].Text;

                    // 注: 不能使用if/else,因为同个控件可能要处理多个事件
                    if (_clmb.listTlControls[i].DicEvents.ContainsKey("Click"))
                    {
                        winControl.Click += new EventHandler(controlEvent_Click);
                    }

                    if (_clmb.listTlControls[i].DicEvents.ContainsKey("TextChanged"))
                    {
                        winControl.TextChanged += new EventHandler(controlEvent_TextChanged);
                    }

                    if (_clmb.listTlControls[i].DicEvents.ContainsKey("SizeChanged"))
                    {
                        winControl.SizeChanged += new EventHandler(controlEvent_SizeChanged);
                    }


                    listWinControls.Add(winControl);
                }
            }

            //特殊类型处理,需在所有控件创建后处理
            for (int i = 0; i < _clmb.listTlControls.Count; i++)
            {
                if (_clmb.listTlControls[i].Type == "ExpandableSplitter")
                {
                    ((DevComponents.DotNetBar.ExpandableSplitter)listWinControls[i]).ExpandableControl = listWinControls.Find(cl => cl.Name == ((TlExpandableSplitter)_clmb.listTlControls[i]).ExpandableControl); //等同以下注释代码功能

                    /*
                     * foreach (Control tmpControl in listWinControls)
                     * {
                     *  if (tmpControl.Name == ((TlExpandableSplitter)_clmb.listTlControls[i]).ExpandableControl)
                     *  {
                     *      ((DevComponents.DotNetBar.ExpandableSplitter)listWinControls[i]).ExpandableControl = tmpControl;
                     *      break;
                     *  }
                     * }
                     */
                }

                /*
                 * if (_clmb.listTlControls[i].Type == "RibbonBar")
                 * {
                 *  foreach (string itemName in ((TlRibbonBar)_clmb.listTlControls[i]).ListItems)
                 *  {
                 *      Control findControl = listWinControls.Find(cl => cl.Name == itemName);
                 *      if (findControl != null)
                 *      {
                 *        //  ((RibbonBar)listWinControls[i]).Items.Add((BaseItem)findControl);
                 *
                 *
                 *       }
                 *  }
                 * }
                 */
            }
            //遍历处理控件Controls.Add(); 当同一DockStyle时,如都为DockStyle.Top时,倒序Add才能按配置文件的正序展示
            for (int i = listWinControls.Count - 1; i >= 0; i--)
            {
                Control winControl = listWinControls[i];

                if (_clmb.listTlControls[i].TlParentControl == null)
                {
                    if (!dockWinControl.Controls.Contains(winControl))
                    {
                        dockWinControl.Controls.Add(winControl);
                    }
                }
                else
                {
                    foreach (Control winParentControl in listWinControls)
                    {
                        if (winParentControl.Name == _clmb.listTlControls[i].TlParentControl.Name)
                        {
                            winParentControl.Controls.Add(winControl);
                            break;
                        }
                    }
                }
            }

            /*
             * for (int i = listWinControls.Count - 1; i >= 0 ; i--)
             * {
             *  Control winControl = listWinControls[i];
             *  if (_clmb.listTlControls[i].Type == "Panel" || _clmb.listTlControls[i].Type == "GroupBox")
             *  {
             *      winControl.ResumeLayout(true);
             *      break;
             *  }
             * }
             */
            //dockWinControl.ResumeLayout(false);
        }
Ejemplo n.º 34
0
 public void EnableButton(ButtonX button)
 {
     if (button.InvokeRequired)
     {
         button.Invoke(
             new MethodInvoker(
                 delegate { EnableButton(button); }));
     }
     else
     {
         button.Enabled = true;
     }
 }
Ejemplo n.º 35
0
 /// <summary>
 ///   Updates the text.
 /// </summary>
 /// <param name = "lab">The lab.</param>
 /// <param name = "text">The text.</param>
 public void UpdateText(ButtonX lab, string text)
 {
     if (lab.InvokeRequired)
     {
         lab.Invoke(
             new MethodInvoker(
                 delegate { UpdateText(lab, text); }));
     }
     else
     {
         lab.Text = text;
     }
 }
Ejemplo n.º 36
0
        public ExportClassV2(string title, Image img)
        {
            InitializeComponent();
            _Title = this.Text = title;
            foreach (WizardPage page in wizard1.WizardPages)
            {
                page.PageTitle = _Title;
                if (img != null)
                {
                    Bitmap b = new Bitmap(48, 48);
                    using (Graphics g = Graphics.FromImage(b))
                        g.DrawImage(img, 0, 0, 48, 48);
                    page.PageHeaderImage = b;
                }
            }

            #region 加入進階跟HELP按鈕
            _OptionsContainer = new PanelEx();
            _OptionsContainer.Font = this.Font;
            _OptionsContainer.ColorSchemeStyle = eDotNetBarStyle.Office2007;
            _OptionsContainer.Size = new Size(100, 100);
            _OptionsContainer.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
            _OptionsContainer.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
            _OptionsContainer.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
            _OptionsContainer.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
            _OptionsContainer.Style.GradientAngle = 90;
            _Options = new SmartSchool.API.PlugIn.Collections.OptionCollection();
            _Options.ItemsChanged += new EventHandler(_Options_ItemsChanged);

            advContainer = new ControlContainerItem();
            advContainer.AllowItemResize = false;
            advContainer.GlobalItem = false;
            advContainer.MenuVisibility = eMenuVisibility.VisibleAlways;
            advContainer.Control = _OptionsContainer;

            ItemContainer itemContainer2 = new ItemContainer();
            itemContainer2.LayoutOrientation = DevComponents.DotNetBar.eOrientation.Vertical;
            itemContainer2.MinimumSize = new System.Drawing.Size(0, 0);
            itemContainer2.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
            advContainer});

            advButton = new ButtonX();
            advButton.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            advButton.Text = "    進階";
            advButton.Top = this.wizard1.Controls[1].Controls[0].Top;
            advButton.Left = 5;
            advButton.Size = this.wizard1.Controls[1].Controls[0].Size;
            advButton.Visible = true;
            advButton.SubItems.Add(itemContainer2);
            advButton.PopupSide = ePopupSide.Top;
            advButton.SplitButton = true;
            advButton.Enabled = false;
            advButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
            advButton.AutoExpandOnClick = true;
            advButton.SubItemsExpandWidth = 16;
            advButton.FadeEffect = false;
            advButton.FocusCuesEnabled = false;
            this.wizard1.Controls[1].Controls.Add(advButton);

            helpButton = new LinkLabel();
            helpButton.AutoSize = true;
            helpButton.BackColor = System.Drawing.Color.Transparent;
            helpButton.Location = new System.Drawing.Point(81, 10);
            helpButton.Size = new System.Drawing.Size(69, 17);
            helpButton.TabStop = true;
            helpButton.Text = "Help";
            //helpButton.Top = this.wizard1.Controls[1].Controls[0].Top + this.wizard1.Controls[1].Controls[0].Height - helpButton.Height;
            //helpButton.Left = 150;
            helpButton.Visible = false;
            helpButton.Click += delegate { if (HelpButtonClick != null)HelpButtonClick(this, new EventArgs()); };
            helpButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
            this.wizard1.Controls[1].Controls.Add(helpButton);
            #endregion

            #region 設定Wizard會跟著Style跑
            //this.wizard1.FooterStyle.ApplyStyle(( GlobalManager.Renderer as Office2007Renderer ).ColorTable.GetClass(ElementStyleClassKeys.RibbonFileMenuBottomContainerKey));
            this.wizard1.HeaderStyle.ApplyStyle((GlobalManager.Renderer as Office2007Renderer).ColorTable.GetClass(ElementStyleClassKeys.RibbonFileMenuBottomContainerKey));
            this.wizard1.FooterStyle.BackColorGradientAngle = -90;
            this.wizard1.FooterStyle.BackColorGradientType = eGradientType.Linear;
            this.wizard1.FooterStyle.BackColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.Default.TopBackground.Start;
            this.wizard1.FooterStyle.BackColor2 = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.Default.TopBackground.End;
            this.wizard1.BackColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.Default.TopBackground.Start;
            this.wizard1.BackgroundImage = null;
            for (int i = 0; i < 6; i++)
            {
                (this.wizard1.Controls[1].Controls[i] as ButtonX).ColorTable = eButtonColor.OrangeWithBackground;
            }
            (this.wizard1.Controls[0].Controls[1] as System.Windows.Forms.Label).ForeColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.MouseOver.TitleText;
            (this.wizard1.Controls[0].Controls[2] as System.Windows.Forms.Label).ForeColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.Default.TitleText;
            #endregion

            this.checkBox1.ForeColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.CheckBoxItem.Default.Text;
            listViewEx1.ForeColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.CheckBoxItem.Default.Text;

            _CheckAllManager.TargetComboBox = this.checkBox1;
            _CheckAllManager.TargetListView = this.listViewEx1;

            advButton.PopupOpen += delegate { if (ControlPanelOpen != null)ControlPanelOpen(this, new EventArgs()); };
            advButton.PopupClose += delegate { if (ControlPanelClose != null)ControlPanelClose(this, new EventArgs()); };

            _ExportableFields = new SmartSchool.API.PlugIn.Collections.FieldsCollection();
            _SelectedFields = new SmartSchool.API.PlugIn.Collections.FieldsCollection();
            _ExportableFields.ItemsChanged += delegate
            {
                List<string> uncheckItems = new List<string>();
                foreach (ListViewItem item in listViewEx1.Items)
                {
                    if (item != null && item.Checked == false)
                        uncheckItems.Add(item.Text);
                }
                listViewEx1.Items.Clear();

                List<string> newFields = new List<string>(new string[] { "班級系統編號", "班級名稱" });
                //newFields.AddRange(_Process.ExportableFields);
                foreach (string field in _ExportableFields)
                {
                    if (!newFields.Contains(field))
                        newFields.Add(field);
                }
                List<ListViewItem> items = new List<ListViewItem>();
                foreach (string var in newFields)
                {
                    ListViewItem item = new ListViewItem(var);
                    item.Checked = !uncheckItems.Contains(var);
                    items.Add(item);
                }
                listViewEx1.Items.AddRange(items.ToArray());
                listViewEx1_ItemChecked(null, null);
            };
        }
Ejemplo n.º 37
0
        private ButtonX OnDigitSelect(ButtonX btn)
        {
            AddDigit(btn);

            OnValueChanged();

            return (btn);
        }
Ejemplo n.º 38
0
        }                                           //初始的透明度 xisheng 20110729
        //private XmlDocument m_pXmlDoc;

        private void InitializeComponent()
        {
            this.btnApply  = new DevComponents.DotNetBar.ButtonX();
            this.btnCancel = new DevComponents.DotNetBar.ButtonX();
            this.btnOK     = new DevComponents.DotNetBar.ButtonX();
            this.panelEx1  = new DevComponents.DotNetBar.PanelEx();
            this.SuspendLayout();
            //
            // btnApply
            //
            this.btnApply.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            this.btnApply.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
            this.btnApply.Location       = new System.Drawing.Point(381, 318);
            this.btnApply.Name           = "btnApply";
            this.btnApply.Size           = new System.Drawing.Size(75, 23);
            this.btnApply.TabIndex       = 6;
            this.btnApply.Text           = "应用";
            this.btnApply.Click         += new System.EventHandler(this.btnApply_Click);
            //
            // btnCancel
            //
            this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            this.btnCancel.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
            this.btnCancel.Location       = new System.Drawing.Point(300, 318);
            this.btnCancel.Name           = "btnCancel";
            this.btnCancel.Size           = new System.Drawing.Size(75, 23);
            this.btnCancel.TabIndex       = 5;
            this.btnCancel.Text           = "取消";
            this.btnCancel.Click         += new System.EventHandler(this.btnCancel_Click);
            //
            // btnOK
            //
            this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            this.btnOK.ColorTable     = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
            this.btnOK.Location       = new System.Drawing.Point(219, 318);
            this.btnOK.Name           = "btnOK";
            this.btnOK.Size           = new System.Drawing.Size(75, 23);
            this.btnOK.TabIndex       = 4;
            this.btnOK.Text           = "确定";
            this.btnOK.Click         += new System.EventHandler(this.btnOK_Click);
            //
            // panelEx1
            //
            this.panelEx1.CanvasColor      = System.Drawing.SystemColors.Control;
            this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
            this.panelEx1.Dock             = System.Windows.Forms.DockStyle.Top;
            this.panelEx1.Location         = new System.Drawing.Point(0, 0);
            this.panelEx1.Name             = "panelEx1";
            this.panelEx1.Size             = new System.Drawing.Size(467, 313);
            this.panelEx1.Style.Alignment  = System.Drawing.StringAlignment.Center;
            this.panelEx1.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
            this.panelEx1.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
            this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
            this.panelEx1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
            this.panelEx1.Style.ForeColor.ColorSchemePart   = DevComponents.DotNetBar.eColorSchemePart.PanelText;
            this.panelEx1.Style.GradientAngle = 90;
            this.panelEx1.TabIndex            = 7;
            //
            // frmLayerProperties
            //
            this.ClientSize = new System.Drawing.Size(467, 343);
            this.Controls.Add(this.panelEx1);
            this.Controls.Add(this.btnApply);
            this.Controls.Add(this.btnCancel);
            this.Controls.Add(this.btnOK);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.HelpButton      = true;
            this.MaximizeBox     = false;
            this.MinimizeBox     = false;
            this.Name            = "frmLayerProperties";
            this.ShowIcon        = false;
            this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text            = "图层属性";
            this.TopMost         = true;
            this.ResumeLayout(false);
        }
Ejemplo n.º 39
0
        /// <summary>
        /// pnl : 整個課表的 container
        /// schType : 課表類型
        /// 
        /// </summary>
        /// <param name="pnl"></param>
        /// <param name="schType"></param>
        public DecCalendar(DevComponents.DotNetBar.PanelEx pnl)
        {
            pnl.Tag = this;

            #region 註冊事件
            CalendarEvents.ReplaceEvent += (sender, e) => UpdateContent();
            CalendarEvents.ExchangeEvent += (sender, e) =>
            {
                this.SelectedCalendars = new List<CalendarRecord>();
                UpdateContent();
            };
            CalendarEvents.WeekChangeEvent += (vsender, ve) =>
            {
                if (ve.Type.Equals(this.Type) &&
                    ve.AssocID.Equals(this.AssocID))
                {
                    this.SelectedCalendars = new List<CalendarRecord>();
                    this.UpdateContent();
                }
            };
            CalendarEvents.WeekdayPeriodChangeEvent += CalendarEvents_WeekdayPeriodChangeEvent;
            #endregion

            #region 建立元件
            pnl.Controls.Clear();

            PanelEx pnlCalendarControl = makePanel(string.Empty, string.Empty, new Point(), new Size(10,50));
            pnlCalendarControl.Dock = DockStyle.Top;

            btnPrevious = CreateButton(new Size(50, 25));
            btnNext = CreateButton(new Size(50, 25));

            btnPrevious.Text = "上週";
            btnPrevious.Location = new Point(10, 10);
            btnPrevious.Click += (sender, e) =>
            {
                SchoolYearSemesterOption.Instance.StartDate = SchoolYearSemesterOption.Instance.StartDate.AddDays(-7);
                SchoolYearSemesterOption.Instance.EndDate = SchoolYearSemesterOption.Instance.EndDate.AddDays(-7);
                CalendarEvents.RaiseWeekChangeEvent(this.Type,this.AssocID);
            };

            btnNext.Text = "下週";
            btnNext.Location = new Point(70, 10);
            btnNext.Click += (sender, e) =>
            {
                SchoolYearSemesterOption.Instance.StartDate = SchoolYearSemesterOption.Instance.StartDate.AddDays(7);
                SchoolYearSemesterOption.Instance.EndDate = SchoolYearSemesterOption.Instance.EndDate.AddDays(7);
                CalendarEvents.RaiseWeekChangeEvent(this.Type,this.AssocID);
            };

            btnCurrent = CreateButton(new Size(50, 25));
            btnCurrent.Text = "本週";
            btnCurrent.Location = new Point(130, 10);
            btnCurrent.Click += (sender,e)=>
            {
                SchoolYearSemesterOption.Instance.StartDate = DateTime.Now.StartOfWeek(DayOfWeek.Monday).ToDayStart();
                SchoolYearSemesterOption.Instance.EndDate = SchoolYearSemesterOption.Instance.StartDate.AddDays(6);
                CalendarEvents.RaiseWeekChangeEvent(this.Type,this.AssocID);
            };

            ButtonX btnPrint = CreateButton(new Size(50, 25));
            btnPrint.Location = new Point(190,10);
            btnPrint.Text = "列印";
            btnPrint.Click += (sender,e)=>
            {
                if (this.Type.Equals(CalendarType.Teacher))
                {
                    List<CalendarRecord> QueryResult = new List<CalendarRecord>();

                    DateTime dteStart = SchoolYearSemesterOption.Instance.StartDate;
                    DateTime dteEnd = SchoolYearSemesterOption.Instance.EndDate;
                    List<string> SelectedClassNames = new List<string>();
                    List<string> SelectedTeacherNames = new List<string>(){AssocID};

                    BackgroundWorker worker = new BackgroundWorker();

                    worker.DoWork += (vsender, ve) =>
                    {
                        #region 找出調課記錄
                        List<CalendarRecord> ExchangeARecords = Calendar.Instance.FindExchangeRecords(
                        dteStart, dteEnd, SelectedTeacherNames, SelectedClassNames, null,
                        null, null, null, null, null);

                        List<CalendarRecord> ExchangeBRecords = Calendar.Instance.FindExchangeRecords(
                        null, null, null, null, null,
                        dteStart, dteEnd, SelectedTeacherNames, SelectedClassNames, null);

                        Dictionary<string, CalendarRecord> Records = new Dictionary<string, CalendarRecord>();

                        foreach (CalendarRecord ExchangeRecord in ExchangeARecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        foreach (CalendarRecord ExchangeRecord in ExchangeBRecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion

                        #region 找出代課記錄
                        List<CalendarRecord> RepRecords = Calendar.Instance.FindReplaceRecords(
                            SelectedTeacherNames, null, SelectedClassNames, null, dteStart, dteEnd);

                        List<CalendarRecord> AbsRecords = Calendar.Instance.FindReplaceRecords(
                            null, SelectedTeacherNames, SelectedClassNames, null, dteStart, dteEnd);

                        foreach (CalendarRecord RepRecord in RepRecords)
                            if (!Records.ContainsKey(RepRecord.UID))
                                Records.Add(RepRecord.UID, RepRecord);

                        foreach (CalendarRecord AbsRecord in AbsRecords)
                            if (!Records.ContainsKey(AbsRecord.UID))
                                Records.Add(AbsRecord.UID, AbsRecord);
                        #endregion

                        QueryResult.AddRange(Records.Values);

                        List<CalendarRecord> RelatedQueryResult = new List<CalendarRecord>();

                        List<string> RelatedClassNames = new List<string>();
                        List<string> RelatedTeacherNames = new List<string>();

                        foreach (CalendarRecord record in Records.Values)
                        {
                            if (!string.IsNullOrWhiteSpace(record.ReplaceID))
                            {
                                RelatedClassNames.Add(record.ClassName);
                                RelatedTeacherNames.Add(record.TeacherName);
                                RelatedTeacherNames.Add(record.AbsTeacherName);
                            }

                            if (!string.IsNullOrWhiteSpace(record.ExchangeID))
                            {
                                RelatedClassNames.Add(record.ClassName);
                                RelatedTeacherNames.Add(record.TeacherName);

                                if (record.ExchangeCalendar!=null)
                                    RelatedTeacherNames.Add(record.ExchangeCalendar.TeacherName);
                            }
                        }

                        RelatedTeacherNames = RelatedTeacherNames.Distinct().ToList();
                        RelatedClassNames = RelatedClassNames.Distinct().ToList();
                        QueryResult.Clear();

                        #region 找出相關調課記錄
                        ExchangeARecords = Calendar.Instance.FindExchangeRecords(
                        dteStart, dteEnd, RelatedTeacherNames, RelatedClassNames, null,
                        null, null, null, null, null);

                        ExchangeBRecords = Calendar.Instance.FindExchangeRecords(
                        null, null, null, null, null,
                        dteStart, dteEnd, RelatedTeacherNames, RelatedClassNames, null);

                        Records = new Dictionary<string, CalendarRecord>();

                        foreach (CalendarRecord ExchangeRecord in ExchangeARecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        foreach (CalendarRecord ExchangeRecord in ExchangeBRecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion

                        #region 找出相關代課記錄
                        RepRecords = Calendar.Instance.FindReplaceRecords(
                            RelatedTeacherNames, null, RelatedClassNames, null, dteStart, dteEnd);

                        AbsRecords = Calendar.Instance.FindReplaceRecords(
                            null, RelatedTeacherNames, RelatedClassNames, null, dteStart, dteEnd);

                        foreach (CalendarRecord RepRecord in RepRecords)
                            if (!Records.ContainsKey(RepRecord.UID))
                                Records.Add(RepRecord.UID, RepRecord);

                        foreach (CalendarRecord AbsRecord in AbsRecords)
                            if (!Records.ContainsKey(AbsRecord.UID))
                                Records.Add(AbsRecord.UID, AbsRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion
                    };

                    worker.RunWorkerCompleted += (vsender, ve) =>
                    {
                        ExchangeReplaceReport.Instance.Print(QueryResult, dteStart, dteEnd);
                        MotherForm.SetStatusBarMessage(string.Empty);
                        btnPrint.Enabled = true;
                    };

                    worker.RunWorkerAsync();
                    MotherForm.SetStatusBarMessage("取得報表資料中!");
                    btnPrint.Enabled = false;
                }
                else if (this.Type.Equals(CalendarType.Class))
                {
                    List<CalendarRecord> QueryResult = new List<CalendarRecord>();

                    DateTime dteStart = SchoolYearSemesterOption.Instance.StartDate;
                    DateTime dteEnd = SchoolYearSemesterOption.Instance.EndDate;
                    List<string> SelectedClassNames = new List<string>() { AssocID };
                    List<string> SelectedTeacherNames = new List<string>();

                    BackgroundWorker worker = new BackgroundWorker();

                    worker.DoWork += (vsender, ve) =>
                    {
                        #region 找出調課記錄
                        List<CalendarRecord> ExchangeARecords = Calendar.Instance.FindExchangeRecords(
                        dteStart, dteEnd, SelectedTeacherNames, SelectedClassNames, null,
                        null, null, null, null, null);

                        List<CalendarRecord> ExchangeBRecords = Calendar.Instance.FindExchangeRecords(
                        null, null, null, null, null,
                        dteStart, dteEnd, SelectedTeacherNames, SelectedClassNames, null);

                        Dictionary<string, CalendarRecord> Records = new Dictionary<string, CalendarRecord>();

                        foreach (CalendarRecord ExchangeRecord in ExchangeARecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        foreach (CalendarRecord ExchangeRecord in ExchangeBRecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion

                        #region 找出代課記錄
                        List<CalendarRecord> RepRecords = Calendar.Instance.FindReplaceRecords(
                            SelectedTeacherNames, null, SelectedClassNames, null, dteStart, dteEnd);

                        List<CalendarRecord> AbsRecords = Calendar.Instance.FindReplaceRecords(
                            null, SelectedTeacherNames, SelectedClassNames, null, dteStart, dteEnd);

                        foreach (CalendarRecord RepRecord in RepRecords)
                            if (!Records.ContainsKey(RepRecord.UID))
                                Records.Add(RepRecord.UID, RepRecord);

                        foreach (CalendarRecord AbsRecord in AbsRecords)
                            if (!Records.ContainsKey(AbsRecord.UID))
                                Records.Add(AbsRecord.UID, AbsRecord);
                        #endregion

                        QueryResult.AddRange(Records.Values);

                        List<CalendarRecord> RelatedQueryResult = new List<CalendarRecord>();

                        List<string> RelatedClassNames = new List<string>();
                        List<string> RelatedTeacherNames = new List<string>();

                        foreach (CalendarRecord record in Records.Values)
                        {
                            if (!string.IsNullOrWhiteSpace(record.ReplaceID))
                            {
                                RelatedClassNames.Add(record.ClassName);
                                RelatedTeacherNames.Add(record.TeacherName);
                                RelatedTeacherNames.Add(record.AbsTeacherName);
                            }

                            if (!string.IsNullOrWhiteSpace(record.ExchangeID))
                            {
                                RelatedClassNames.Add(record.ClassName);
                                RelatedTeacherNames.Add(record.TeacherName);
                                RelatedTeacherNames.Add(record.ExchangeCalendar.TeacherName);
                            }
                        }

                        RelatedTeacherNames = RelatedTeacherNames.Distinct().ToList();
                        RelatedClassNames = RelatedClassNames.Distinct().ToList();
                        QueryResult.Clear();

                        #region 找出相關調課記錄
                        ExchangeARecords = Calendar.Instance.FindExchangeRecords(
                        dteStart, dteEnd, RelatedTeacherNames, null, null,
                        null, null, null, null, null);

                        ExchangeBRecords = Calendar.Instance.FindExchangeRecords(
                        null, null, null, null, null,
                        dteStart, dteEnd, RelatedTeacherNames, null, null);

                        Records = new Dictionary<string, CalendarRecord>();

                        foreach (CalendarRecord ExchangeRecord in ExchangeARecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        foreach (CalendarRecord ExchangeRecord in ExchangeBRecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion

                        #region 找出相關代課記錄
                        RepRecords = Calendar.Instance.FindReplaceRecords(
                            RelatedTeacherNames, null, null, null, dteStart, dteEnd);

                        AbsRecords = Calendar.Instance.FindReplaceRecords(
                            null, RelatedTeacherNames, null, null, dteStart, dteEnd);

                        foreach (CalendarRecord RepRecord in RepRecords)
                            if (!Records.ContainsKey(RepRecord.UID))
                                Records.Add(RepRecord.UID, RepRecord);

                        foreach (CalendarRecord AbsRecord in AbsRecords)
                            if (!Records.ContainsKey(AbsRecord.UID))
                                Records.Add(AbsRecord.UID, AbsRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion
                    };

                    worker.RunWorkerCompleted += (vsender, ve) =>
                    {
                        ExchangeReplaceReport.Instance.Print(QueryResult, dteStart, dteEnd);
                        MotherForm.SetStatusBarMessage(string.Empty);
                        btnPrint.Enabled = true;
                    };

                    worker.RunWorkerAsync();
                    MotherForm.SetStatusBarMessage("取得報表資料中!");
                    btnPrint.Enabled = false;
                }
            };

            ButtonItem btnPrintAll = new ButtonItem("列印所有", "列印所有");

            btnPrintAll.Click += (sender, e) =>
            {
                if (this.Type.Equals(CalendarType.Teacher))
                {
                    List<CalendarRecord> QueryResult = new List<CalendarRecord>();

                    DateTime dteStart = SchoolYearSemesterOption.Instance.StartDate;
                    DateTime dteEnd = SchoolYearSemesterOption.Instance.EndDate;
                    List<string> SelectedClassNames = new List<string>();
                    List<string> SelectedTeacherNames = new List<string>();

                    BackgroundWorker worker = new BackgroundWorker();

                    worker.DoWork += (vsender, ve) =>
                    {
                        #region 找出調課記錄
                        List<CalendarRecord> ExchangeARecords = Calendar.Instance.FindExchangeRecords(
                        dteStart, dteEnd, SelectedTeacherNames, SelectedClassNames, null,
                        null, null, null, null, null);

                        List<CalendarRecord> ExchangeBRecords = Calendar.Instance.FindExchangeRecords(
                        null, null, null, null, null,
                        dteStart, dteEnd, SelectedTeacherNames, SelectedClassNames, null);

                        Dictionary<string, CalendarRecord> Records = new Dictionary<string, CalendarRecord>();

                        foreach (CalendarRecord ExchangeRecord in ExchangeARecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        foreach (CalendarRecord ExchangeRecord in ExchangeBRecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion

                        #region 找出代課記錄
                        List<CalendarRecord> RepRecords = Calendar.Instance.FindReplaceRecords(
                            SelectedTeacherNames, null, SelectedClassNames, null, dteStart, dteEnd);

                        List<CalendarRecord> AbsRecords = Calendar.Instance.FindReplaceRecords(
                            null, SelectedTeacherNames, SelectedClassNames, null, dteStart, dteEnd);

                        foreach (CalendarRecord RepRecord in RepRecords)
                            if (!Records.ContainsKey(RepRecord.UID))
                                Records.Add(RepRecord.UID, RepRecord);

                        foreach (CalendarRecord AbsRecord in AbsRecords)
                            if (!Records.ContainsKey(AbsRecord.UID))
                                Records.Add(AbsRecord.UID, AbsRecord);
                        #endregion

                        QueryResult.AddRange(Records.Values);

                        List<CalendarRecord> RelatedQueryResult = new List<CalendarRecord>();

                        List<string> RelatedClassNames = new List<string>();
                        List<string> RelatedTeacherNames = new List<string>();

                        foreach (CalendarRecord record in Records.Values)
                        {
                            if (!string.IsNullOrWhiteSpace(record.ReplaceID))
                            {
                                RelatedClassNames.Add(record.ClassName);
                                RelatedTeacherNames.Add(record.TeacherName);
                                RelatedTeacherNames.Add(record.AbsTeacherName);
                            }

                            if (!string.IsNullOrWhiteSpace(record.ExchangeID))
                            {
                                RelatedClassNames.Add(record.ClassName);
                                RelatedTeacherNames.Add(record.TeacherName);
                                RelatedTeacherNames.Add(record.ExchangeCalendar.TeacherName);
                            }
                        }

                        RelatedTeacherNames = RelatedTeacherNames.Distinct().ToList();
                        RelatedClassNames = RelatedClassNames.Distinct().ToList();
                        QueryResult.Clear();

                        #region 找出相關調課記錄
                        ExchangeARecords = Calendar.Instance.FindExchangeRecords(
                        dteStart, dteEnd, RelatedTeacherNames, RelatedClassNames, null,
                        null, null, null, null, null);

                        ExchangeBRecords = Calendar.Instance.FindExchangeRecords(
                        null, null, null, null, null,
                        dteStart, dteEnd, RelatedTeacherNames, RelatedClassNames, null);

                        Records = new Dictionary<string, CalendarRecord>();

                        foreach (CalendarRecord ExchangeRecord in ExchangeARecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        foreach (CalendarRecord ExchangeRecord in ExchangeBRecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion

                        #region 找出相關代課記錄
                        RepRecords = Calendar.Instance.FindReplaceRecords(
                            RelatedTeacherNames, null, RelatedClassNames, null, dteStart, dteEnd);

                        AbsRecords = Calendar.Instance.FindReplaceRecords(
                            null, RelatedTeacherNames, RelatedClassNames, null, dteStart, dteEnd);

                        foreach (CalendarRecord RepRecord in RepRecords)
                            if (!Records.ContainsKey(RepRecord.UID))
                                Records.Add(RepRecord.UID, RepRecord);

                        foreach (CalendarRecord AbsRecord in AbsRecords)
                            if (!Records.ContainsKey(AbsRecord.UID))
                                Records.Add(AbsRecord.UID, AbsRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion
                    };

                    worker.RunWorkerCompleted += (vsender, ve) =>
                    {
                        ExchangeReplaceReport.Instance.Print(QueryResult, dteStart, dteEnd);
                        MotherForm.SetStatusBarMessage(string.Empty);
                        btnPrint.Enabled = true;
                    };

                    worker.RunWorkerAsync();
                    MotherForm.SetStatusBarMessage("取得報表資料中!");
                    btnPrint.Enabled = false;
                }
                else if (this.Type.Equals(CalendarType.Class))
                {
                    List<CalendarRecord> QueryResult = new List<CalendarRecord>();

                    DateTime dteStart = SchoolYearSemesterOption.Instance.StartDate;
                    DateTime dteEnd = SchoolYearSemesterOption.Instance.EndDate;
                    List<string> SelectedClassNames = new List<string>();
                    List<string> SelectedTeacherNames = new List<string>();

                    BackgroundWorker worker = new BackgroundWorker();

                    worker.DoWork += (vsender, ve) =>
                    {
                        #region 找出調課記錄
                        List<CalendarRecord> ExchangeARecords = Calendar.Instance.FindExchangeRecords(
                        dteStart, dteEnd, SelectedTeacherNames, SelectedClassNames, null,
                        null, null, null, null, null);

                        List<CalendarRecord> ExchangeBRecords = Calendar.Instance.FindExchangeRecords(
                        null, null, null, null, null,
                        dteStart, dteEnd, SelectedTeacherNames, SelectedClassNames, null);

                        Dictionary<string, CalendarRecord> Records = new Dictionary<string, CalendarRecord>();

                        foreach (CalendarRecord ExchangeRecord in ExchangeARecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        foreach (CalendarRecord ExchangeRecord in ExchangeBRecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion

                        #region 找出代課記錄
                        List<CalendarRecord> RepRecords = Calendar.Instance.FindReplaceRecords(
                            SelectedTeacherNames, null, SelectedClassNames, null, dteStart, dteEnd);

                        List<CalendarRecord> AbsRecords = Calendar.Instance.FindReplaceRecords(
                            null, SelectedTeacherNames, SelectedClassNames, null, dteStart, dteEnd);

                        foreach (CalendarRecord RepRecord in RepRecords)
                            if (!Records.ContainsKey(RepRecord.UID))
                                Records.Add(RepRecord.UID, RepRecord);

                        foreach (CalendarRecord AbsRecord in AbsRecords)
                            if (!Records.ContainsKey(AbsRecord.UID))
                                Records.Add(AbsRecord.UID, AbsRecord);
                        #endregion

                        QueryResult.AddRange(Records.Values);

                        List<CalendarRecord> RelatedQueryResult = new List<CalendarRecord>();

                        List<string> RelatedClassNames = new List<string>();
                        List<string> RelatedTeacherNames = new List<string>();

                        foreach (CalendarRecord record in Records.Values)
                        {
                            if (!string.IsNullOrWhiteSpace(record.ReplaceID))
                            {
                                RelatedClassNames.Add(record.ClassName);
                                RelatedTeacherNames.Add(record.TeacherName);
                                RelatedTeacherNames.Add(record.AbsTeacherName);
                            }

                            if (!string.IsNullOrWhiteSpace(record.ExchangeID))
                            {
                                RelatedClassNames.Add(record.ClassName);
                                RelatedTeacherNames.Add(record.TeacherName);
                                RelatedTeacherNames.Add(record.ExchangeCalendar.TeacherName);
                            }
                        }

                        RelatedTeacherNames = RelatedTeacherNames.Distinct().ToList();
                        RelatedClassNames = RelatedClassNames.Distinct().ToList();
                        QueryResult.Clear();

                        #region 找出相關調課記錄
                        ExchangeARecords = Calendar.Instance.FindExchangeRecords(
                        dteStart, dteEnd, RelatedTeacherNames, null, null,
                        null, null, null, null, null);

                        ExchangeBRecords = Calendar.Instance.FindExchangeRecords(
                        null, null, null, null, null,
                        dteStart, dteEnd, RelatedTeacherNames, null, null);

                        Records = new Dictionary<string, CalendarRecord>();

                        foreach (CalendarRecord ExchangeRecord in ExchangeARecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        foreach (CalendarRecord ExchangeRecord in ExchangeBRecords)
                            if (!Records.ContainsKey(ExchangeRecord.UID))
                                Records.Add(ExchangeRecord.UID, ExchangeRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion

                        #region 找出相關代課記錄
                        RepRecords = Calendar.Instance.FindReplaceRecords(
                            RelatedTeacherNames, null, null, null, dteStart, dteEnd);

                        AbsRecords = Calendar.Instance.FindReplaceRecords(
                            null, RelatedTeacherNames, null, null, dteStart, dteEnd);

                        foreach (CalendarRecord RepRecord in RepRecords)
                            if (!Records.ContainsKey(RepRecord.UID))
                                Records.Add(RepRecord.UID, RepRecord);

                        foreach (CalendarRecord AbsRecord in AbsRecords)
                            if (!Records.ContainsKey(AbsRecord.UID))
                                Records.Add(AbsRecord.UID, AbsRecord);

                        QueryResult.AddRange(Records.Values);
                        #endregion
                    };

                    worker.RunWorkerCompleted += (vsender, ve) =>
                    {
                        ExchangeReplaceReport.Instance.Print(QueryResult, dteStart, dteEnd);
                        MotherForm.SetStatusBarMessage(string.Empty);
                        btnPrint.Enabled = true;
                    };

                    worker.RunWorkerAsync();
                    MotherForm.SetStatusBarMessage("取得報表資料中!");
                    btnPrint.Enabled = false;
                }
            };

            btnPrint.SubItems.Add(btnPrintAll);

            ButtonItem btnSetting = new ButtonItem("設定", "設定");

            btnSetting.Click += (sender, e) =>
            {
                #region 讀取 Preference
                ConfigData configExchagne = K12.Data.School.Configuration["調代課通知單"];

                if (configExchagne != null)
                {
                    int _useTemplateNumber = 0;
                    int.TryParse(configExchagne["TemplateNumber"], out _useTemplateNumber);

                    string customize = configExchagne["CustomizeTemplate"];
                    byte[] _buffer = Resources.調代課通知單;

                    if (!string.IsNullOrEmpty(customize))
                        _buffer = Convert.FromBase64String(customize);
                    frmExchangeReplaceTemplateConfig frmConfig = new frmExchangeReplaceTemplateConfig(
                        _buffer,
                        _useTemplateNumber);

                    frmConfig.ShowDialog();
                }
                #endregion

                //switch (mCalendarType)
                //{
                //    case CalendarType.Teacher:
                //        new frmCalendarOption(CalendarOption.GetTeacherOption()).ShowDialog();
                //        break;
                //    case CalendarType.Class:
                //        new frmCalendarOption(CalendarOption.GetClassOption()).ShowDialog();
                //        break;
                //    case CalendarType.Classroom:
                //        new frmCalendarOption(CalendarOption.GetClassroomOption()).ShowDialog();
                //        break;
                //}
            };
            btnPrint.SubItems.Add(btnSetting);

            if (CalendarOption.PrintExtraButtons.Count > 0)
            {
                foreach (ButtonItem vButton in CalendarOption.PrintExtraButtons)
                    btnPrint.SubItems.Add(vButton);
            }

            ErrorProvider errProvier = new ErrorProvider();

            DateTime dt = new DateTime();

            lblName.Name = "lblTitle";
            lblName.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            lblName.Font = new System.Drawing.Font("新細明體", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
            lblName.Location = new Point(240, 13);
            lblName.AutoSize = true;

            txtStartDate.Font = new System.Drawing.Font("新細明體", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
            txtStartDate.Location = new Point(380, 13);
            txtStartDate.Width = 40;
            txtStartDate.TextChanged += (sender, e) =>
            {
              string value = txtStartDate.Text;
                if (string.IsNullOrEmpty(value)) //沒有資料就不作任何檢查。
                    return;

                if (!DateTime.TryParse(value, out dt))
                {
                    errProvier.SetError(txtStartDate, "日期格式錯誤。");
                }
                else
                {
                    errProvier.Clear();
                }
            };
            txtStartDate.KeyPress += (sender, e) =>
            {
                if (e.KeyChar.Equals((char)Keys.Return))
                {
                    SchoolYearSemesterOption.Instance.StartDate = dt.StartOfWeek(DayOfWeek.Monday);
                    SchoolYearSemesterOption.Instance.EndDate = SchoolYearSemesterOption.Instance.StartDate.AddDays(6);
                    txtStartDate.Text = SchoolYearSemesterOption.Instance.StartDate.Month + "/" + SchoolYearSemesterOption.Instance.StartDate.Day;
                    CalendarEvents.RaiseWeekChangeEvent(this.Type,this.AssocID);
                }
            };

            lblEndDate.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            lblEndDate.Font = new System.Drawing.Font("新細明體", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
            lblEndDate.Location = new Point(420, 13);
            lblEndDate.AutoSize = true;

            pnlCalendarControl.Controls.Add(btnPrint);
            pnlCalendarControl.Controls.Add(txtStartDate);
            pnlCalendarControl.Controls.Add(lblName);
            pnlCalendarControl.Controls.Add(lblEndDate);
            pnlCalendarControl.Controls.Add(btnPrevious);
            pnlCalendarControl.Controls.Add(btnCurrent);
            pnlCalendarControl.Controls.Add(btnNext);

            PanelEx pnlCalendarContent = new PanelEx();
            pnlCalendarContent.Dock = DockStyle.Fill;

            pnl.Controls.Add(pnlCalendarContent);
            pnl.Controls.Add(pnlCalendarControl);

            this.pnlContainer = pnlCalendarContent;
            this.pnlContainer.Resize += (sender, e) => Resize();
            this.cells = new Dictionary<string, DevComponents.DotNetBar.PanelEx>();
            this.decPeriods = new Dictionary<string, DecPeriod>();
            this.headerCells = new Dictionary<string, DevComponents.DotNetBar.PanelEx>();

            ContextMenu Menu = new ContextMenu();
            this.pnlContainer.ContextMenu = Menu;
            Menu.Popup += Menu_Popup;
            #endregion

            #region 星期節次
            Campus.Configuration.ConfigData config = Campus.Configuration.Config.User["CalendarOption"];

            string vWeekday = config["Weekday"];
            string vPeriods = config["PeriodList"];

            if (!string.IsNullOrWhiteSpace(vWeekday))
                this.weekday = K12.Data.Int.Parse(vWeekday);
            else
                this.weekday = 5;

            this.periods = Utility.GetPeriodList(vPeriods);
            this.RedrawGrid();
            #endregion
        }
Ejemplo n.º 40
0
        private ButtonX CreateButton(Size vSize)
        {
            ButtonX btnX = new ButtonX();

            btnX.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            btnX.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
            btnX.Size = vSize;
            btnX.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;

            return btnX;
        }
        public ImportStudentV2(string title, Image img)
        {
            InitializeComponent();

            #region 加入進階按紐跟HELP按鈕
            _OptionsContainer = new PanelEx();
            _OptionsContainer.Font = this.Font;
            _OptionsContainer.ColorSchemeStyle = eDotNetBarStyle.Office2007;
            _OptionsContainer.Size = new Size(100, 100);
            _OptionsContainer.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
            _OptionsContainer.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
            _OptionsContainer.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
            _OptionsContainer.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
            _OptionsContainer.Style.GradientAngle = 90;
            _Options = new SmartSchool.API.PlugIn.Collections.OptionCollection();
            _Options.ItemsChanged += new EventHandler(_Options_ItemsChanged);

            advContainer = new ControlContainerItem();
            advContainer.AllowItemResize = false;
            advContainer.GlobalItem = false;
            advContainer.MenuVisibility = eMenuVisibility.VisibleAlways;
            advContainer.Control = _OptionsContainer;

            ItemContainer itemContainer2 = new ItemContainer();
            itemContainer2.LayoutOrientation = DevComponents.DotNetBar.eOrientation.Vertical;
            itemContainer2.MinimumSize = new System.Drawing.Size(0, 0);
            itemContainer2.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
            advContainer});

            advButton = new ButtonX();
            advButton.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            advButton.Text = "    進階";
            advButton.Top = this.wizard1.Controls[1].Controls[0].Top;
            advButton.Left = 5;
            advButton.Size = this.wizard1.Controls[1].Controls[0].Size;
            advButton.Visible = true;
            advButton.SubItems.Add(itemContainer2);
            advButton.PopupSide = ePopupSide.Top;
            advButton.SplitButton = true;
            advButton.Enabled = false;
            advButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
            advButton.AutoExpandOnClick = true;
            advButton.SubItemsExpandWidth = 16;
            advButton.FadeEffect = false;
            advButton.FocusCuesEnabled = false;
            this.wizard1.Controls[1].Controls.Add(advButton);

            helpButton = new LinkLabel();
            helpButton.AutoSize = true;
            helpButton.BackColor = System.Drawing.Color.Transparent;
            helpButton.Location = new System.Drawing.Point(81, 10);
            helpButton.Size = new System.Drawing.Size(69, 17);
            helpButton.TabStop = true;
            helpButton.Text = "Help";
            helpButton.Visible = false;
            helpButton.Click += delegate { if (HelpButtonClick != null)HelpButtonClick(this, new EventArgs()); };
            helpButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
            this.wizard1.Controls[1].Controls.Add(helpButton);
            #endregion

            #region 設定Wizard會跟著Style跑
            //this.wizard1.FooterStyle.ApplyStyle(( GlobalManager.Renderer as Office2007Renderer ).ColorTable.GetClass(ElementStyleClassKeys.RibbonFileMenuBottomContainerKey));
            this.wizard1.HeaderStyle.ApplyStyle((GlobalManager.Renderer as Office2007Renderer).ColorTable.GetClass(ElementStyleClassKeys.RibbonFileMenuBottomContainerKey));
            this.wizard1.FooterStyle.BackColorGradientAngle = -90;
            this.wizard1.FooterStyle.BackColorGradientType = eGradientType.Linear;
            this.wizard1.FooterStyle.BackColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.Default.TopBackground.Start;
            this.wizard1.FooterStyle.BackColor2 = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.Default.TopBackground.End;
            this.wizard1.BackColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.Default.TopBackground.Start;
            this.wizard1.BackgroundImage = null;
            for (int i = 0; i < 6; i++)
            {
                (this.wizard1.Controls[1].Controls[i] as ButtonX).ColorTable = eButtonColor.OrangeWithBackground;
            }
            (this.wizard1.Controls[0].Controls[1] as System.Windows.Forms.Label).ForeColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.MouseOver.TitleText;
            (this.wizard1.Controls[0].Controls[2] as System.Windows.Forms.Label).ForeColor = (GlobalManager.Renderer as Office2007Renderer).ColorTable.RibbonBar.Default.TitleText;
            _CheckAllManager.TargetComboBox = this.checkBox1;
            _CheckAllManager.TargetListView = this.listView1;
            #endregion

            _Title = this.Text = title;

            lblReqFields.Text = "<font color=\"#7A4E2B\"><b>姓名</b> + <b>暱稱</b></font>";

            foreach (WizardPage page in wizard1.WizardPages)
            {
                page.PageTitle = _Title;
                if (img != null)
                {
                    Bitmap b = new Bitmap(48, 48);
                    using (Graphics g = Graphics.FromImage(b))
                        g.DrawImage(img, 0, 0, 48, 48);
                    page.PageHeaderImage = b;
                }
            }
            _RequiredFields = new SmartSchool.API.PlugIn.Collections.FieldsCollection();
            _ImportableFields = new SmartSchool.API.PlugIn.Collections.FieldsCollection();
            _SelectedFields = new SmartSchool.API.PlugIn.Collections.FieldsCollection();
            _RequiredFields.ItemsChanged += new EventHandler(FieldsChanged);
            _ImportableFields.ItemsChanged += new EventHandler(FieldsChanged);

            // 填入學生狀態選項
            cboStudStatus.Items.Add("一般");
            //cboStudStatus.Items.Add("休學");
            //cboStudStatus.Items.Add("輟學");
            //cboStudStatus.Items.Add("畢業或離校");
            cboStudStatus.Items.Add("刪除");
            cboStudStatus.Text = "一般";
            cboStudStatus.DropDownStyle = ComboBoxStyle.DropDownList;
        }
Ejemplo n.º 42
-1
		private void LoadButtons(IEnumerable<CustomDialogButtonInfo> buttons)
		{
			const int buttonMargin = 20;
			var leftPosition = pnButtons.Width;
			var buttonHeight = pnButtons.Height - buttonMargin;
			var topPosition = (pnButtons.Height - buttonHeight) / 2;

			foreach (var buttonInfo in buttons.Reverse().ToList())
			{
				var button = new ButtonX();
				button.ColorTable = eButtonColor.OrangeWithBackground;
				button.Text = buttonInfo.Title;
				button.DialogResult = buttonInfo.DialogResult;
				button.TextColor = Color.Black;
				button.Height = buttonHeight;
				button.Width = buttonInfo.Width;
				button.Style = eDotNetBarStyle.StyleManagerControlled;
				button.Top = topPosition;
				button.Anchor = AnchorStyles.Top | AnchorStyles.Right;

				leftPosition -= button.Width;
				button.Left = leftPosition;
				leftPosition -= buttonMargin;

				pnButtons.Controls.Add(button);
			}
		}