public Employee(IWorkplace workplace, string firstName, string lastName) { FirstName = firstName; LastName = lastName; WorkPlaces = new List <IWorkplace>(); WorkPlaces.Add(workplace); }
public void GivenIHaveANewWorkplaceAt(double x, double y) { var pos = new Mock <IPosition>(); pos.SetupGet(p => p.Value).Returns(new System.Windows.Point(x, y)); building = workplace = new BasicWorkplace(pos.Object); }
public void NewWorkplace(IWorkplace workplace) { CommunityViewModel.WriteLine("Adding a new Cafe"); CommunityViewModel.Add(workplace); NewBuildingCreated?.Invoke(this, workplace); }
public void DeleteBuilding(IBuilding building) { RemoveBuilding(building); IWorkplace wp = building as IWorkplace; if (wp != null) { RemoveWorkplace(wp); } }
public void RegistrationBuilding(IBuilding building) { AddBuilding(building); IWorkplace wp = building as IWorkplace; if (wp != null) { AddWorkplace(wp); } }
static void Main() { Thread.CurrentThread.Name = "Main Program Thread"; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); TheMainForm = new mdiMultiIDE(); TheWorkplace = new Workplace(TheMainForm); Application.Run((Form)TheMainForm); }
public ChocolateOrder(List <Chocolate> chocolates, IWorkplace seller, IChocoBuyers buyer) { //Use of interfaces to group Seller/Buyer properly? if (chocolates.Count != 0) { Chocolates = chocolates; Seller = seller; Buyer = buyer; } else { throw new ChocolateOrderNoneException("Order cannot must contain at least 1 chocolate!"); } }
private void RemoveWorkplace(IWorkplace pWorkplace) { workplaces.Remove(pWorkplace); }
private void AddWorkplace(IWorkplace pWorkplace) { workplaces.Add(pWorkplace); }
public void Add(IWorkplace workplace) { Community.Add(workplace); NotifyPropertyChanged(() => Community.Workplaces); }