예제 #1
0
 private void labelFASAP18_MouseLeave(object sender, EventArgs e)
 {
     LabelFASAP lb = sender as LabelFASAP;
     Cursor = Cursors.Default;
     lb.Image = Resources.DarkButton___Copy;
     lb.ForeColor = Color.Khaki;
 }
예제 #2
0
        // labelite za Najbarani restrani sodrzat samo iminja na restorani
        // zatoa vo listata so restorani go baram restoranot koj go ima imeto na labelata sto e kliknata

        private void lblNaj1_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                String   restIme = lb.LblObject as String;
                Restoran obj     = null;
                foreach (Restoran r in Restorani)
                {
                    if (restIme.Equals(r.Ime))
                    {
                        obj = r; break;
                    }
                }
                IzvrsuvanjeNaracka fasapNaracka = new IzvrsuvanjeNaracka(obj, Conn);
                if (fasapNaracka.ShowDialog() == DialogResult.OK)
                {
                    refresh();
                }
                else
                {
                    refresh();
                }
            }
        }
예제 #3
0
        private void lblMeni1_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null && lb.LblObject is Meni)
            {
                CurrMenu = Restoran.GlavnoMeni;
                PostaviPateka();
                indStavka = 0;
                CurrMenu  = lb.LblObject as Meni;
                LabelFASAP label1 = new LabelFASAP();
                LabelFASAP label2 = new LabelFASAP();
                flowLayoutPanelFasap1.Controls.Add(label2);
                flowLayoutPanelFasap1.Controls.Add(label1);
                label1.Font = new Font("Trebuchet MS", 12, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                label1.UpdateObject(CurrMenu);
                label1.ForeColor   = Color.Gold;
                label1.MouseEnter += new EventHandler(lblOsnovnoMeni_MouseEnter);
                label1.MouseLeave += new EventHandler(lblOsnovnoMeni_MouseLeave);
                label1.Click      += new EventHandler(lblOsnovnoMeni_Click);
                label1.AutoSize    = true;
                label2.Font        = new Font("Trebuchet MS", 12, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                label2.ForeColor   = Color.White;
                label2.Text        = ">>";
                label2.AutoSize    = true;
                flowLayoutPanelFasap1.Invalidate(true);
            }
            this.PopolniListaStavki();
        }
예제 #4
0
        private void lblStavka1_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                MenuComponent mc = lb.LblObject as MenuComponent;

                if (mc is Meni)
                {
                    CurrMenu = mc;
                    if (lb.LblObject != null && lb.LblObject is Meni)
                    {
                        indMeni  = 0;
                        CurrMenu = lb.LblObject as Meni;
                        LabelFASAP label1 = new LabelFASAP();
                        LabelFASAP label2 = new LabelFASAP();
                        flowLayoutPanelFasap1.Controls.Add(label2);
                        flowLayoutPanelFasap1.Controls.Add(label1);
                        label1.Font = new Font("Trebuchet MS", 12, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                        label1.UpdateObject(CurrMenu);
                        label1.ForeColor   = Color.Gold;
                        label1.MouseEnter += new EventHandler(lblOsnovnoMeni_MouseEnter);
                        label1.MouseLeave += new EventHandler(lblOsnovnoMeni_MouseLeave);
                        label1.Click      += new EventHandler(lblOsnovnoMeni_Click);
                        label1.AutoSize    = true;
                        label2.Font        = new Font("Trebuchet MS", 12, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                        label2.ForeColor   = Color.White;
                        label2.Text        = ">>";
                        label2.AutoSize    = true;
                        flowLayoutPanelFasap1.Invalidate(true);
                    }
                    PopolniListaStavki();
                    return;
                }
                try
                {
                    CurrItem = mc.GetReference(CurrItem);
                }
                catch (Exception ex)
                {
                    lblErrorMessage.Text = String.Format("{0}   ", ex.Message);
                    timer1.Stop();
                    errorMessageTime        = 3;
                    lblErrorMessage.Visible = true;
                    timer1.Start();
                }
            }
            if (CurrItem != null)
            {
                lblImeStavka.UpdateObject(CurrItem);
                try
                {
                    lblCenaProizvod.Text = String.Format("{0} ден.", CurrItem.ComputeCost().ToString());
                }
                catch (Exception)
                {
                }
            }
        }
예제 #5
0
 private void labelFASAP18_MouseEnter(object sender, EventArgs e)
 {
     LabelFASAP lb = sender as LabelFASAP;
     Cursor = Cursors.Hand;
     lb.Image = Resources.LightButton___Copy;
     lb.ForeColor = Color.SaddleBrown;
 }
예제 #6
0
 private void lblMeni1_MouseLeave(object sender, EventArgs e)
 {
     LabelFASAP lb = sender as LabelFASAP;
     if (lb.LblObject != null)
     {
         Cursor = Cursors.Default;
         lb.Font = new Font("Trebuchet MS", 18, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
     }
 }
예제 #7
0
 private void lbl1_Click(object sender, EventArgs e)
 {
     LabelFASAP lb = sender as LabelFASAP;
     if (lb.LblObject != null)
     {
         this.CurrentEmp = lb.LblObject as VrabotenInfo;
         this.MarkSelection();
         this.PopolniVraboten();
     }
 }
예제 #8
0
        private void lbl1_DoubleClick(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                IzvrsuvanjeNaracka naracka = new IzvrsuvanjeNaracka(Restoran, Conn);
                naracka.Show();
            }
        }
예제 #9
0
        private void lblOsnovnoMeni_MouseEnter(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                Cursor       = Cursors.Hand;
                lb.Image     = Resources.LabelBackgroundSelected;
                lb.ForeColor = Color.SaddleBrown;
            }
        }
예제 #10
0
        private void lblOsnovnoMeni_MouseLeave(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                Cursor       = Cursors.Default;
                lb.Image     = Resources.LabelBackground2;
                lb.ForeColor = Color.Gold;
            }
        }
예제 #11
0
        private void lbl1_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                CurrNaracka = lb.LblObject as Naracka;
                indStavki   = 0;
                PostaviStavki();
                PostaviNaracki();
            }
        }
예제 #12
0
        private void lblOsnovnoMeni_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            indStavka = 0;

            if (lb.LblObject != null && lb.LblObject is Meni)
            {
                CurrMenu = lb.LblObject as Meni;
                PostaviPateka();
                PopolniListaStavki();
            }
        }
예제 #13
0
        private void lblKat1_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                this.tekovnaKat = lb.LblObject as String;
                MarkSelection();
                indexR = 0;
                FiltrirajRestorani();
            }
            // MessageBox.Show("Tekoven grad: " + tekovenGrad + "tekovna k: " + tekovnaKat);
        }
예제 #14
0
        private void lblNaj5_MouseEnter(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb == null)
            {
                MessageBox.Show("Ednakvo na null vo MouseEnter");
            }
            if (lb.LblObject != null)
            {
                Cursor  = Cursors.Hand;
                lb.Font = new Font("Trebuchet MS", 19, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            }
        }
예제 #15
0
 private void SetObject(LabelFASAP fs, Object obj)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (fs.InvokeRequired)
     {
         SetObjectCallback d = new SetObjectCallback(SetObject);
         this.Invoke(d, new object[] { fs, obj });
     }
     else
     {
         fs.UpdateObject(obj);
     }
 }
예제 #16
0
        private void lblImeStavka_MouseHover(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                MenuComponent mc = lb.LblObject as MenuComponent;
                if (mc.GetDescription() != null && mc.GetDescription().Trim() != "")
                {
                    lblDescription.Location = Cursor.Position + new Size(10, 30);
                    lblDescription.Text     = mc.GetDescription() + "  ";
                    lblDescription.Visible  = true;
                }
            }
        }
예제 #17
0
        private void lblKupeno5_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                foreach (var obj in ListaKupeni)
                {
                    obj.Image     = Resources.LabelBackground2;
                    obj.ForeColor = Color.White;
                }
                CurrOrderComponent = lb.LblObject as OrderComponent;
                lb.Image           = Resources.LabelBackgroundSelected;
                lb.ForeColor       = Color.SaddleBrown;
            }
        }
예제 #18
0
        private void lblMeni1_MouseEnter(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                Cursor = Cursors.Hand;
                if (lb.LblObject is Meni)
                {
                    lb.Font = new Font("Trebuchet MS", 17, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                }
                else
                {
                    lb.Font = new Font("Trebuchet MS", 17, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                }
            }
        }
예제 #19
0
        private void lblMeni1_MouseLeave(object sender, EventArgs e)
        {
            lblDescription.Visible = false;
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                Cursor = Cursors.Default;
                if (lb.LblObject is Meni)
                {
                    lb.Font = new Font("Trebuchet MS", 16, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                }
                else
                {
                    lb.Font = new Font("Trebuchet MS", 16, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                }
            }
        }
예제 #20
0
        private void lblRest1_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                Restoran           obj          = lb.LblObject as Restoran;
                IzvrsuvanjeNaracka fasapNaracka = new IzvrsuvanjeNaracka(obj, Conn);
                if (fasapNaracka.ShowDialog() == DialogResult.OK)
                {
                    refresh();
                }
                else
                {
                    refresh();
                }
            }
        }
예제 #21
0
        private void lblMeni1_MouseLeave(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb == null)
            {
                MessageBox.Show("Ednakvo na null vo MouseLeave");
            }
            if (lb.LblObject != null)
            {
                Cursor = Cursors.Default;
                if (lb.LblObject is Restoran)
                {
                    lb.Font = new Font("Trebuchet MS", 18, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                }
                else
                {
                    lb.Font = new Font("Trebuchet MS", 18, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                }
            }
        }
예제 #22
0
        private void lblStavka1_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                if (IsChanged)
                {
                    MessageBoxForm mbf = new MessageBoxForm("Имате несочувани промени. Дали сакате да ги сочувате?");
                    if (mbf.ShowDialog() == DialogResult.Yes)
                    {
                        SocuvajPromeni();
                    }
                    else
                    {
                        IsChanged = false;
                    }
                }
                SelectedComponent = lb.LblObject as MenuComponent;
                PopolniListaMenija();
            }
        }
예제 #23
0
        private void lbl1_Click(object sender, EventArgs e)
        {
            LabelFASAP lb = sender as LabelFASAP;

            if (lb.LblObject != null)
            {
                textBox1.Visible = false;
                this.Focus();
                textBox1.Visible = true;
                Restoran         = lb.LblObject as Restoran;
                Thread oThread = new Thread(new ThreadStart(PostaviSlobodniMasi));
                oThread.Start();
                CurrKontakt = 0;
                foreach (var obj in labeli)
                {
                    obj.Image     = Resources.LabelBackground2;
                    obj.ForeColor = Color.Gold;
                }
                lb.Image     = Resources.LabelBackgroundSelected;
                lb.ForeColor = Color.SaddleBrown;
                PostaviLabeli();
            }
        }