Ejemplo n.º 1
0
        public SessionInputModelSimple GetInputDataStateSimple()
        {
            SessionInputDataSimple inputData = Repository.Get <SessionInputDataSimple>();

            if (inputData == null)
            {
                inputData = new SessionInputDataSimple {
                }
            }
            ;

            SessionInputModelSimple sessionInputModel = new SessionInputModelSimple
            {
                Task = new BindingList <SessionGridViewItemModel>(inputData.Task.Select(x => new SessionGridViewItemModel
                {
                    Title       = x.Name,
                    Description = x.Description,
                    Action      = (TaskAction)Enum.Parse(typeof(TaskAction), x.Action),
                    Created     = x.Created
                }).ToList()),
                Project = OpenedSolutionName
            };

            return(sessionInputModel);
        }
Ejemplo n.º 2
0
        public static void RegisterNewSession()
        {
            if (CurrentSession != null)
            {
                return;
            }

            CurrentSession = new SessionData
            {
                Description = "TODO",
                Label       = "TODO",
                Purpose     = "TODO",
                Started     = DateTime.Now
            };

            Repository.GenerateIdentifier();
            Repository.Save(CurrentSession);

            SessionInputService    sessionInputService    = new SessionInputService(new RepositoryLog(), String.Empty);
            SessionInputDataSimple sessionInputDataSimple = sessionInputService.GetInputData();

            CurrentSession.Task = new TaskData
            {
                Name        = (sessionInputDataSimple.Task.LastOrDefault() ?? new TaskData {
                    Name = String.Empty
                }).Name,
                Description = (sessionInputDataSimple.Task.LastOrDefault() ?? new TaskData {
                    Description = String.Empty
                }).Description,
                Action      = (sessionInputDataSimple.Task.LastOrDefault() ?? new TaskData {
                    Action = TaskAction.ResolvingBug.ToString()
                }).Action,
                Created     = (sessionInputDataSimple.Task.LastOrDefault() ?? new TaskData {
                    Created = DateTime.Now
                }).Created,
                Project     = new ProjectData
                {
                    Name        = sessionInputDataSimple.Project,
                    Description = String.Empty
                }
            };

            Repository.Save(CurrentSession);

            CurrentSession.Developer = new DeveloperData
            {
                Name = sessionInputDataSimple.Developer
            };

            Repository.Save(CurrentSession);

            addedBreakpoints = false;
            addedPathNode    = false;
        }
Ejemplo n.º 3
0
        public SessionInputDataSimple GetInputData()
        {
            SessionInputDataSimple inputData = Repository.Get <SessionInputDataSimple>();

            if (inputData == null)
            {
                inputData = new SessionInputDataSimple {
                }
            }
            ;

            return(inputData);
        }