Esempio n. 1
0
 public static ContactItemModel ConvertModel(NewContactItemModel contact)
 {
     return(new ContactItemModel(contact.AppViewModel)
     {
         ID = contact.ID,
         FirstName = contact.FirstName,
         LastName = contact.LastName,
         EmailAddress = contact.EmailAddress,
         EmailAddress2 = contact.EmailAddress2,
         PhoneNumber = contact.PhoneNumber,
         PhoneNumber2 = contact.PhoneNumber2,
         ImagePath = contact.ImagePath
     });
 }
Esempio n. 2
0
        private AppLevelModel()
        {
            FeedbackEmail   = "*****@*****.**";
            FeedbackAppName = "ZeeEventsManager";

            GuestMenuForAllContacts =
                new ObservableCollection <MenuItem <AppLevelModel> >()
            {
                new MenuItem <AppLevelModel>(Q.Resources.AppLevel_MyContacts, "ImportAll")
            };

            GuestMenuForEventContacts =
                new ObservableCollection <MenuItem <AppLevelModel> >()
            {
                new MenuItem <AppLevelModel>(Q.Resources.AppLevel_CurrentEvent, "ImportAll")
            };

            Settings = new SettingsModel(this);

            NewContact           = new NewContactItemModel(this);
            AllContacts          = new MyContactsModel(this);
            Calendar             = new CalendarModel(this);
            Calendar.CurrentDate = DateTime.Now;

            // Dynamically update viewmodel as necessary
            latestEventMenuItem = new MenuItem <AppLevelModel>(
                null,
                typeof(EventItemPage),
                null,
                GetLatestEventSetup,
                Q.Resources.AppLevel_LatestEvent,
                "GoToToday");

            // Define top level menu, in required order
            TopLevelMenu.Add(new MenuItem <AppLevelModel>(Calendar, typeof(CalendarMonthPage)));
            TopLevelMenu.Add(latestEventMenuItem);
            TopLevelMenu.Add(new MenuItem <AppLevelModel>(AllContacts, typeof(MyContactsPage), null, AllContacts.NavigatedMainMenu));
            TopLevelMenu.Add(new MenuItem <AppLevelModel>(Settings, typeof(SettingsPage)));

            // Set current date
            Calendar.CurrentDate = DateTime.Now;
        }
Esempio n. 3
0
 /// <summary>
 /// Add contact, and save to file
 /// </summary>
 internal void AddContact(NewContactItemModel newContactItemModel)
 {
     Contacts.AddOrUpdate(newContactItemModel, AppViewModel.Settings.UserNameInStandardFormat.Value);
 }
Esempio n. 4
0
 /// <summary>
 /// Add new contact or update existing contact, and save to file
 /// </summary>
 public void AddOrUpdate(NewContactItemModel contact, bool userNameInStandardFormat)
 {
     AddOrUpdate(ConvertModel(contact), userNameInStandardFormat);
 }