internal static Task <ControlledProject> AddNewProject()
        {
            Project = new ControlledProject();
            TaskCompletionSource <ControlledProject> tsc = new TaskCompletionSource <ControlledProject>();
            ProjectInfoWindow window = new ProjectInfoWindow()
            {
                Owner = App.Current.MainWindow
            };

            window.Closing += delegate
            {
                if (window.DialogResult == true)
                {
                    tsc.SetResult(Project);
                }
                else
                {
                    tsc.SetResult(null);
                }
            };
            window.ShowDialog();
            return(tsc.Task);
        }
        internal static Task <ControlledProject> UpdateProjectInfo(ControlledProject prj)
        {
            Project = prj.Clone() as ControlledProject;
            //Project = ObjectCopier.CloneJson(prj);
            TaskCompletionSource <ControlledProject> tsc = new TaskCompletionSource <ControlledProject>();
            ProjectInfoWindow window = new ProjectInfoWindow()
            {
                Owner = App.Current.MainWindow
            };

            window.Closing += delegate
            {
                if (window.DialogResult == true)
                {
                    tsc.SetResult(Project);
                }
                else
                {
                    tsc.SetResult(prj);
                }
            };
            window.ShowDialog();
            return(tsc.Task);
        }