public override EvasObject CreateContent(EvasObject parent)
        {
            Box box = new ColoredBox(parent);

            box.Show();
            box.PackEnd(GetTitleLabel(parent));

            var radio = new MRadioButton(parent)
            {
                StateValue = 1,
                WeightY    = 1,
                AlignmentY = 0.5,
                AlignmentX = 0.5,
            };

            box.PackEnd(radio);
            radio.Show();

            var radio2 = new MRadioButton(parent)
            {
                StateValue = 2,
                IsEnabled  = true,
                Color      = Color.FromHex("#E30425"),
                WeightY    = 1,
                AlignmentY = 0.5,
                AlignmentX = 0.5
            };

            box.PackEnd(radio2);
            radio2.SetGroup(radio);
            radio2.Show();

            var radio3 = new MRadioButton(parent)
            {
                StateValue = 3,
                IsEnabled  = false,
                WeightY    = 1,
                AlignmentY = 0.5,
                AlignmentX = 0.5
            };

            box.PackEnd(radio3);
            radio3.SetGroup(radio2);
            radio3.Show();

            radio.GroupValue = 1;

            return(box);
        }
Пример #2
0
        private void Initialize()
        {
            lpanel       = new XShadowPanel();
            linner_panel = new Panel();
            btn_close    = new CloseButton();
            lbl_header   = new Header();

            rdo_unrefer   = new MRadioButton();
            rdo_refer     = new MRadioButton();
            rdo_showall   = new MRadioButton();
            rdo_notactive = new MRadioButton();

            txt_no           = new LookupBox();
            lbl_no           = new XLabel();
            txt_date         = new XTextBox();
            txt_datePicker   = new xDatepicker();
            lbl_date         = new XLabel();
            txt_Todate       = new XTextBox();
            txt_TodatePicker = new xDatepicker();
            lbl_dateTo       = new XLabel();
            txt_party        = new LookupBox();
            lbl_party        = new XLabel();
            btn_search       = new OfficeButton();

            //btn_quick = new OfficeButton();
            //Getno_panel = new Panel();
            //Getno_innerpanel = new ShadowBox();
            //txt_getno = new XTextBox();
            //lbl_getno = new XLabel();
            //btn_generate = new OfficeButton();

            btn_refresh = new OfficeButton();
            btn_new     = new OfficeButton();
            btn_edit    = new OfficeButton();
            btn_delete  = new OfficeButton();
            btn_print   = new OfficeButton();

            listgrid = new ListGridView();

            DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();

            lpanel.SuspendLayout();
            linner_panel.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(listgrid)).BeginInit();
            SuspendLayout();

            linner_panel.Location = XLayout.LInnerPanel;
            linner_panel.Name     = "linner_panel";
            linner_panel.Size     = XSize.LInnerPanel;

            btn_close.Click += Btn_close_Click;

            lbl_header.Text = "Inward";

            #endregion [Initialize]

            #region [Add Control]

            lpanel.Name      = "lpanel";
            lpanel.Dock      = DockStyle.Fill;
            lpanel.Size      = XSize.FPanel;
            lpanel.Location  = XLayout.FPanel;
            lpanel.BackColor = XTheme.FPanel;
            lpanel.Controls.Add(linner_panel);
            lpanel.Controls.Add(btn_close);
            lpanel.Controls.Add(lbl_header);

            linner_panel.Anchor    = XAnchor.LTRB;
            linner_panel.BackColor = XTheme.LInnerpanel;

            linner_panel.Controls.Add(txt_no);
            linner_panel.Controls.Add(lbl_no);
            linner_panel.Controls.Add(txt_date);
            linner_panel.Controls.Add(txt_datePicker);
            linner_panel.Controls.Add(lbl_date);
            linner_panel.Controls.Add(txt_Todate);
            linner_panel.Controls.Add(txt_TodatePicker);
            linner_panel.Controls.Add(lbl_dateTo);

            linner_panel.Controls.Add(txt_party);
            linner_panel.Controls.Add(lbl_party);
            linner_panel.Controls.Add(btn_search);

            linner_panel.Controls.Add(rdo_unrefer);
            linner_panel.Controls.Add(rdo_refer);
            linner_panel.Controls.Add(rdo_showall);
            linner_panel.Controls.Add(rdo_notactive);

            //linner_panel.Controls.Add(btn_quick);
            //linner_panel.Controls.Add(Getno_panel);

            linner_panel.Controls.Add(btn_refresh);
            linner_panel.Controls.Add(btn_new);
            linner_panel.Controls.Add(btn_edit);
            linner_panel.Controls.Add(btn_delete);
            linner_panel.Controls.Add(btn_print);

            linner_panel.Controls.Add(listgrid);

            #endregion [Add Control]

            #region [Search]

            lbl_no.Font      = XFont.Font_10B;
            lbl_no.Name      = "lbl_no";
            lbl_no.Text      = "No";
            lbl_no.TextAlign = ContentAlignment.MiddleCenter;
            lbl_no.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_no.Size      = new Size(40, 28);
            lbl_no.Location  = XLayout.FirstLabel;

            txt_no.Font              = XFont.TxtFont;
            txt_no.ForeColor         = XFontColor.TxtFontColor;
            txt_no.BackColor         = XTheme.TxtBackcolor;
            txt_no.Name              = "txt_no";
            txt_no.ReadOnlyBackColor = XTheme.TxtReadonlyBackcolor;
            txt_no.Size              = new Size(100, 28);
            txt_no.Anchor            = XAnchor.LT;
            txt_no.Location          = new Point(lbl_no.Right - 1, lbl_no.Top);
            txt_no.TabIndex          = 6;

            lbl_date.Font      = XFont.Font_10B;
            lbl_date.Name      = "lbl_date";
            lbl_date.Text      = "Date";
            lbl_date.TextAlign = ContentAlignment.MiddleCenter;
            lbl_date.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_date.Size      = new Size(50, 28);
            lbl_date.Location  = new Point(txt_no.Right + 10, txt_no.Top);

            txt_date.Font      = XFont.TxtFont;
            txt_date.ForeColor = XFontColor.TxtFontColor;
            txt_date.BackColor = XTheme.TxtBackcolor;
            txt_date.Name      = "txt_date";
            txt_date.Size      = new Size(140, 28);
            txt_date.Anchor    = XAnchor.LT;
            txt_date.Location  = new Point(lbl_date.Right - 1, lbl_date.Top);
            txt_date.TabIndex  = 7;

            txt_datePicker.Font         = XFont.TxtFont;
            txt_datePicker.ForeColor    = XFontColor.TxtFontColor;
            txt_datePicker.BackColor    = XTheme.TxtBackcolor;
            txt_datePicker.Name         = "txt_datePicker";
            txt_datePicker.CustomFormat = "  dd-MM-yyyy";
            txt_datePicker.Format       = DateTimePickerFormat.Custom;
            txt_datePicker.Size         = new Size(170, 28);
            txt_datePicker.Anchor       = XAnchor.LT;
            txt_datePicker.Location     = new Point(lbl_date.Right - 1, lbl_date.Top);
            txt_datePicker.TabIndex     = 7;
            txt_datePicker.TextChanged += Txt_datePicker_TextChanged;

            lbl_dateTo.Font      = XFont.Font_10B;
            lbl_dateTo.Name      = "lbl_date";
            lbl_dateTo.Text      = "To";
            lbl_dateTo.TextAlign = ContentAlignment.MiddleCenter;
            lbl_dateTo.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_dateTo.Size      = new Size(50, 28);
            lbl_dateTo.Location  = new Point(txt_datePicker.Right + 10, lbl_date.Top);

            txt_Todate.Font      = XFont.TxtFont;
            txt_Todate.ForeColor = XFontColor.TxtFontColor;
            txt_Todate.BackColor = XTheme.TxtBackcolor;
            txt_Todate.Name      = "txt_dateTo";
            txt_Todate.Size      = new Size(140, 28);
            txt_Todate.Anchor    = XAnchor.LT;
            txt_Todate.Location  = new Point(lbl_dateTo.Right - 1, lbl_date.Top);
            txt_Todate.TabIndex  = 7;

            txt_TodatePicker.Font         = XFont.TxtFont;
            txt_TodatePicker.ForeColor    = XFontColor.TxtFontColor;
            txt_TodatePicker.BackColor    = XTheme.TxtBackcolor;
            txt_TodatePicker.Name         = "txt_dateTopicker";
            txt_TodatePicker.CustomFormat = "  dd-MM-yyyy";
            txt_TodatePicker.Format       = DateTimePickerFormat.Custom;
            txt_TodatePicker.Size         = new Size(170, 28);
            txt_TodatePicker.Anchor       = XAnchor.LT;
            txt_TodatePicker.Location     = new Point(lbl_dateTo.Right - 1, lbl_date.Top);
            txt_TodatePicker.TabIndex     = 7;
            txt_TodatePicker.TextChanged += Txt_TodatePicker_TextChanged;


            lbl_party.Font      = XFont.Font_10B;
            lbl_party.Name      = "lbl_party";
            lbl_party.Text      = "Party";
            lbl_party.TextAlign = ContentAlignment.MiddleCenter;
            lbl_party.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_party.Size      = new Size(80, 28);
            lbl_party.Location  = new Point(txt_TodatePicker.Right + 10, txt_datePicker.Top);

            txt_party.Font              = XFont.TxtFont;
            txt_party.ForeColor         = XFontColor.TxtFontColor;
            txt_party.BackColor         = XTheme.TxtBackcolor;
            txt_party.Name              = "txt_party";
            txt_party.ReadOnlyBackColor = XTheme.TxtReadonlyBackcolor;
            txt_party.Size              = new Size(400, 28);
            txt_party.Anchor            = XAnchor.LT;
            txt_party.Location          = new Point(lbl_party.Right - 1, lbl_party.Top);
            txt_party.TabIndex          = 8;

            btn_search.Font     = XFont.BtnFont;
            btn_search.Location = new Point(txt_party.Right + 10, txt_party.Top);
            btn_search.Size     = new Size(75, 26);
            btn_search.TabIndex = 1;
            btn_search.Name     = "btn_search";
            btn_search.Text     = "&Search";
            btn_search.Themes   = XTheme.YellowBtn;
            btn_search.Anchor   = XAnchor.TR;
            btn_search.Click   += Btn_search_Click;

            #endregion [Search]

            #region [Radio btn]

            rdo_unrefer.Anchor          = XAnchor.TR;
            rdo_unrefer.AutoSize        = false;
            rdo_unrefer.Font            = XFont.TxtFont;
            rdo_unrefer.Location        = new Point(XSize.FPanel_width - 160, 60);
            rdo_unrefer.MouseLocation   = new Point(-1, -1);
            rdo_unrefer.Name            = "rdo_unrefer";
            rdo_unrefer.Size            = new Size(200, 30);
            rdo_unrefer.TabIndex        = 2;
            rdo_unrefer.Text            = "UN RECEIPTED";
            rdo_unrefer.CheckedChanged += new EventHandler(Rdo_unrefer_CheckedChanged);

            rdo_refer.Anchor          = XAnchor.TR;
            rdo_refer.AutoSize        = false;
            rdo_refer.Font            = XFont.TxtFont;
            rdo_refer.Location        = new Point(rdo_unrefer.Left, rdo_unrefer.Bottom + 20);
            rdo_refer.MouseLocation   = new Point(-1, -1);
            rdo_refer.Name            = "rdo_refer";
            rdo_refer.Size            = new Size(200, 30);
            rdo_refer.TabIndex        = 3;
            rdo_refer.Text            = " RECEIPTED";
            rdo_refer.CheckedChanged += new EventHandler(Rdo_refer_CheckedChanged);

            rdo_showall.Anchor          = XAnchor.TR;
            rdo_showall.AutoSize        = false;
            rdo_showall.Font            = XFont.TxtFont;
            rdo_showall.Location        = new Point(rdo_refer.Left, rdo_refer.Bottom + 20);
            rdo_showall.MouseLocation   = new Point(-1, -1);
            rdo_showall.Name            = "rdo_showall";
            rdo_showall.Size            = new Size(200, 30);
            rdo_showall.TabIndex        = 4;
            rdo_showall.Text            = " SHOW ALL";
            rdo_showall.CheckedChanged += new EventHandler(Rdo_showall_CheckedChanged);

            rdo_notactive.Anchor          = XAnchor.TR;
            rdo_notactive.AutoSize        = false;
            rdo_notactive.Font            = XFont.TxtFont;
            rdo_notactive.Location        = new Point(rdo_showall.Left, rdo_showall.Bottom + 20);
            rdo_notactive.MouseLocation   = new Point(-1, -1);
            rdo_notactive.Name            = "rdo_notactive";
            rdo_notactive.Size            = new Size(200, 30);
            rdo_notactive.TabIndex        = 6;
            rdo_notactive.Text            = "NOT ACTIVE";
            rdo_notactive.CheckedChanged += new EventHandler(Rdo_notactive_CheckedChanged);

            #endregion [Radio btn]

            #region [btn Properties]

            btn_refresh.Font     = XFont.BtnFont;
            btn_refresh.Location = XLayout.BtnLocation(rdo_notactive.Location);
            btn_refresh.Size     = XSize.BtnOne;
            btn_refresh.TabIndex = 1;
            btn_refresh.Name     = "btn_refresh";
            btn_refresh.Text     = "&Refresh";
            btn_refresh.Themes   = XTheme.BlueBtn;
            btn_refresh.Anchor   = XAnchor.TR;
            btn_refresh.Click   += Btn_refresh_Click;

            btn_new.Font     = XFont.BtnFont;
            btn_new.Location = XLayout.BtnLocation(btn_refresh.Location);
            btn_new.Size     = XSize.BtnOne;
            btn_new.TabIndex = XTab.Index(btn_refresh.TabIndex);
            btn_new.Name     = "btn_new";
            btn_new.Text     = "&New";
            btn_new.Themes   = XTheme.BlueBtn;
            btn_new.Anchor   = XAnchor.TR;
            btn_new.Click   += Btn_new_Click;

            btn_edit.Font     = XFont.BtnFont;
            btn_edit.Location = XLayout.BtnLocation(btn_new.Location);
            btn_edit.Size     = XSize.BtnOne;
            btn_edit.TabIndex = XTab.Index(btn_new.TabIndex);
            btn_edit.Name     = "btn_edit";
            btn_edit.Text     = "&Edit";
            btn_edit.Themes   = XTheme.BlueBtn;
            btn_edit.Anchor   = XAnchor.TR;
            btn_edit.Click   += Btn_edit_Click;

            btn_delete.Font     = XFont.BtnFont;
            btn_delete.Location = XLayout.BtnLocation(btn_edit.Location);
            btn_delete.Size     = XSize.BtnOne;
            btn_delete.TabIndex = XTab.Index(btn_edit.TabIndex);
            btn_delete.Name     = "btn_delete";
            btn_delete.Text     = "&Delete";
            btn_delete.Themes   = XTheme.BlueBtn;
            btn_delete.Anchor   = XAnchor.TR;
            btn_delete.Click   += Btn_delete_Click;

            btn_print.Font     = XFont.BtnFont;
            btn_print.Location = XLayout.BtnLocation(btn_delete.Location);
            btn_print.Size     = XSize.BtnOne;
            btn_print.TabIndex = XTab.Index(btn_delete.TabIndex);
            btn_print.Name     = "btn_print";
            btn_print.Text     = "&Print";
            btn_print.Themes   = XTheme.BlueBtn;
            btn_print.Anchor   = XAnchor.TR;
            btn_print.Click   += Btn_print_Click;

            //btn_quick.Font = XFont.BtnFont;
            //btn_quick.Location = XLayout.BtnLocation(btn_print.Location);
            //btn_quick.Size = XSize.BtnOne;
            //btn_quick.TabIndex = XTab.Index(btn_print.TabIndex);
            //btn_quick.Name = "btn_quick";
            //btn_quick.Text = "&Quick RECEIPT";
            //btn_quick.Themes = XTheme.PinkBtn;
            //btn_quick.Anchor = XAnchor.TR;
            //btn_quick.Click += Btn_quick_Click;

            #endregion [btn Properties]

            //#region[Get no Panel]

            //Getno_panel.Size = new Size(300, 150);
            //Getno_panel.Location = new Point(btn_print.Left - 250, btn_print.Bottom - 40);
            ////Getno_panel.BackColor = XTheme.FPanel;
            //Getno_panel.BackColor = Color.Orange;
            //Getno_panel.Controls.Add(Getno_innerpanel);
            //Getno_innerpanel.Controls.Add(txt_getno);
            //Getno_innerpanel.Controls.Add(lbl_getno);
            //Getno_innerpanel.Controls.Add(btn_generate);

            //Getno_innerpanel.Size = new Size(295, 145);
            //Getno_innerpanel.Location = new Point(2, 2);
            //Getno_innerpanel.BackColor = Color.White;

            //lbl_getno.Font = XFont.Font_10B;
            //lbl_getno.Name = "lbl_getno";
            //lbl_getno.Text = "No";
            //lbl_getno.TextAlign = ContentAlignment.MiddleCenter;
            //lbl_getno.ForeColor = XFontColor.Lbl_ForeColor;
            //lbl_getno.Size = new Size(150, 28);
            //lbl_getno.Location = new Point(80, 20);
            //lbl_getno.BorderStyle = BorderStyle.None;
            //txt_getno.Font = XFont.TxtFont;
            //txt_getno.ForeColor = XFontColor.TxtFontColor;
            //txt_getno.BackColor = XTheme.TxtBackcolor;
            //txt_getno.Name = "txt_getno";
            //txt_getno.ReadOnlyBackColor = XTheme.TxtReadonlyBackcolor;
            //txt_getno.Size = new Size(150, 28);
            //txt_getno.Anchor = XAnchor.LT;
            //txt_getno.Location = new Point(lbl_getno.Left, lbl_getno.Bottom);

            //btn_generate.Font = XFont.BtnFont;
            //btn_generate.Location = new Point(lbl_getno.Left, lbl_getno.Bottom + 40);
            //btn_generate.Size = new Size(150, 30);
            //btn_generate.TabIndex = XTab.Index(btn_print.TabIndex);
            //btn_generate.Name = "btn_generate";
            //btn_generate.Text = "&Generate";
            //btn_generate.Themes = XTheme.RedBtn;
            //btn_generate.Anchor = XAnchor.TR;
            //btn_generate.Click += Btn_generate_Click;

            //#endregion[Get no Panel]

            #region [List Grid]

            listgrid.AllowUserToAddRows               = false;
            listgrid.AllowUserToDeleteRows            = false;
            listgrid.AllowUserToOrderColumns          = true;
            listgrid.AllowUserToResizeRows            = false;
            dataGridViewCellStyle1.BackColor          = Color.White;
            dataGridViewCellStyle1.Font               = XFont.Font_10R;
            dataGridViewCellStyle1.ForeColor          = Color.Black;
            dataGridViewCellStyle1.SelectionBackColor = Color.FromArgb(255, 255, 204);
            dataGridViewCellStyle1.SelectionForeColor = Color.FromArgb(252, 0, 11);
            dataGridViewCellStyle1.WrapMode           = DataGridViewTriState.True;
            listgrid.AlternatingRowsDefaultCellStyle  = dataGridViewCellStyle1;
            listgrid.Anchor = XAnchor.LTRB;
            listgrid.AutoSizeColumnsMode              = DataGridViewAutoSizeColumnsMode.Fill;
            listgrid.BackgroundColor                  = Color.White;
            listgrid.BorderStyle                      = BorderStyle.Fixed3D;
            listgrid.CellBorderStyle                  = DataGridViewCellBorderStyle.Custom;
            listgrid.ColumnHeadersBorderStyle         = DataGridViewHeaderBorderStyle.Custom;
            dataGridViewCellStyle2.Alignment          = DataGridViewContentAlignment.MiddleCenter;
            dataGridViewCellStyle2.BackColor          = Color.FromArgb(132, 192, 96);
            dataGridViewCellStyle2.Font               = new Font("Microsoft Sans Serif", 11.25F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle2.ForeColor          = Color.White;
            dataGridViewCellStyle2.Padding            = new Padding(3);
            dataGridViewCellStyle2.SelectionBackColor = SystemColors.Highlight;
            dataGridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText;
            dataGridViewCellStyle2.WrapMode           = DataGridViewTriState.True;
            listgrid.ColumnHeadersDefaultCellStyle    = dataGridViewCellStyle2;
            listgrid.ColumnHeadersHeightSizeMode      = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            listgrid.Cursor = Cursors.Default;
            dataGridViewCellStyle3.Alignment          = DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle3.BackColor          = Color.White;
            dataGridViewCellStyle3.Font               = XFont.Font_10R;
            dataGridViewCellStyle3.ForeColor          = Color.Black;
            dataGridViewCellStyle3.SelectionBackColor = Color.FromArgb(255, 255, 204);
            dataGridViewCellStyle3.SelectionForeColor = Color.FromArgb(252, 0, 11);
            dataGridViewCellStyle3.WrapMode           = DataGridViewTriState.False;
            listgrid.DefaultCellStyle          = dataGridViewCellStyle3;
            listgrid.EnableHeadersVisualStyles = false;
            listgrid.GridColor         = Color.SeaGreen;
            listgrid.MultiSelect       = false;
            listgrid.Name              = "listgrid";
            listgrid.ReadOnly          = true;
            listgrid.RowHeadersVisible = false;
            listgrid.SelectionMode     = DataGridViewSelectionMode.FullRowSelect;
            listgrid.Location          = XLayout.ListView;
            listgrid.Size              = XSize.ListView;
            listgrid.StandardTab       = true;
            listgrid.TabIndex          = 0;

            #endregion [List Grid]

            #region [List]

            AutoScaleDimensions = new SizeF(6F, 13F);
            AutoScaleMode       = AutoScaleMode.Font;
            Controls.Add(lpanel);
            Name = "LInward";
            Size = new Size(1000, 600);
            lpanel.ResumeLayout(false);
            linner_panel.ResumeLayout(false);
            linner_panel.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(listgrid)).EndInit();
            ResumeLayout(false);
        }
Пример #3
0
        private void Initialize()
        {
            DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();

            lpanel        = new XShadowPanel();
            linner_panel  = new Panel();
            rdo_sales     = new MRadioButton();
            rdo_Quotation = new MRadioButton();
            txt_party_id  = new LookupBox();
            lbl_party_id  = new XLabel();
            btn_close     = new CloseButton();
            lbl_header    = new Header();
            btn_print     = new OfficeButton();
            //btn_delete = new OfficeButton();
            //btn_edit = new OfficeButton();
            //btn_new = new OfficeButton();
            btn_reload = new OfficeButton();
            listgrid   = new ListGridView();
            totalgrid  = new ListGridView();
            btn_search = new OfficeButton();
            lpanel.SuspendLayout();
            linner_panel.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(listgrid)).BeginInit();
            SuspendLayout();

            lpanel.Name      = "lpanel";
            lpanel.Dock      = DockStyle.Fill;
            lpanel.Size      = XSize.FPanel;
            lpanel.Location  = XLayout.FPanel;
            lpanel.BackColor = XTheme.FPanel;
            lpanel.Controls.Add(linner_panel);
            lpanel.Controls.Add(btn_close);
            lpanel.Controls.Add(lbl_header);

            linner_panel.Anchor    = XAnchor.LTRB;
            linner_panel.BackColor = XTheme.LInnerpanel;
            linner_panel.Controls.Add(btn_search);
            linner_panel.Controls.Add(rdo_sales);
            linner_panel.Controls.Add(rdo_Quotation);
            linner_panel.Controls.Add(txt_party_id);
            linner_panel.Controls.Add(lbl_party_id);
            linner_panel.Controls.Add(btn_print);
            //linner_panel.Controls.Add(btn_delete);
            //linner_panel.Controls.Add(btn_edit);
            //linner_panel.Controls.Add(btn_new);
            linner_panel.Controls.Add(btn_reload);
            linner_panel.Controls.Add(listgrid);
            linner_panel.Controls.Add(totalgrid);
            linner_panel.Location = XLayout.LInnerPanel;
            linner_panel.Name     = "linner_panel";
            linner_panel.Size     = XSize.LInnerPanel;

            btn_close.Click += Btn_close_Click;

            lbl_header.Text = "Outstanding";

            rdo_sales.Anchor          = XAnchor.TR;
            rdo_sales.AutoSize        = false;
            rdo_sales.Font            = XFont.TxtFont;
            rdo_sales.Location        = new Point(XSize.FPanel_width - 160, 60);
            rdo_sales.MouseLocation   = new Point(-1, -1);
            rdo_sales.Name            = "chk_sales";
            rdo_sales.Size            = new Size(120, 30);
            rdo_sales.TabIndex        = 4;
            rdo_sales.Text            = " SALES";
            rdo_sales.CheckedChanged += new EventHandler(Rdo_sales_CheckedChanged);

            rdo_Quotation.Anchor          = XAnchor.TR;
            rdo_Quotation.AutoSize        = false;
            rdo_Quotation.Font            = XFont.TxtFont;
            rdo_Quotation.Location        = new Point(rdo_sales.Left, rdo_sales.Bottom + 20);
            rdo_Quotation.MouseLocation   = new Point(-1, -1);
            rdo_Quotation.Name            = "chk_sales";
            rdo_Quotation.Size            = new Size(120, 30);
            rdo_Quotation.TabIndex        = 4;
            rdo_Quotation.Text            = " QUOTATION";
            rdo_Quotation.CheckedChanged += new EventHandler(Rdo_Quotation_CheckedChanged);

            txt_party_id.Font              = XFont.TxtFont;
            txt_party_id.ForeColor         = XFontColor.TxtFontColor;
            txt_party_id.BackColor         = XTheme.TxtBackcolor;
            txt_party_id.Name              = "txt_party_id";
            txt_party_id.ReadOnlyBackColor = XTheme.TxtReadonlyBackcolor;
            txt_party_id.Size              = XSize.TwoText;
            txt_party_id.Anchor            = XAnchor.LTR;
            txt_party_id.Location          = XLayout.FirstText;
            txt_party_id.TabIndex          = 5;

            lbl_party_id.Font      = XFont.Font_10B;
            lbl_party_id.Name      = "lbl_party_id";
            lbl_party_id.Text      = "Party";
            lbl_party_id.TextAlign = ContentAlignment.MiddleCenter;
            lbl_party_id.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_party_id.Size      = XSize.OneLabel;
            lbl_party_id.Location  = XLayout.FirstLabel;

            btn_search.Font     = XFont.BtnFont;
            btn_search.Location = new Point(txt_party_id.Right + 10, txt_party_id.Top);
            btn_search.Size     = new Size(75, 26);
            btn_search.TabIndex = 1;
            btn_search.Name     = "btn_search";
            btn_search.Text     = "&Search";
            btn_search.Themes   = XTheme.YellowBtn;
            btn_search.Anchor   = XAnchor.TR;
            btn_search.Click   += Btn_search_Click;

            #region [btn Properties]

            btn_reload.Font     = XFont.BtnFont;
            btn_reload.Location = new Point(rdo_Quotation.Left, rdo_Quotation.Bottom + 20);
            btn_reload.Size     = XSize.BtnOne;
            btn_reload.TabIndex = 1;
            btn_reload.Name     = "btn_reload";
            btn_reload.Text     = "&Reolad";
            btn_reload.Themes   = XTheme.BlueBtn;
            btn_reload.Anchor   = XAnchor.TR;
            btn_reload.Click   += Btn_reload_Click;

            //btn_new.Font = XFont.BtnFont;
            //btn_new.Location = XLayout.BtnLocation(btn_reload.Location);
            //btn_new.Size = XSize.BtnOne;
            //btn_new.TabIndex = XTab.Index(btn_reload.TabIndex);
            //btn_new.Name = "btn_new";
            //btn_new.Text = "&New";
            //btn_new.Themes = XTheme.BlueBtn;
            //btn_new.Anchor = XAnchor.TR;
            //btn_new.Click += Btn_new_Click;

            //btn_edit.Font = XFont.BtnFont;
            //btn_edit.Location = XLayout.BtnLocation(btn_new.Location);
            //btn_edit.Size = XSize.BtnOne;
            //btn_edit.TabIndex = XTab.Index(btn_new.TabIndex);
            //btn_edit.Name = "btn_edit";
            //btn_edit.Text = "&Edit";
            //btn_edit.Themes = XTheme.BlueBtn;
            //btn_edit.Anchor = XAnchor.TR;
            //btn_edit.Click += Btn_edit_Click;

            //btn_delete.Font = XFont.BtnFont;
            //btn_delete.Location = XLayout.BtnLocation(btn_edit.Location);
            //btn_delete.Size = XSize.BtnOne;
            //btn_delete.TabIndex = XTab.Index(btn_edit.TabIndex);
            //btn_delete.Name = "btn_delete";
            //btn_delete.Text = "&Delete";
            //btn_delete.Themes = XTheme.BlueBtn;
            //btn_delete.Anchor = XAnchor.TR;
            //btn_delete.Click += Btn_delete_Click;

            btn_print.Font     = XFont.BtnFont;
            btn_print.Location = XLayout.BtnLocation(btn_reload.Location);
            btn_print.Size     = XSize.BtnOne;
            // btn_print.TabIndex = XTab.Index(btn_delete.TabIndex);
            btn_print.Name   = "btn_print";
            btn_print.Text   = "&Print";
            btn_print.Themes = XTheme.BlueBtn;
            btn_print.Anchor = XAnchor.TR;
            btn_print.Click += Btn_print_Click;

            #endregion [btn Properties]

            #region [List Grid]

            listgrid.AllowUserToAddRows               = false;
            listgrid.AllowUserToDeleteRows            = false;
            listgrid.AllowUserToOrderColumns          = true;
            listgrid.AllowUserToResizeRows            = false;
            dataGridViewCellStyle1.BackColor          = Color.White;
            dataGridViewCellStyle1.Font               = XFont.Font_10R;
            dataGridViewCellStyle1.ForeColor          = Color.Black;
            dataGridViewCellStyle1.SelectionBackColor = Color.FromArgb(255, 255, 204);
            dataGridViewCellStyle1.SelectionForeColor = Color.FromArgb(252, 0, 11);
            dataGridViewCellStyle1.WrapMode           = DataGridViewTriState.True;
            listgrid.AlternatingRowsDefaultCellStyle  = dataGridViewCellStyle1;
            listgrid.Anchor = XAnchor.LTRB;
            listgrid.AutoSizeColumnsMode              = DataGridViewAutoSizeColumnsMode.Fill;
            listgrid.BackgroundColor                  = Color.White;
            listgrid.BorderStyle                      = BorderStyle.Fixed3D;
            listgrid.CellBorderStyle                  = DataGridViewCellBorderStyle.Custom;
            listgrid.ColumnHeadersBorderStyle         = DataGridViewHeaderBorderStyle.Custom;
            dataGridViewCellStyle2.Alignment          = DataGridViewContentAlignment.MiddleCenter;
            dataGridViewCellStyle2.BackColor          = Color.FromArgb(132, 192, 96);
            dataGridViewCellStyle2.Font               = new Font("Microsoft Sans Serif", 11.25F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle2.ForeColor          = Color.White;
            dataGridViewCellStyle2.Padding            = new Padding(3);
            dataGridViewCellStyle2.SelectionBackColor = SystemColors.Highlight;
            dataGridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText;
            dataGridViewCellStyle2.WrapMode           = DataGridViewTriState.True;
            listgrid.ColumnHeadersDefaultCellStyle    = dataGridViewCellStyle2;
            listgrid.ColumnHeadersHeightSizeMode      = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            listgrid.Cursor = Cursors.Default;
            dataGridViewCellStyle3.Alignment          = DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle3.BackColor          = Color.White;
            dataGridViewCellStyle3.Font               = XFont.Font_10R;
            dataGridViewCellStyle3.ForeColor          = Color.Black;
            dataGridViewCellStyle3.SelectionBackColor = Color.FromArgb(255, 255, 204);
            dataGridViewCellStyle3.SelectionForeColor = Color.FromArgb(252, 0, 11);
            dataGridViewCellStyle3.WrapMode           = DataGridViewTriState.False;
            listgrid.DefaultCellStyle          = dataGridViewCellStyle3;
            listgrid.EnableHeadersVisualStyles = false;
            listgrid.GridColor         = Color.SeaGreen;
            listgrid.MultiSelect       = false;
            listgrid.Name              = "listgrid";
            listgrid.ReadOnly          = true;
            listgrid.RowHeadersVisible = false;
            listgrid.SelectionMode     = DataGridViewSelectionMode.FullRowSelect;
            listgrid.Location          = XLayout.ListView;
            listgrid.Size              = new Size(XSize.ListView_Width, XSize.ListView_Height - 40);
            listgrid.StandardTab       = true;
            listgrid.TabIndex          = 0;

            #endregion [List Grid]


            #region [totalgrid]

            totalgrid.AllowUserToAddRows              = false;
            totalgrid.AllowUserToDeleteRows           = false;
            totalgrid.AllowUserToOrderColumns         = true;
            totalgrid.AllowUserToResizeRows           = false;
            totalgrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
            totalgrid.Anchor = XAnchor.LTRB;
            totalgrid.AutoSizeColumnsMode           = DataGridViewAutoSizeColumnsMode.Fill;
            totalgrid.BackgroundColor               = Color.White;
            totalgrid.BorderStyle                   = BorderStyle.Fixed3D;
            totalgrid.CellBorderStyle               = DataGridViewCellBorderStyle.Custom;
            totalgrid.ColumnHeadersBorderStyle      = DataGridViewHeaderBorderStyle.Custom;
            totalgrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
            totalgrid.ColumnHeadersHeightSizeMode   = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            totalgrid.Cursor = Cursors.Default;

            dataGridViewCellStyle4.Alignment          = DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle4.BackColor          = Color.White;
            dataGridViewCellStyle4.Font               = XFont.Font_11R;
            dataGridViewCellStyle4.ForeColor          = Color.Black;
            dataGridViewCellStyle4.SelectionBackColor = Color.FromArgb(255, 255, 204);
            dataGridViewCellStyle4.SelectionForeColor = Color.FromArgb(252, 0, 11);
            dataGridViewCellStyle4.WrapMode           = DataGridViewTriState.False;

            totalgrid.DefaultCellStyle          = dataGridViewCellStyle4;
            totalgrid.EnableHeadersVisualStyles = false;
            totalgrid.GridColor            = Color.SeaGreen;
            totalgrid.MultiSelect          = false;
            totalgrid.Name                 = "totalgrid";
            totalgrid.ReadOnly             = true;
            totalgrid.RowHeadersVisible    = false;
            totalgrid.ColumnHeadersVisible = false;
            totalgrid.SelectionMode        = DataGridViewSelectionMode.FullRowSelect;
            totalgrid.Location             = new Point(listgrid.Left, listgrid.Bottom + 20);
            totalgrid.Size                 = new Size(XSize.ListView_Width, 7);
            totalgrid.StandardTab          = true;
            totalgrid.TabIndex             = 5;

            #endregion [totalgrid]


            AutoScaleDimensions = new SizeF(6F, 13F);
            AutoScaleMode       = AutoScaleMode.Font;
            Controls.Add(lpanel);
            Name = "LOutstanding";
            Size = new Size(1000, 600);
            lpanel.ResumeLayout(false);
            linner_panel.ResumeLayout(false);
            linner_panel.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(listgrid)).EndInit();
            ResumeLayout(false);
        }
Пример #4
0
        public override void Run(Window window)
        {
            Conformant conformant = new Conformant(window);

            conformant.Show();
            Box box = new ColoredBox(window);

            conformant.SetContent(box);
            box.Show();

            #region ThemeButton
            Box hbox = new Box(window)
            {
                IsHorizontal = true,
                WeightX      = 1,
                WeightY      = 0.2,
                AlignmentX   = -1,
                AlignmentY   = -1,
            };
            hbox.Show();
            box.PackEnd(hbox);

            var defaultColor = new MButton(window)
            {
                Text         = "default",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            var light = new MButton(window)
            {
                Text         = "light",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            var dark = new MButton(window)
            {
                Text         = "Dark",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            defaultColor.Show();
            light.Show();
            dark.Show();
            hbox.PackEnd(defaultColor);
            hbox.PackEnd(light);
            hbox.PackEnd(dark);

            defaultColor.Clicked += (s, e) => MColors.Current = MColors.Default;
            light.Clicked        += (s, e) => MColors.Current = MColors.Light;
            dark.Clicked         += (s, e) => MColors.Current = MColors.Dark;
            #endregion


            var radio = new MRadioButton(window)
            {
                StateValue   = 1,
                Text         = "group1",
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(radio);
            radio.Show();

            var radio2 = new MRadioButton(window)
            {
                StateValue   = 2,
                Text         = "group1",
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(radio2);
            radio2.Show();
            radio2.SetGroup(radio);

            var radio3 = new MRadioButton(window)
            {
                StateValue   = 3,
                Text         = "Disabled",
                IsEnabled    = false,
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(radio3);
            radio3.Show();

            var radio4 = new MRadioButton(window)
            {
                StateValue   = 4,
                Text         = "Custom Color",
                IsEnabled    = true,
                Color        = Color.FromHex("#E30425"),
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(radio4);
            radio4.Show();
        }