Esempio n. 1
0
        private void Form_Load(object sender, EventArgs e)
        {
            // Mousedown anywhere to drag
            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form_MouseDown);

            #region Fade Box
            TFLP           = new FadeControl();
            TFLP.Size      = new Size(this.Width - 2, this.Height - 2);
            TFLP.Location  = new Point(999, 999);
            TFLP.Visible   = true;
            TFLP.BackColor = this.BackColor;
            TFLP.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            TFLP.AllowDrop = true;
            TFLP.BringToFront();
            this.Controls.Add(TFLP);
            TFLP.BringToFront();

            TFLP.Opacity = 80;
            #endregion

            foreach (Control c in this.Controls)
            {
                if (c is Button)
                {
                    Button g = (Button)c;
                    g.TabStop   = false;
                    g.FlatStyle = FlatStyle.Flat;
                    g.FlatAppearance.BorderSize  = 0;
                    g.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
                }
            }
        }
Esempio n. 2
0
        private void Form_Load(object sender, EventArgs e)
        {
            // Mousedown anywhere to drag
            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form_MouseDown);

            #region Fade Box
            TFLP           = new FadeControl();
            TFLP.Size      = new Size(this.Width - 2, this.Height - 2);
            TFLP.Location  = new Point(999, 999);
            TFLP.Visible   = true;
            TFLP.BackColor = this.BackColor;
            TFLP.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            TFLP.AllowDrop = true;
            TFLP.BringToFront();
            this.Controls.Add(TFLP);
            TFLP.BringToFront();

            TFLP.Opacity = 80;
            #endregion

            foreach (Control c in this.Controls)
            {
                if (c is Button)
                {
                    Button g = (Button)c;
                    g.TabStop   = false;
                    g.FlatStyle = FlatStyle.Flat;
                    g.FlatAppearance.BorderSize  = 0;
                    g.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
                }
            }

            int count = 0;
            // Set existing charges
            foreach (DieCharge DC in Ref_List)
            {
                DieCharge Ref_DC = Transferred_List.FirstOrDefault(x => x.Name == DC.Name);

                if (Ref_DC != null)
                {
                    DC.Notes    = Ref_DC.Notes;
                    DC.Quantity = Ref_DC.Quantity;
                }

                Create_Charge_Entry(DC, count++);
            }
            if (count <= 6)
            {
                this.Width = this.Width / 2;
            }
            this.Width = this.Width - 20;

            TFLP.Size = new Size(this.Width - 2, this.Height - 2);
        }
        private void Form_Load(object sender, EventArgs e)
        {
            #region Fade Box
            TFLP           = new FadeControl();
            TFLP.Size      = new Size(this.Width - 2, this.Height - 2);
            TFLP.Location  = new Point(999, 999);
            TFLP.Visible   = true;
            TFLP.BackColor = this.BackColor;
            TFLP.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            TFLP.AllowDrop = true;
            TFLP.BringToFront();
            this.Controls.Add(TFLP);
            TFLP.BringToFront();

            TFLP.Opacity = 80;
            #endregion

            foreach (Control c in this.Controls)
            {
                if (c is Button)
                {
                    Button g = (Button)c;
                    g.TabStop   = false;
                    g.FlatStyle = FlatStyle.Flat;
                    g.FlatAppearance.BorderSize  = 0;
                    g.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
                }
            }

            if (label2.Text.Contains("atabase"))
            {
                foreach (Database plant in Enum.GetValues(typeof(Database)))
                {
                    db.Items.Add(plant.ToString());
                }
            }
            else
            {
                if (hasAllCustomersOption)
                {
                    db.Items.Add("All Customers");
                }
                else
                {
                    //label16.Text = "IMPORT";
                }
                custList.OrderBy(x => x.Name).ToList().ForEach(x => db.Items.Add(x.Name + " (" + x.custCode + ")"));
            }

            db.SelectedIndex = 0;
        }
Esempio n. 4
0
        private void Form_Load(object sender, EventArgs e)
        {
            dia.Click += dia_Click;
            thk.Click += dia_Click;

            #region Fade Box
            TFLP           = new FadeControl();
            TFLP.Size      = new Size(this.Width - 2, this.Height - 2);
            TFLP.Location  = new Point(999, 999);
            TFLP.Visible   = true;
            TFLP.BackColor = this.BackColor;
            TFLP.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            TFLP.AllowDrop = true;
            TFLP.BringToFront();
            this.Controls.Add(TFLP);
            TFLP.BringToFront();

            TFLP.Opacity = 80;
            #endregion

            foreach (Control c in this.Controls)
            {
                if (c is Button)
                {
                    Button g = (Button)c;
                    g.TabStop   = false;
                    g.FlatStyle = FlatStyle.Flat;
                    g.FlatAppearance.BorderSize  = 0;
                    g.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
                }
            }

            addSolidButton.Enabled = !parent.DisableEdit;


            Loaded = true;

            if (Ref_Support != null)
            {
                Ref_BaseCharge = getDiaThk(Convert.ToDouble(dia.Text), Convert.ToDouble(thk.Text), Convert.ToDouble(innerd.Text)) ?? new baseCharges();
                Calculate_Die_Price(true);
            }

            showOdds.Visible   = parent.ShowOdds;
            showOddThk.Visible = parent.ShowOdds;


            panel1.Location = new Point(5, 174);
        }
Esempio n. 5
0
        private void Form_Load(object sender, EventArgs e)
        {
            // Mousedown anywhere to drag
            //this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form_MouseDown);

            #region Fade Box
            TFLP           = new FadeControl();
            TFLP.Size      = new Size(this.Width - 2, this.Height - 2);
            TFLP.Location  = new Point(999, 999);
            TFLP.Visible   = true;
            TFLP.BackColor = this.BackColor;
            TFLP.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            TFLP.AllowDrop = true;
            TFLP.BringToFront();
            this.Controls.Add(TFLP);
            TFLP.BringToFront();

            TFLP.Opacity = 80;
            #endregion

            foreach (Control c in this.Controls)
            {
                if (c is Button)
                {
                    Button g = (Button)c;
                    g.TabStop   = false;
                    g.FlatStyle = FlatStyle.Flat;
                    g.FlatAppearance.BorderSize  = 0;
                    g.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
                }
            }

            parent.Order_List        = parent.Order_List.OrderByDescending(x => x.Date).ToList();
            Pages_Required           = Convert.ToInt32(Math.Ceiling((decimal)parent.Order_List.Count() / (decimal)Entries_Per_Page));
            next_page_button.Visible = Pages_Required > 1;
        }
        private void Form_Load(object sender, EventArgs e)
        {
            // Mousedown anywhere to drag
            //this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form_MouseDown);

            #region Fade Box
            TFLP           = new FadeControl();
            TFLP.Size      = new Size(this.Width - 2, this.Height - 2);
            TFLP.Location  = new Point(999, 999);
            TFLP.Visible   = true;
            TFLP.BackColor = this.BackColor;
            TFLP.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            TFLP.AllowDrop = true;
            TFLP.BringToFront();
            this.Controls.Add(TFLP);
            TFLP.BringToFront();

            TFLP.Opacity = 80;
            #endregion

            foreach (Control c in this.Controls)
            {
                if (c is Button)
                {
                    Button g = (Button)c;
                    g.TabStop   = false;
                    g.FlatStyle = FlatStyle.Flat;
                    g.FlatAppearance.BorderSize  = 0;
                    g.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
                }
            }

            dataGridView1.KeyUp += dataGridView1_KeyUp;

            dataGridView1.ShowCellToolTips = false;

            dataGridView1.CellClick        += new DataGridViewCellEventHandler(dataGridView1_CellContentClick);
            dataGridView1.SelectionChanged += new EventHandler(dataGridView1_SelectionChanged);
            dataGridView1.GridColor         = Color.White;
            dataGridView1.RowHeadersDefaultCellStyle.BackColor = Color.FromArgb(98, 110, 110);

            #region Add delete buttons
            DataGridViewButtonColumn buttons = new DataGridViewButtonColumn();
            {
                buttons.HeaderText = "";
                buttons.Text       = "X";// "🔍";
                buttons.UseColumnTextForButtonValue = true;
                buttons.AutoSizeMode =
                    DataGridViewAutoSizeColumnMode.None;
                buttons.Width     = 23;
                buttons.FlatStyle = FlatStyle.Flat;
                buttons.CellTemplate.Style.BackColor = Color.FromArgb(64, 64, 64);
                buttons.CellTemplate.Style.ForeColor = Color.White;
                buttons.DisplayIndex = 2;
            }
            dataGridView1.Columns.Insert(2, buttons);
            #endregion

            dieTypes.SelectedIndexChanged -= dieTypes_SelectedIndexChanged;

            // Populate dies
            foreach (DieType dt in Enum.GetValues(typeof(DieType)))
            {
                dieTypes.Items.Add(dt);
            }

            dieTypes.SelectedIndex = 0;

            Populate_Charges(dieTypes.Text);
            dieTypes.SelectedIndexChanged += dieTypes_SelectedIndexChanged;
        }
Esempio n. 7
0
        private void Form_Load(object sender, EventArgs e)
        {
            // Mousedown anywhere to drag
            //this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form_MouseDown);
            label9.MouseClick += label9_MouseClick;
            dia.Click         += dia_Click;
            thk.Click         += dia_Click;

            addSolidButton.Enabled = !parent.DisableEdit;

            #region Fade Box
            TFLP           = new FadeControl();
            TFLP.Size      = new Size(this.Width - 2, this.Height - 2);
            TFLP.Location  = new Point(999, 999);
            TFLP.Visible   = true;
            TFLP.BackColor = this.BackColor;
            TFLP.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            TFLP.AllowDrop = true;
            TFLP.BringToFront();
            this.Controls.Add(TFLP);
            TFLP.BringToFront();

            TFLP.Opacity = 80;
            #endregion

            foreach (Control c in this.Controls)
            {
                if (c is Button)
                {
                    Button g = (Button)c;
                    g.TabStop   = false;
                    g.FlatStyle = FlatStyle.Flat;
                    g.FlatAppearance.BorderSize  = 0;
                    g.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
                }
            }

            cavities.Items.Add("1");
            cavities.Items.Add("2");
            cavities.Items.Add("3");
            cavities.Items.Add("4");
            cavities.Items.Add("5");
            cavities.Items.Add("6");
            cavities.Items.Add("8");
            cavities.Items.Add("10");
            cavities.Items.Add("12");

            cavities.SelectedIndex = 0;

            if (Ref_Hollow != null)
            {
                Ref_BaseCharge = getDiaThk(Convert.ToDouble(dia.Text), Convert.ToDouble(thk.Text)) ?? new baseCharges();
                Calculate_Die_Price(true);
                cavities.Text = Ref_Hollow.HoleCount.ToString();
            }

            showOdds.Visible   = parent.ShowOdds;
            showOddThk.Visible = parent.ShowOdds;

            if (exPart_backerCheck.Checked || exPart_feederCheck.Checked || exPart_bolsterCheck.Checked || exPart_subbolsterCheck.Checked)
            {
                button4.PerformClick();
            }

            panel1.Location = new Point(5, 174);

            Loaded = true;
        }
        private void Form_Load(object sender, EventArgs e)
        {
            // set panel scrolling features
            bufferedPanel1.AutoScroll = false;
            bufferedPanel1.HorizontalScroll.Enabled = false;
            bufferedPanel1.HorizontalScroll.Visible = false;
            bufferedPanel1.HorizontalScroll.Maximum = 0;
            bufferedPanel1.AutoScroll = true;

            // Mousedown anywhere to drag
            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form_MouseDown);

            if (parent.isMetric)
            {
                MetricFactor = 25.4;
            }

            #region Fade Box
            TFLP           = new FadeControl();
            TFLP.Size      = new Size(this.Width - 2, this.Height - 2);
            TFLP.Location  = new Point(999, 999);
            TFLP.Visible   = true;
            TFLP.BackColor = this.BackColor;
            TFLP.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            TFLP.AllowDrop = true;
            TFLP.BringToFront();
            this.Controls.Add(TFLP);
            TFLP.BringToFront();

            TFLP.Opacity = 80;
            #endregion

            foreach (Control c in this.Controls)
            {
                if (c is Button)
                {
                    Button g = (Button)c;
                    g.TabStop   = false;
                    g.FlatStyle = FlatStyle.Flat;
                    g.FlatAppearance.BorderSize  = 0;
                    g.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //transparent
                }
            }

            // Set company name
            label6.Text = parent.Current_Customer.Name.ToUpper();


            // Set date
            Ref_Order   = parent.Order_List.FirstOrDefault(x => x.ID == (externalID != "" ? externalID : parent.CurrentID));
            label8.Text = Ref_Order == null?DateTime.Now.ToShortDateString() : Ref_Order.Date.ToShortDateString();

            if (Ref_Order != null)
            {
                req.Text              = Ref_Order.Requisitioner;
                auth.Text             = Ref_Order.Authorizer;
                dateTimePicker1.Value = Convert.ToDateTime(Ref_Order.Due);
                po.Text = Ref_Order.PO;
            }
            else
            {
                req.Text              = parent.Req;
                auth.Text             = parent.Auth;
                dateTimePicker1.Value = parent.Due == "" ? DateTime.Now : Convert.ToDateTime(parent.Due);
                po.Text = parent.PO;
            }

            if (Highlight_Error)
            {
                foreach (Control c in this.Controls)
                {
                    if (c is TextBox)
                    {
                        TextBox temp = (TextBox)c;
                        if (temp.Text == "" && !temp.Name.Contains("ox"))
                        {
                            temp.BackColor = Color.Maroon;
                        }
                    }
                }

                // Show create PO button
                label22.Visible        = true;
                createPOButton.Visible = true;
            }

            req.Enabled = auth.Enabled = dateTimePicker1.Enabled = po.Enabled = (!parent.DisableEdit && externalID == "");

            Invalidate();
            bufferedPanel3.Paint += new PaintEventHandler(panel1_Paint);
            bufferedPanel3.Invalidate();
        }