private void BursaSubesi_Click(object sender, EventArgs e) { Globals.Branch = BursaSubesi.Text; DrinkSelection ds = new DrinkSelection(); ds.ShowDialog(); }
private void YalovaSube_Click(object sender, EventArgs e) { Globals.Branch = YalovaSube.Text; DrinkSelection ds = new DrinkSelection(); ds.ShowDialog(); }
public Command(DrinkSelection ds, string text, double x, Receiver receiver) { Text = text; X = x; this.ds = ds; this.receiver = receiver; }
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(); } }
public void Compute(DrinkSelection ds, string text, double x) { UndoStack.Push(new Command(ds, text, x, receiver)); }
//DrinkSelection ds = new DrinkSelection(); //public RichTextBox Billtb = new RichTextBox(); public void Operation(DrinkSelection ds, string text, double bill) { DrinkSelection.bill = bill; ds.undo(text); }