Exemple #1
0
        private void BursaSubesi_Click(object sender, EventArgs e)
        {
            Globals.Branch = BursaSubesi.Text;
            DrinkSelection ds = new DrinkSelection();

            ds.ShowDialog();
        }
Exemple #2
0
        private void YalovaSube_Click(object sender, EventArgs e)
        {
            Globals.Branch = YalovaSube.Text;
            DrinkSelection ds = new DrinkSelection();

            ds.ShowDialog();
        }
Exemple #3
0
 public Command(DrinkSelection ds, string text, double x, Receiver receiver)
 {
     Text          = text;
     X             = x;
     this.ds       = ds;
     this.receiver = receiver;
 }
Exemple #4
0
        private void SaveBtn_Click(object sender, EventArgs e)
        {
            string added   = "";
            string deleted = "";

            if (AddBeverageCB.SelectedItem != null)
            {
                added = AddBeverageCB.SelectedItem.ToString();
            }
            if (DeleteBeverageCB.SelectedItem != null)
            {
                deleted = DeleteBeverageCB.SelectedItem.ToString();
            }
            List <Coffee> raisedCoffee = new List <Coffee>();

            if (EsspressoChB.Checked == true)
            {
                raisedCoffee.Add(new Esspresso());
            }
            if (FilteredCoffeeChB.Checked == true)
            {
                raisedCoffee.Add(new FilteredCoffee());
            }
            if (FrappuccinoChB.Checked == true)
            {
                raisedCoffee.Add(new Frappuccino());
            }
            if (Globals.Branch == "Yalova")
            {
                YalovaSube ys = new YalovaSube();
                ys.RegisterRaisedCoffee(raisedCoffee);
                ys.TemplateMethod(added, deleted, (double)RaiseUD.Value);
                this.Close();
                DrinkSelection ds = new DrinkSelection(ys);
                ds.ShowDialog();
            }
            else if (Globals.Branch == "Bursa")
            {
                BursaSube bs = new BursaSube();
                bs.RegisterRaisedCoffee(raisedCoffee);
                bs.TemplateMethod(added, deleted, (double)RaiseUD.Value);
                this.Close();
                DrinkSelection ds = new DrinkSelection(bs);
                ds.ShowDialog();
            }
        }
Exemple #5
0
 public void Compute(DrinkSelection ds, string text, double x)
 {
     UndoStack.Push(new Command(ds, text, x, receiver));
 }
Exemple #6
0
        //DrinkSelection ds = new DrinkSelection();
        //public RichTextBox Billtb = new RichTextBox();

        public void Operation(DrinkSelection ds, string text, double bill)
        {
            DrinkSelection.bill = bill;
            ds.undo(text);
        }