Beispiel #1
0
        public Form1()
        {
            InitializeComponent();

            CreateGraphics().CompositingQuality =
                CompositingQuality.HighQuality;

            blueColor       = Color.FromArgb(80, 114, 153);
            blueActiveColor = Color.FromArgb(104, 136, 173);
            bodyColor       = Color.FromArgb(237, 238, 240);
            grayColor       = Color.FromArgb(101, 101, 101);

            StartPosition = FormStartPosition.CenterScreen;
            Sizes();

            chatFont     = new Font("Tahoma", 9);
            boldChatFont = new Font("Tahoma", 9, FontStyle.Bold);

            header             = new Panel();
            header.Dock        = DockStyle.Top;
            header.Height      = (int)((double)Height / 12.0);
            header.BackColor   = blueColor;
            header.MouseEnter += head_MouseEnter;
            Controls.Add(header);

            Body           = new Panel();
            Body.Dock      = DockStyle.Fill;
            Body.BackColor = bodyColor;
            Controls.Add(Body);

            TitleLabel             = new Label();
            TitleLabel.Anchor      = AnchorStyles.Left;
            TitleLabel.Padding     = new Padding(8);
            TitleLabel.Text        = "Добро пожаловать в DanilaChat !";
            TitleLabel.Font        = boldChatFont;
            TitleLabel.BackColor   = Color.Transparent;
            TitleLabel.ForeColor   = Color.White;
            TitleLabel.AutoSize    = true;
            TitleLabel.MouseEnter += head_MouseEnter;

            header.Controls.Add(TitleLabel);

            BunifuImageButton closeButton = new BunifuImageButton();

            closeButton.Anchor      = AnchorStyles.Right;
            closeButton.BackColor   = Color.Transparent;
            closeButton.Size        = new Size(header.Height - 16, header.Height - 16);
            closeButton.Location    = new Point(header.Width - closeButton.Width - 10, 7);
            closeButton.Image       = Properties.Resources.vk_close;
            closeButton.ImageActive = Properties.Resources.vk_close_active;
            closeButton.Zoom        = 0;
            closeButton.Click      += CloseButton_Click;

            header.Controls.Add(closeButton);

            if (!((this is ChatScreen) || (this is AddFriendScreen)))
            {
                ShowLoginChat();
            }
        }
Beispiel #2
0
        void OnLoad()
        {
            links = LoadSkinList();
            int n = links.Count;

            for (int i = 0; i < n; i++)
            {
                BunifuImageButton tmp = new BunifuImageButton();
                tmp.Width         = 300;
                tmp.Height        = 180;
                tmp.SizeMode      = PictureBoxSizeMode.Zoom;
                tmp.ImageLocation = links[i];
                tmp.BackColor     = Color.Transparent;
                tmp.Zoom          = 5;
                tmp.Location      = SetPosition(i);

                ToolTip tooltip = new ToolTip();
                btn_list.Add(tmp);
                btn_list[i].Name   = champ + "Skin" + i.ToString();
                btn_list[i].Tag    = i;
                btn_list[i].Click += Skin_Select_Click;
                tooltip.SetToolTip(btn_list[i], System.IO.Path.GetFileName(links[i]));
                //btn_list[i].MouseHover += Skin_Select_MouseHover;
                btn_list[i].MouseEnter += Skin_Select_MouseHover;
            }
        }
Beispiel #3
0
        private void btns_MouseUp(object sender, MouseEventArgs e)
        {
            BunifuImageButton btn    = (BunifuImageButton)sender;
            string            btnhov = btn.Name + "hov";

            btn.Image = (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject(btnhov);
        }
Beispiel #4
0
        private void GetDesks()
        {
            int deskCount = deskManager.DeskCount() + 1;

            BunifuImageButton[] desks = new BunifuImageButton[deskCount];
            int x = 20, y = 30;
            var deskList = deskManager.GetAll();
            int i = 1;

            foreach (var desk in deskList)
            {
                desks[i]               = new BunifuImageButton();
                desks[i].Name          = desk.DeskName;
                desks[i].Location      = new Point(x, y);
                desks[i].ImageLocation = "E:\\Görsel\\GorselFinal\\dbfirst\\BCafe\\BCafe\\BCafe\\Resources\\table.png";
                desks[i].Visible       = true;
                desks[i].BackColor     = Color.Transparent;
                desks[i].SizeMode      = PictureBoxSizeMode.AutoSize;
                desks[i].Zoom          = 5;



                gbxDeskList.Controls.Add(desks[i]);
                desks[i].Click += this.PictureClick;
                desks[i].BringToFront();
                x += 80;
                if (i % 6 == 0)
                {
                    y += 70;
                    x  = 20;
                }
                i++;
            }
        }
        private void bunifuImageButton5_Click(object sender, EventArgs e)
        {
            foreach (Form f in PreviewFrom)
            {
                f.Close();
            }

            foreach (BunifuFlatButton b in ClassButton)
            {
                panel3.Controls.Remove(b);
            }
            ClassButton.Clear();
            PreviewFrom.Clear();
            Login login = new Login();

            panel7.Visible = false;
            resizeLocationForm(login);
            label1.Visible = false;
            label2.Visible = false;
            panel5.Visible = false;
            panel4.Controls.Remove(forward);
            panel4.Controls.Remove(backward);
            forward            = null;
            backward           = null;
            BackButton.Visible = false;
            HomeButton.Visible = false;
        }
Beispiel #6
0
        private void btns_MouseLeave(object sender, EventArgs e)
        {
            BunifuImageButton btn     = (BunifuImageButton)sender;
            string            normbtn = btn.Name;

            btn.Image = (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject(normbtn);
        }
Beispiel #7
0
        private void Skin_Select_Click(object sender, EventArgs e)
        {
            BunifuImageButton btn = (BunifuImageButton)sender;
            int          i        = (int)btn.Tag;
            SkinViewForm skinfrm  = new SkinViewForm(links[i]);

            skinfrm.Show();
        }
Beispiel #8
0
        private void Select_Champ_Click(object sender, EventArgs e)
        {
            BunifuImageButton btn = (BunifuImageButton)sender;

            select = btn.Name;
            ChampView parent = (ChampView)this.Parent;

            parent.GetChamp();
        }
Beispiel #9
0
 public FrmMain(IContainer components, Panel panelLeft, Panel panelTop, PictureBox pictureBox1, Panel panelDashBoard, BunifuImageButton bunifuImageButton1)
 {
     this.components = components;
     this.panelLeft  = panelLeft;
     panelHeader     = panelTop;
     Home            = pictureBox1;
     slideMenu       = panelDashBoard;
     buttonMenu      = bunifuImageButton1;
 }
Beispiel #10
0
 public fCaptureFingerprint(BunifuImageButton picturebox)
 {
     InitializeComponent();
     this.PictureboxMain = picturebox;
     save = true;
     new Thread(() =>
     {
         fingerprint();
     }).Start();
 }
Beispiel #11
0
        private void buttons_MouseHover(object sender, EventArgs e)
        {
            if (this.Root == null)
            {
                return;
            }

            this.Hovered           = sender as BunifuImageButton;
            this.Hovered.BackColor = HOVERED_COLOR;
        }
Beispiel #12
0
        private void chonhinhanh(object sender, EventArgs e)
        {
            BunifuImageButton img = sender as BunifuImageButton;

            mats = img.Name.ToString();
            TrangSuc ts = trangsuc.TrangSucs.FirstOrDefault(p => p.MaTS == mats);

            cbLoaiTS.SelectedValue = ts.MaLoai;
            txtTenTS.Text          = ts.TenTS;
            txtDonGia.Text         = ts.DonGia.ToString();
        }
Beispiel #13
0
        // End loading needed controls

        // Start hover with system Btn
        private void HoverSystemBtn(BunifuImageButton btn)
        {
            if (btn.BackColor == Color.FromArgb(11, 7, 17))
            {
                btn.BackColor = Color.FromArgb(32, 30, 45);
            }
            else
            {
                btn.BackColor = Color.FromArgb(11, 7, 17);
            }
        }
Beispiel #14
0
        private void chonhinhanh(object sender, EventArgs e)
        {
            BunifuImageButton img = sender as BunifuImageButton;

            madv = img.Name.ToString();
            using (quanlithucungEntities1 quanli = new quanlithucungEntities1())
            {
                DichVu dv = quanli.DichVus.FirstOrDefault(p => p.MaDV == madv);
                txttendichvu.Text = dv.TenDichVu;
                txtdongia.Text    = dv.DonGia.ToString();
            }
        }
Beispiel #15
0
        private void chonhinhanh(object sender, EventArgs e)
        {
            BunifuImageButton img = sender as BunifuImageButton;

            matc = img.Name.ToString();
            using (quanlithucungEntities1 quanli = new quanlithucungEntities1())
            {
                ThuCung thucung = quanli.ThuCungs.FirstOrDefault(p => p.MaThuCung == matc);
                cbLoaiThuCung.SelectedValue = thucung.MaLoai;
                txttenthucung.Text          = thucung.TenThuCung;
                txtdongia.Text = thucung.DonGia.ToString();
            }
        }
Beispiel #16
0
 //Метод каторый наследуют все окна события на кнопки свернуть,развернуть,закрыть
 protected void Top_Button(BunifuImageButton min, BunifuImageButton max,
                           BunifuImageButton norm, BunifuImageButton close = null)
 {
     this.max  = max;
     this.norm = norm;
     if (close != null)
     {
         close.Click += BunifuImageButton1_Close_Click;
     }
     this.max.Click  += BunifuImageButton1_Max_Click;
     this.norm.Click += BunifuImageButton2_Norm_Click;
     min.Click       += BunifuImageButton1_Min_Click;
 }
Beispiel #17
0
 public static void SetPlayStatus(ref PlayStatus currentStatus, BunifuImageButton button)
 {
     if (currentStatus == PlayStatus.PLAY)//next will be PAUSE
     {
         currentStatus = PlayStatus.PAUSE;
         button.Image  = Image.FromFile(_Environment.g_SolutionDir + "/UIDesign/Asset/button_play_background.png"); //need display play icon when paused
     }
     else if (currentStatus == PlayStatus.PAUSE)                                                                    //next will be PLAY
     {
         currentStatus = PlayStatus.PLAY;
         button.Image  = Image.FromFile(_Environment.g_SolutionDir + "/UIDesign/Asset/button_pause_background.png");//and pause the other
     }
 }
Beispiel #18
0
 public static void SetShuffleStatus(ref ShuffleStatus currentStatus, BunifuImageButton button)
 {
     if (currentStatus == ShuffleStatus.NO)//next will be YES
     {
         currentStatus = ShuffleStatus.YES;
         button.Image  = Image.FromFile(_Environment.g_SolutionDir + "/UIDesign/Asset/button_shuffle_background.png"); //display real status
     }
     else if (currentStatus == ShuffleStatus.YES)                                                                      //next will be PLAY
     {
         currentStatus = ShuffleStatus.NO;
         button.Image  = Image.FromFile(_Environment.g_SolutionDir + "/UIDesign/Asset/button_noneshuffle_background.png");//display real status
     }
 }
Beispiel #19
0
        private void btnHideShow_Click(object sender, EventArgs e)
        {
            BunifuImageButton bt = (sender as BunifuImageButton);

            if (bt.Name.Equals("0"))
            {
                bt.Name = "1"; bt.Image = Properties.Resources.Next; animation.ShowSync(panelShow); txtFind.Focus();
            }
            else
            {
                bt.Name = "0"; bt.Image = Properties.Resources.Back; animation.HideSync(panelShow);
            }
        }
Beispiel #20
0
        private void Like_project(object sender, EventArgs e)
        {
            BunifuImageButton button = sender as BunifuImageButton;

            if (button == NotLikedProject)
            {
                button.Image = LikedProject.Image;
            }
            else
            {
                button.Image = NotLikedProject.Image;
            }
        }
Beispiel #21
0
        private void OpenFolder_Click(object sender, EventArgs e)
        {
            BunifuImageButton btn = sender as BunifuImageButton;

            string fileName = openFolder();
            int    index    = btnOpenFolder.FindIndex(data => data == btn);

            if (!fileName.Equals(""))
            {
                pictureOption[index].Image = Image.FromFile(fileName);
                fileNames[index]           = fileName;
            }
        }
Beispiel #22
0
        private void chonhinhanh(object sender, EventArgs e)
        {
            BunifuImageButton img = sender as BunifuImageButton;

            matp = img.Name.ToString();
            using (quanlithucungEntities1 quanli = new quanlithucungEntities1())
            {
                THUCPHAM thucpham = quanli.THUCPHAMs.FirstOrDefault(p => p.Mathucpham == matp);
                cbLoaiThucPham.SelectedValue = thucpham.MaLoai;
                txttenthucpham.Text          = thucpham.Tenthucpham;
                txtdongia.Text = thucpham.dongia.ToString();
            }
        }
Beispiel #23
0
        private void chonhinhanh(object sender, EventArgs e)
        {
            BunifuImageButton img = sender as BunifuImageButton;

            mapk = img.Name.ToString();
            using (quanlithucungEntities1 quanli = new quanlithucungEntities1())
            {
                PHUKIEN phukien = quanli.PHUKIENs.FirstOrDefault(p => p.Maphukien == mapk);
                cbLoaiPhuKien.SelectedValue = phukien.MaLoai;
                txttenphukien.Text          = phukien.Tenphukien;
                txtdongia.Text = phukien.dongia.ToString();
            }
        }
Beispiel #24
0
        private void bunifuImageButton2_Click(object sender, EventArgs e)
        {
            BunifuImageButton button = sender as BunifuImageButton;

            if (!Liked)
            {
                button.Image = bunifuImageButton1.Image;
                Liked        = true;
            }
            else
            {
                button.Image = bunifuImageButton2.Image;
                Liked        = false;
            }
        }
Beispiel #25
0
        private void button_MouseLeave(object sender, EventArgs e)
        {
            if (this.Root == null)
            {
                return;
            }

            if (this._activated == sender as BunifuImageButton)
            {
                this._activated.BackColor = ACTIVATED_COLOR;
            }
            else
            {
                this.Hovered = null;
            }
        }
Beispiel #26
0
        private void btnDeleteMonClick(object sender, EventArgs e)
        {
            BunifuImageButton btnDeleteMonClick = sender as BunifuImageButton;

            if (cthdkhbll.deleteChiTietHoaDon(Convert.ToInt32(lbHoaDonID.Text), btnDeleteMonClick.Name.ToString()))
            {
                MessageBox.Show("xóa đồ ăn trong Hóa đơn thành công !!!");
            }
            else
            {
                MessageBox.Show("không thành công !!! vui lòng liên hệ đến Hiền");
            }

            LoadHoaDonKhachHang(Convert.ToInt32(lbHoaDonID.Text));
            LoadButtonTheBan();
            UpdateLabelGiaTam(lbTenBan.Text);
        }
Beispiel #27
0
        private void lblDetail_Click(object sender, EventArgs e)
        {
            OffVisibleOp();
            BunifuImageButton button = sender as BunifuImageButton;
            int index = imageButtons.FindIndex(x => x.Equals(button));

            if (index == -1)
            {
                return;
            }

            DisplayOption(QA.getInstance().getQuestion(index), QA.getInstance().check[index], QA.getInstance().optionMix[index]);
            resultForm.setContentQuestion(index);
            //pnRoot.Controls.Remove(pnQss[index]);
            //this.PanelQsClick = pnQss[index];
            //SetContentOption(question[index], check[index]);
        }
        private void btnRedesSociales_Click(object sender, EventArgs e)
        {
            BunifuImageButton btn = sender as BunifuImageButton;

            if (btn.Name == btnFacebook.Name)
            {
                System.Diagnostics.Process.Start("www.facebook.cl");
            }
            else if (btn.Name == btnTwitter.Name)
            {
                System.Diagnostics.Process.Start("www.twitter.com");
            }
            else if (btn.Name == btnInstagram.Name)
            {
                System.Diagnostics.Process.Start("www.instagram..com");
            }
        }
        private BunifuImageButton addImageButtonIntoPanel()
        {
            BunifuImageButton ptcContent = new BunifuImageButton();

            ptcContent.BackColor   = System.Drawing.Color.Transparent;
            ptcContent.ImageActive = null;
            ptcContent.Location    = new System.Drawing.Point(68, 14);
            ptcContent.Size        = new System.Drawing.Size(177, 96);
            ptcContent.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            ptcContent.TabStop     = false;
            ptcContent.Zoom        = 10;
            ptcContent.Click      += new System.EventHandler(this.imageButton_Click);
            ptcContent.MouseHover += new System.EventHandler(this.ptcContent_MouseHover);

            imageButtons.Add(ptcContent);

            return(ptcContent);
        }
        private BunifuImageButton generateUnavailabilityIcon(int i)
        {
            BunifuImageButton icon = new BunifuImageButton();

            icon.BackColor   = System.Drawing.Color.Transparent;
            icon.Name        = "bImage_AvailableIcon" + i.ToString();
            icon.Image       = global::Main.Properties.Resources.notAvailable;
            icon.Location    = new Point(113, 145);
            icon.ImageActive = null;
            icon.Size        = new System.Drawing.Size(32, 31);
            icon.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            icon.TabIndex    = 1;
            icon.TabStop     = false;
            icon.Zoom        = 10;


            return(icon);
        }