Exemplo n.º 1
0
        private static void Load_Fertilize_Jobs(int pumpIndex, Fertilize_Pump pump)
        {
            Fertilize_Job[] jobs = ApplicationSettings.GetParameter(pumpIndex);

            foreach (Fertilize_Job job in jobs)
            {
                pump.Add_Fertilize_Job(job);
            }
        }
Exemplo n.º 2
0
        internal static void Initialize()
        {
            Pump1 = new Fertilize_Pump(G120.P1_31, 1);
            Pump1.IsRunning_Changed += Pump_IsRunning_Changed;
            Pump1.Name                          = ApplicationSettings.GetParameter("Name_Pump1", "Pump 1");
            Pump1.Name_Changed                 += Pump1_Name_Changed;
            Pump1.RuntimePerMilliliter          = ApplicationSettings.GetParameter("RuntimePerMilliliter_Pump1", 1.5f);
            Pump1.RuntimePerMilliliter_Changed += Pump1_RuntimePerMilliliter_Changed;
            Pump1.AWC_Quantity                  = ApplicationSettings.GetParameter("AWC_Quantity_Pump1", 0);
            Pump1.AWC_Quantity_Changed         += Pump1_AWC_Quantity_Changed;
            Pump1.Fertilize_Schedule_Changed   += Pump1_Fertilize_Schedule_Changed;
            Load_Fertilize_Jobs(1, Pump1);


            Pump2 = new Fertilize_Pump(G120.P1_30, 2);
            Pump2.IsRunning_Changed += Pump_IsRunning_Changed;
            Pump2.Name                          = ApplicationSettings.GetParameter("Name_Pump2", "Pump 2");
            Pump2.Name_Changed                 += Pump2_Name_Changed;
            Pump2.RuntimePerMilliliter          = ApplicationSettings.GetParameter("RuntimePerMilliliter_Pump2", 1.5f);
            Pump2.RuntimePerMilliliter_Changed += Pump2_RuntimePerMilliliter_Changed;
            Pump2.AWC_Quantity                  = ApplicationSettings.GetParameter("AWC_Quantity_Pump2", 0);
            Pump2.AWC_Quantity_Changed         += Pump2_AWC_Quantity_Changed;
            Pump2.Fertilize_Schedule_Changed   += Pump2_Fertilize_Schedule_Changed;
            Load_Fertilize_Jobs(2, Pump2);


            Pump3 = new Fertilize_Pump(G120.P0_12, 3);
            Pump3.IsRunning_Changed += Pump_IsRunning_Changed;
            Pump3.Name                          = ApplicationSettings.GetParameter("Name_Pump3", "Pump 3");
            Pump3.Name_Changed                 += Pump3_Name_Changed;
            Pump3.RuntimePerMilliliter          = ApplicationSettings.GetParameter("RuntimePerMilliliter_Pump3", 1.5f);
            Pump3.RuntimePerMilliliter_Changed += Pump3_RuntimePerMilliliter_Changed;
            Pump3.AWC_Quantity                  = ApplicationSettings.GetParameter("AWC_Quantity_Pump3", 0);
            Pump3.AWC_Quantity_Changed         += Pump3_AWC_Quantity_Changed;
            Pump3.Fertilize_Schedule_Changed   += Pump3_Fertilize_Schedule_Changed;
            Load_Fertilize_Jobs(3, Pump3);


            Pump4 = new Fertilize_Pump(G120.P0_13, 4);
            Pump4.IsRunning_Changed += Pump_IsRunning_Changed;
            Pump4.Name                          = ApplicationSettings.GetParameter("Name_Pump4", "Pump 4");
            Pump4.Name_Changed                 += Pump4_Name_Changed;
            Pump4.RuntimePerMilliliter          = ApplicationSettings.GetParameter("RuntimePerMilliliter_Pump4", 1.5f);
            Pump4.RuntimePerMilliliter_Changed += Pump4_RuntimePerMilliliter_Changed;
            Pump4.AWC_Quantity                  = ApplicationSettings.GetParameter("AWC_Quantity_Pump4", 0);
            Pump4.AWC_Quantity_Changed         += Pump4_AWC_Quantity_Changed;
            Pump4.Fertilize_Schedule_Changed   += Pump4_Fertilize_Schedule_Changed;
            Load_Fertilize_Jobs(4, Pump4);


            Debug.Print("Fertilize Manager initialized.");
        }
Exemplo n.º 3
0
 internal PumpEventArgs(Fertilize_Pump pump)
 {
     Pump = pump;
 }