//----------------------------------------------
 public CControleEditePeriodeJoursSemaine()
 {
     InitializeComponent();
     foreach (Control ctrl in Controls)
     {
         CheckBox chk = ctrl as CheckBox;
         if (chk != null)
         {
             try
             {
                 int           nTag = Int32.Parse(chk.Tag.ToString());
                 JoursBinaires j    = (JoursBinaires)nTag;
                 DayOfWeek     d    = CUtilDate.GetDayOfWeekFor(j);
                 chk.Text = CUtilDate.GetNomJour(d, false);
             }
             catch { }
         }
     }
 }
        /// ///////////////////////////////////////////
        protected override string GetMyLibelle()
        {
            if (JoursExecution == JoursBinaires.Aucun)
            {
                return(I.T("Never|30000"));
            }
            string strLib = " Every|30001 ";

            if (EcartSemaine != 1)
            {
                strLib += EcartSemaine + " ";
            }
            for (int nTmp = 0; nTmp < 7; nTmp++)
            {
                if ((JoursExecution & CUtilDate.GetJourBinaireForBaseLundi(nTmp)) != 0)
                {
                    strLib += CUtilDate.GetNomJour((DayOfWeek)((nTmp + 8) % 7), true) + ",";
                }
            }
            strLib = strLib.Substring(0, strLib.Length - 1);
            return(strLib);
        }
示例#3
0
        /// ///////////////////////////////////////////
        protected override string GetMyLibelle()
        {
            string strLib = I.T("Every|30001 ");

            switch (NumeroJour)
            {
            case 1:
                strLib += I.T("first|30004 ");
                break;

            case 2:
                strLib += I.T("second|30005 ");
                break;

            case 3:
                strLib += I.T("third|30006 ");
                break;

            case 4:
                strLib += I.T("fourth|30007 ");
                break;

            case 5:
                strLib += I.T("last|30008 ");
                break;
            }
            strLib += CUtilDate.GetNomJour(JourSemaine, false) + "s ";
            if (EcartMois == 1)
            {
                strLib += I.T("of the month|30002");
            }
            else
            {
                strLib += I.T("Every @1 months|30003", EcartMois.ToString());
            }
            return(strLib);
        }