Ejemplo n.º 1
0
        public CustomerForm(int customerID, SqlConnectionStringBuilder sqlBuilder)
        {
            InitializeComponent();

            base.SetStyle(ControlStyles.ResizeRedraw, true);
            base.SetStyle(ControlStyles.UserPaint, true);
            base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            DoubleBuffered  = true;
            FormBorderStyle = FormBorderStyle.Sizable;

            service = new ServiceCustomerForm(sqlBuilder, customerID);

            if (formCustomizer is null)
            {
                formCustomizer = new FormCustomizer(base.Handle, this);
            }

            formCustomizer.isDialog = true;
            SetFormCustomizerInitialColors();
            service.BorderColor = formCustomizer.BorderColor;

            RegisterEvents();

            RegisterBindings();

            SetfOlvSubscriptionsAspectGetters();
            SetfOlvSubPostingAspectGetters();
            SetfOlvSpecialOrdersAspectGetters();

            UpdateFormCustomizer();
            formCustomizer.updateControlStyles(this);
        }
Ejemplo n.º 2
0
        public ConnectForm()
        {
            InitializeComponent();

            base.SetStyle(ControlStyles.ResizeRedraw, true);
            base.SetStyle(ControlStyles.UserPaint, true);
            base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            DoubleBuffered  = true;
            FormBorderStyle = FormBorderStyle.FixedSingle;

            btnConnect.Tag = this;

            service = new ServiceConnectForm();

            if (formCustomizer is null)
            {
                formCustomizer = new FormCustomizer(base.Handle, this);
            }

            SetFormCustomizerInitialColors();

            RegisterEvents();

            RegisterBindings();

            UpdateFormCustomizer();
            formCustomizer.updateControlStyles(this);
        }
Ejemplo n.º 3
0
 public static IForm <IncidentForm> BuildForm()
 {
     return(FormCustomizer.CreateCustomForm <IncidentForm>()
            .Field(nameof(Urgency))
            .Field(nameof(Description), "Please, describe you problem in few words (shortly).")
            .Confirm("Are you sure you want to create incident with DESCRIPTION: **{Description}** and URGENCY: **{Urgency}**?")
            .Build());
 }
Ejemplo n.º 4
0
 protected override void WndProc(ref Message m)
 {
     if (formCustomizer is null)
     {
         formCustomizer = new FormCustomizer(base.Handle, this);
     }
     if (formCustomizer.pWndProc(ref m))
     {
         base.WndProc(ref m);
     }
 }
Ejemplo n.º 5
0
        public Form1(SqlConnectionStringBuilder sqlBuilder)
        {
            InitializeComponent();

            base.SetStyle(ControlStyles.ResizeRedraw, true);
            base.SetStyle(ControlStyles.UserPaint, true);
            base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            DoubleBuffered  = true;
            FormBorderStyle = FormBorderStyle.Sizable;

            fOlvCustomers.Tag = this;

            service = new ServiceForm1(sqlBuilder);

            if (formCustomizer is null)
            {
                formCustomizer = new FormCustomizer(base.Handle, this);
            }

            SetFormCustomizerInitialColors();

            fOlvCustomers.AddDecoration(new EditingCellBorderDecoration {
                UseLightbox = true, BorderPen = new Pen(formCustomizer.BorderColor, 1), FillBrush = new SolidBrush(Color.FromArgb(230, 0, 0, 0)), BoundsPadding = new Size(2, 2), CornerRounding = 5
            });

            RegisterEvents();

            RegisterBindings();

            SetOlvAspectGetters();

            SetOlvAspectPutters();

            UpdateFormCustomizer();
            formCustomizer._exclusions.Add(panelStatusStrip);
            formCustomizer._exclusions.Add(labelStatusStrip);
            formCustomizer.updateControlStyles(this);
        }
Ejemplo n.º 6
0
        public Form1()
        {
            InitializeComponent();
            service = new ServiceForm1();

            Tags tag = new Tags(this, lblStatus, fastObjectListView1, SearchPanel, SearchTextBox, progressBar1);

            this.Tag = tag;
            fastObjectListView1.Tag         = tag;
            lblStatus.Tag                   = tag;
            openToolStripMenuItem.Tag       = tag;
            SearchPanel.Tag                 = tag;
            SearchTextBox.Tag               = tag;
            searchToolStripMenuItem.Tag     = tag;
            clearToolStripMenuItem.Tag      = tag;
            showImagesToolStripMenuItem.Tag = tag;

            base.SetStyle(ControlStyles.ResizeRedraw, true);
            base.SetStyle(ControlStyles.UserPaint, true);
            base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            DoubleBuffered  = true;
            FormBorderStyle = FormBorderStyle.Sizable;

            if (formCustomizer is null)
            {
                formCustomizer = new FormCustomizer(base.Handle, this);
            }

            service.LoadSettings(this);

            RegisterEvents();

            SetOlvAspectGetters();

            RegisterBindings();

            SetFormCustomizerInitialColors();

            UpdateFormCustomizer();

            formCustomizer._exclusions.Add(lblStatus);

            formCustomizer.updateControlStyles(this);

            if (olvColUnitsShipped.IsVisible)
            {
                olvColUnitsShipped.DisplayIndex = 0;
            }
            if (olvColImage.IsVisible)
            {
                olvColImage.DisplayIndex = 1;
            }
            if (olvColItemCode.IsVisible)
            {
                olvColItemCode.DisplayIndex = 2;
            }
            if (olvColDiscount.IsVisible)
            {
                olvColDiscount.DisplayIndex = 3;
            }
            if (olvColItemDesc.IsVisible)
            {
                olvColItemDesc.DisplayIndex = 4;
            }
            if (olvColCustomerFirstName.IsVisible)
            {
                olvColCustomerFirstName.DisplayIndex = 5;
            }
            if (olvColCustomerLastName.IsVisible)
            {
                olvColCustomerLastName.DisplayIndex = 6;
            }
            if (olvColCustomerEmail.IsVisible)
            {
                olvColCustomerEmail.DisplayIndex = 7;
            }
            if (olvColRetailPrice.IsVisible)
            {
                olvColRetailPrice.DisplayIndex = 8;
            }
            if (olvColUnitPrice.IsVisible)
            {
                olvColUnitPrice.DisplayIndex = 9;
            }
            if (olvColInvoiceAmount.IsVisible)
            {
                olvColInvoiceAmount.DisplayIndex = 10;
            }
            if (olvColCatagory.IsVisible)
            {
                olvColCatagory.DisplayIndex = 11;
            }
            if (olvColOrderType.IsVisible)
            {
                olvColOrderType.DisplayIndex = 12;
            }
            if (olvColPAF.IsVisible)
            {
                olvColPAF.DisplayIndex = 13;
            }
            if (olvColOrderNum.IsVisible)
            {
                olvColOrderNum.DisplayIndex = 14;
            }
            if (olvColUpc.IsVisible)
            {
                olvColUpc.DisplayIndex = 15;
            }
            if (olvColIsbn.IsVisible)
            {
                olvColIsbn.DisplayIndex = 16;
            }
            if (olvColEan.IsVisible)
            {
                olvColEan.DisplayIndex = 17;
            }
            if (olvColPO.IsVisible)
            {
                olvColPO.DisplayIndex = 18;
            }
            if (olvColAllocated.IsVisible)
            {
                olvColAllocated.DisplayIndex = 19;
            }
            if (olvColPublisher.IsVisible)
            {
                olvColPublisher.DisplayIndex = 20;
            }
            if (olvColSeriesCode.IsVisible)
            {
                olvColSeriesCode.DisplayIndex = 21;
            }


            //olvColUnitsShipped.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColImage.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColItemCode.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColDiscount.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColItemDesc.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColCustomerFirstName.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColCustomerLastName.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColCustomerEmail.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColRetailPrice.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColUnitPrice.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColInvoiceAmount.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColCatagory.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColOrderType.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColPAF.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColOrderNum.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColUpc.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColIsbn.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColEan.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColPO.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColAllocated.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColPublisher.DisplayIndex = fastObjectListView1.Columns.Count - 1;
            //olvColSeriesCode.DisplayIndex = fastObjectListView1.Columns.Count - 1;

            showImagesToolStripMenuItem.Checked     = service.ShowImages;
            downloadImagesToolStripMenuItem.Checked = service.DownloadImages;
        }