/// /////////////////////////////////////////////////////////////////
        private void CFormParametresEntreeAgendaCyclique_Load(object sender, System.EventArgs e)
        {
            CPlanificationTache planif = m_entree.PlanificationCyclique;

            if (planif == null)
            {
                CPlanificationTacheHebdomadaire ph = new CPlanificationTacheHebdomadaire();
                planif = ph;

                ph.JoursExecution = CUtilDate.GetJourBinaireFor(m_entree.DateDebut.DayOfWeek);
                ph.Heure          = m_entree.DateDebut.Hour;
                ph.EcartSemaine   = 1;
            }
            m_panelPlanif.Init(planif);
            m_dateDebut.Value = m_entree.DateDebut;
            m_dateFin.Value   = m_entree.DateFinCyclique;
            TimeSpan sp = m_entree.DateFin - m_entree.DateDebut;

            m_chkSansHoraire.Checked = m_entree.SansHoraire;
            if (!m_entree.SansHoraire)
            {
                m_nDureeJours.Value = (int)sp.TotalDays;
            }
            else
            {
                m_nDureeJours.Value = (int)(sp.TotalDays + .999999999);
            }

            m_nDureeHeures.Value             = (int)sp.Hours;
            m_nDureeMinutes.Value            = (int)sp.Minutes;
            m_wndListeExclusions.ListeSource = m_entree.Desactivations;
        }
Example #2
0
        public override void InitChamps(CPlanificationTache planification)
        {
            base.InitChamps(planification);
            CPlanificationTacheHebdomadaire plHe = (CPlanificationTacheHebdomadaire)planification;

            for (int n = 0; n < 7; n++)
            {
                if ((plHe.JoursExecution & CUtilDate.GetJourBinaireForBaseLundi(n)) != 0)
                {
                    m_wndListeJours.Items[n].Checked = true;
                }
                else
                {
                    m_wndListeJours.Items[n].Checked = false;
                }
            }
        }