Example #1
0
        public AdminForm()
        {
            InitializeComponent();
            db = new DataBaseIM();
            Exit.MouseClick += (s, e) => { this.Hide(); AccountLoginForm ac = new AccountLoginForm(); ac.Show(); };
            //Border,Size,Location Form
            StandardFormSettings standartForm = new StandardFormSettings(this);

            this.BackColor      = Color.FromArgb(255, 255, 255);
            MainPanel.BackColor = Color.FromArgb(255, 255, 255);
            MainPanel.Location  = new Point((this.Width - 1320) / 2, 40);
            MainPanel.Size      = new Size(this.Width - (this.Width - 1320), this.Height - (this.Height - 994));

            panelProducts.Visible  = true; panelOrders.Visible = false; panelDataCustumer.Visible = false; panelDataMenegers.Visible = false; panelUsers.Visible = false;
            panelProducts.Location = new Point(294, 150);
            panelProducts.Size     = new Size(1026, 850);
            db.Products.Load();
            dataGridViewPdoructs.DataSource       = db.Products.Local.ToBindingList();
            dataGridViewPdoructs.Columns[0].Width = 50;
            dataGridViewPdoructs.Columns[1].Width = 400;
            dataGridViewPdoructs.Columns[2].Width = 50;
            dataGridViewPdoructs.Columns[3].Width = 65;
            dataGridViewPdoructs.Columns[4].Width = 300;
            dataGridViewPdoructs.Columns[5].Width = 100;
        }
Example #2
0
        public AccountLoginForm()
        {
            InitializeComponent();
            //Border,Size,Location Form
            StandardFormSettings standartForm = new StandardFormSettings(this);

            standartForm.SetBackgroundImage("Images/LoginBackgroundImage.jpg", new Uri(@"https://pixabay.com/get/57e7d3444850b114f0db8474c22a3663143ad6e05b5371497027.jpg"));
            ToLoginToRegisterButtons();
            PanelSettings();
            loginButton.MouseClick        += loginButton_MouseClick;
            registrationButton.MouseClick += registrationButton_MouseClick;
            buttonFiller_DB.Location       = new Point(this.Width - 300, this.Height - 150);
        }