Ejemplo n.º 1
0
 public static Uri MakeEditTaskViewUriForProject( Project project )
 {
     return new Uri(
                    string.Format("/Views/Task/EditTaskView.xaml?{0}={1}", 
                    ProjectIdQueryParam, project.Id ),
                   UriKind.Relative);
 } 
 public static Uri MakeEditProjectUri(Project p)
 {
     if (p != null)
     {
         return new Uri(
             string.Format("/Views/Project/EditProjectDetailsView.xaml?{0}={1}",
             ProjectIdQueryParam, p.Id), UriKind.Relative);
     }
     else
     {
         return new Uri( "/Views/Project/EditProjectDetailsView.xaml", UriKind.Relative);
     }
 }
Ejemplo n.º 3
0
 partial void DeleteProjects(Project instance);
Ejemplo n.º 4
0
 partial void UpdateProjects(Project instance);
Ejemplo n.º 5
0
 partial void InsertProjects(Project instance);
 public static void UnPinProject(Project p)
 {
     ShellTileHelpersCore.UnPin(p.Id.ToString());
 }
        //DEMOSTOP#6
        public static void PinProject(Project p)
        {
            // Create the object to hold the properties for the tile
            StandardTileData initialData = new StandardTileData
            {
                //We can add a background image, count and title, just like with Push
                BackgroundImage = p.GetDefaultTileUri(),
                Title = p.Name,
            };

            Uri uri = p.MakePinnedProjectUri();
            ShellTileHelpersCore.Pin(uri, initialData);
        }
Ejemplo n.º 8
0
 public static Uri MakePinnedProjectUri( Project p)
 {
     return new Uri( 
         string.Format( "/Views/Project/ProjectDetailsView.xaml?{0}={1}&{2}={3}" , 
                         Constants.PINPROJECTIDPARAM , p.Id, Constants.PINPROJECTCOLORPARAM , p.Color) 
                     , UriKind.Relative);
 }
Ejemplo n.º 9
0
 public static Uri MakeProjectItemsViewUri(Project p)
 {
     return new Uri(
            string.Format("/Views/Project/ProjectItemsView.xaml?{0}={1}",
            ProjectIdQueryParam, p.Id), UriKind.Relative); 
 } 
        Project GetProject(ShellTile tile)
        {             
         
            Project project = null;

            int queryStringIndex = tile.NavigationUri.OriginalString.IndexOf(Constants.QUERYSTRINGSTART);
            if (queryStringIndex > 0)
            {
                project = new Project();
                string querystring = tile.NavigationUri.OriginalString.Substring(queryStringIndex + Constants.QUERYSTRINGSTART.Length);
                string[] parameters = querystring.Split(Constants.QUERYSTRINGSEPARATORS);
                if (parameters.Length >= 2 && parameters[0].Contains(Constants.PINPROJECTIDPARAM))
                    project.Id = new Guid(parameters[1]);
                if (parameters.Length >= 4 && parameters[2].Contains(Constants.PINPROJECTCOLORPARAM))
                    project.Color = parameters[3];
            }
            
            return project;
        }
        public string GetTasks(Project project)
        {
            if (fakeTasksOrder >= fakeTasks.Length)
                fakeTasksOrder = 0;

            return fakeTasks[fakeTasksOrder++]; 
        }
 int GetOverdueCount(Project project)
 {
     return randomCount.Next(9);     
 }