Ejemplo n.º 1
0
        public ComposeMessageModel()
        {
            Days = new List <KeyValueOption>();
            for (int i = 1; i <= 31; i++)
            {
                Days.Add(new KeyValueOption()
                {
                    ID    = i.ToString(),
                    Title = i.ToString()
                });
            }

            Days.Add(new KeyValueOption()
            {
                ID    = "32",
                Title = "Last"
            });

            Months = new List <KeyValueOption>();
            for (int i = 1; i <= 12; i++)
            {
                Months.Add(new KeyValueOption()
                {
                    ID    = i.ToString(),
                    Title = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i)
                });
            }

            Date           = DateTime.Now.ToString();
            Time           = DateTime.Now.ToString("HH:mm");
            Enabled        = true;
            TriggerOptions = TriggerOptions.OneTime;
            RecursDay      = 1;
            RecursWeek     = 1;
            weeklyOptions  = new WeeklyOptions();
            SaveCommand    = new DelegateCommand <ComposeMessageModel>(new Action <ComposeMessageModel>(OnSave));
            LookupContact  = new DelegateCommand <object>(new Action <object>(OnLookupContact));
        }
Ejemplo n.º 2
0
        public ComposeMessageModel()
        {
            Days = new List<KeyValueOption>();
            for(int i= 1; i <= 31;i++)
            {
                Days.Add(new KeyValueOption()
                {
                    ID = i.ToString(),
                    Title = i.ToString()
                });
            }

            Days.Add(new KeyValueOption()
            {
                ID = "32",
                Title = "Last"
            });

            Months = new List<KeyValueOption>();
            for (int i = 1; i <= 12; i++)
            {
                Months.Add(new KeyValueOption()
                {
                    ID = i.ToString(),
                    Title = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i)
                });
            }

            Date = DateTime.Now.ToString();
            Time = DateTime.Now.ToString("HH:mm");
            Enabled = true;
            TriggerOptions = TriggerOptions.OneTime;
            RecursDay = 1;
            RecursWeek = 1; 
            weeklyOptions = new WeeklyOptions();
            SaveCommand = new DelegateCommand<ComposeMessageModel>(new Action<ComposeMessageModel>(OnSave));
            LookupContact = new DelegateCommand<object>(new Action<object>(OnLookupContact));
        }