Example #1
0
 public Employee(IWorkplace workplace, string firstName, string lastName)
 {
     FirstName  = firstName;
     LastName   = lastName;
     WorkPlaces = new List <IWorkplace>();
     WorkPlaces.Add(workplace);
 }
Example #2
0
        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);
        }
Example #4
0
    public void DeleteBuilding(IBuilding building)
    {
        RemoveBuilding(building);
        IWorkplace wp = building as IWorkplace;

        if (wp != null)
        {
            RemoveWorkplace(wp);
        }
    }
Example #5
0
    public void RegistrationBuilding(IBuilding building)
    {
        AddBuilding(building);
        IWorkplace wp = building as IWorkplace;

        if (wp != null)
        {
            AddWorkplace(wp);
        }
    }
Example #6
0
        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);
        }
Example #7
0
 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!");
     }
 }
Example #8
0
 private void RemoveWorkplace(IWorkplace pWorkplace)
 {
     workplaces.Remove(pWorkplace);
 }
Example #9
0
 private void AddWorkplace(IWorkplace pWorkplace)
 {
     workplaces.Add(pWorkplace);
 }
Example #10
0
 public void Add(IWorkplace workplace)
 {
     Community.Add(workplace);
     NotifyPropertyChanged(() => Community.Workplaces);
 }
 private void RemoveWorkplace(IWorkplace pWorkplace)
 {
     workplaces.Remove(pWorkplace);
 }
 private void AddWorkplace(IWorkplace pWorkplace)
 {
     workplaces.Add(pWorkplace);
 }