Exemple #1
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 4, m_name);

            SfWidget calendar   = args[0] as SfWidget;
            string   subject    = Utils.GetSafeString(args, 1);
            string   startStr   = Utils.GetSafeString(args, 2);
            string   endStr     = Utils.GetSafeString(args, 3);
            string   colorStr   = Utils.GetSafeString(args, 4, "black");
            string   dateFormat = Utils.GetSafeString(args, 5, "yyyy/MM/dd HH:mm");

            bool added = calendar.AddAppointment(subject, startStr, endStr, colorStr, dateFormat);

            return(calendar);
        }
Exemple #2
0
        public override Variable Clone()
        {
            SfWidget newVar = (SfWidget)this.MemberwiseClone();

            return(newVar);
        }