Ejemplo n.º 1
0
 public Employee(IWorkplace workplace, string firstName, string lastName)
 {
     FirstName  = firstName;
     LastName   = lastName;
     WorkPlaces = new List <IWorkplace>();
     WorkPlaces.Add(workplace);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        public void NewWorkplace(IWorkplace workplace)
        {
            CommunityViewModel.WriteLine("Adding a new Cafe");

            CommunityViewModel.Add(workplace);
            NewBuildingCreated?.Invoke(this, workplace);
        }
Ejemplo n.º 4
0
    public void DeleteBuilding(IBuilding building)
    {
        RemoveBuilding(building);
        IWorkplace wp = building as IWorkplace;

        if (wp != null)
        {
            RemoveWorkplace(wp);
        }
    }
Ejemplo n.º 5
0
    public void RegistrationBuilding(IBuilding building)
    {
        AddBuilding(building);
        IWorkplace wp = building as IWorkplace;

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