Example #1
0
        private List <Workday> GetSelectedWorkdays()
        {
            List <Workday> workdays = new List <Workday>();

            foreach (ArchiveFile item in WorkdayList.SelectedItems)
            {
                workdays.Add((Workday)IsolatedStorageHelper.FileToObj(typeof(Workday), "/history/" + item.Filename));
            }
            return(workdays);
        }
Example #2
0
        private void LoadState()
        {
            LicenceHelper.IsTrialMode(true);

            DataDictionary["Workday"] =

                Workday = (Workday)IsolatedStorageHelper.FileToObj(typeof(Workday), "current/workday.xml");
            LastPunch   = (PunchType)IsolatedStorageHelper.FileToObj(typeof(PunchType), "current/lastpunch.xml");
            PunchList   = (ObservableCollection <PunchType>)IsolatedStorageHelper.FileToObj(typeof(ObservableCollection <PunchType>), "current/punchlist.xml");
            EmailQueue  = (RemoteEmailQueue)IsolatedStorageHelper.FileToObj(typeof(RemoteEmailQueue), "current/emailqueue.xml");
        }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            IDictionary <string, string> parameters = NavigationContext.QueryString;

            if (parameters.ContainsKey("file"))
            {
                filename = "/history/" + parameters["file"];
                Workday workday = (Workday)IsolatedStorageHelper.FileToObj(typeof(Workday), filename);
                WorkdayView.Workday = workday;

                PageTitle.Text = workday.StartTime.ToString("ddd ") + workday.StartTime.ToString("d");
            }

            base.OnNavigatedTo(e);
        }
 protected override void LoadAction()
 {
     return((PunchTypeCollection)IsolatedStorageHelper.FileToObj(typeof(PunchTypeCollection), this.Path));
 }