コード例 #1
0
 public CommandController(projetbiContext Context)
 {
     this.Context = Context;
     randomiser   = new CommandRandomiser()
     {
         Context = Context
     };
 }
コード例 #2
0
        public MachineControllerFab(projetbiContext context)
        {
            this.context = context;
            Machines     = new List <MachineFab>();
            var machine1 = new MachineFab()
            {
                Nom          = "machine1",
                Cadence      = 750,
                InstallDelay = 25,
                Variante     = "Acide"
            };

            machine1.BonbonsProduced += BonbonsProducedHandler;
            Machines.Add(machine1);
            var machine2 = new MachineFab()
            {
                Nom          = "machine2",
                Cadence      = 1230,
                InstallDelay = 45,
                Variante     = "Sucré"
            };

            machine2.BonbonsProduced += BonbonsProducedHandler;
            Machines.Add(machine2);
            var machine3 = new MachineFab()
            {
                Nom          = "machine3",
                Cadence      = 625,
                InstallDelay = 25,
                Variante     = "Gélifié"
            };

            machine3.BonbonsProduced += BonbonsProducedHandler;
            Machines.Add(machine3);
            var machine4 = new MachineFab()
            {
                Nom          = "machine4",
                Cadence      = 1230,
                InstallDelay = 45,
                Variante     = "Sucré"
            };

            machine4.BonbonsProduced += BonbonsProducedHandler;
            Machines.Add(machine4);
        }
コード例 #3
0
        public Program()
        {
            Actions = new List <IAction>();
            Context = new projetbiContext();

            var CommandCtrl = new CommandController(Context);

            Actions.Add(CommandCtrl);
            var UsineCtrl = new Usine(Context);

            Actions.Add(UsineCtrl);
            var PickingCtrl = new PickingController(Context);

            Actions.Add(PickingCtrl);
            while (true)
            {
                Date = Date.AddSeconds(1);
                foreach (var item in Actions)
                {
                    item.Execute();
                }
                Thread.Sleep(timer);
            }
        }
コード例 #4
0
        public MachineControllerCond(projetbiContext context)
        {
            this.context = context;
            Machines     = new List <MachineCond>();
            var machine1 = new MachineCond()
            {
                Nom          = "machine1",
                Packaging    = "Sachet",
                Cadence      = 500,
                InstallDelay = 15
            };

            machine1.PackageProduced += PackageProducedHandler;
            Machines.Add(machine1);
            var machine2 = new MachineCond()
            {
                Nom          = "machine2",
                Packaging    = "Sachet",
                Cadence      = 500,
                InstallDelay = 15
            };

            machine2.PackageProduced += PackageProducedHandler;
            Machines.Add(machine2);
            var machine3 = new MachineCond()
            {
                Nom          = "machine3",
                Packaging    = "Sachet",
                Cadence      = 750,
                InstallDelay = 25
            };

            machine3.PackageProduced += PackageProducedHandler;
            Machines.Add(machine3);
            var machine4 = new MachineCond()
            {
                Nom          = "machine4",
                Packaging    = "Boite",
                Cadence      = 200,
                InstallDelay = 10
            };

            machine4.PackageProduced += PackageProducedHandler;
            Machines.Add(machine4);
            var machine5 = new MachineCond()
            {
                Nom          = "machine5",
                Packaging    = "Boite",
                Cadence      = 200,
                InstallDelay = 10
            };

            machine5.PackageProduced += PackageProducedHandler;
            Machines.Add(machine5);
            var machine6 = new MachineCond()
            {
                Nom          = "machine6",
                Packaging    = "Echantillon",
                Cadence      = 150,
                InstallDelay = 15
            };

            machine6.PackageProduced += PackageProducedHandler;
            Machines.Add(machine6);
        }
コード例 #5
0
ファイル: Usine.cs プロジェクト: macharius40/GenerateurDonnee
 public Usine(projetbiContext context)
 {
     Context        = context;
     controllerFab  = new MachineControllerFab(context);
     controllerCond = new MachineControllerCond(context);
 }
コード例 #6
0
 public PickingController(projetbiContext context)
 {
     Context  = context;
     Chariots = new List <Chariot>();
 }