aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-03-31 10:12:51 +0300
committerAvi Levkovich <avi@twine-s.com>2019-03-31 10:12:51 +0300
commit53b77b20ed366c20958ea2d88275a9dc2c2d2f80 (patch)
treed4cf4d43cee06dc6fb12f41b3325fcfd9bbc19c3 /Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs
parent15753ad60333a715ffa88b3d1ce461e1f6e6bce0 (diff)
parent05baf6a0dda66fdc1b66d3f769e709f88b540e1d (diff)
downloadTango-53b77b20ed366c20958ea2d88275a9dc2c2d2f80.tar.gz
Tango-53b77b20ed366c20958ea2d88275a9dc2c2d2f80.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs')
-rw-r--r--Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs80
1 files changed, 79 insertions, 1 deletions
diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs
index 3c25e70f3..f7e31b75a 100644
--- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs
+++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs
@@ -1,14 +1,92 @@
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Media.Imaging;
+using Tango.Scripting.IDE.ProjectTypes;
using Tango.SharedUI;
namespace Tango.Scripting.IDE.Dialogs
{
- public class NewProjectDialogVM : ViewModel
+ public class NewProjectDialogVM : DialogViewVM
{
+ public ObservableCollection<IProjectType> ProjectTypes { get; set; }
+ public List<String> Locations { get; set; }
+ private IProjectType _selectedProjectType = null;
+ public IProjectType SelectedProjectType
+ {
+ get { return _selectedProjectType; }
+ set { _selectedProjectType = value;
+ RaisePropertyChangedAuto();
+ RaisePropertyChanged("LargeImage");
+ RaisePropertyChanged("SelectedDescription");
+ }
+ }
+ private BitmapSource _defaultLargeImage = ProjectType.GetImage("Images/test.png");
+ public BitmapSource LargeImage
+ {
+ get
+ {
+ if (SelectedProjectType != null)
+ return SelectedProjectType.LargeImage;
+ else return _defaultLargeImage;
+ }
+ }
+ public string SelectedDescription
+ {
+ get
+ {
+ if (SelectedProjectType != null)
+ return SelectedProjectType.Description;
+ return "";
+ }
+ }
+ private String _projectName = "App1";
+ public String ProjectName
+ {
+ get { return _projectName; }
+ set { _projectName = value; RaisePropertyChangedAuto(); }
+ }
+ private String _projectLocation;
+ public String ProjectLocation
+ {
+ get { return _projectLocation; }
+ set { _projectLocation = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _solutionName = "App1";
+ public String SolutionName
+ {
+ get { return _solutionName; }
+ set { _solutionName = value; RaisePropertyChangedAuto(); }
+ }
+ public NewProjectDialogVM() : base()
+ {
+ ProjectTypes = new ObservableCollection<IProjectType>();
+ RegisterProjectType(new StubProjectType());
+ RegisterProjectType(new UnitTestProjectType());
+
+ _selectedProjectType = ProjectTypes.FirstOrDefault();
+
+ string workingDirectory = Environment.CurrentDirectory;
+ _projectLocation = Directory.GetParent(workingDirectory).Parent.Parent.FullName;
+
+ Locations = new List<string>();
+ Locations.Add(_projectLocation);
+
+ }
+ public void RegisterProjectType(IProjectType projectType)
+ {
+ ProjectTypes.Add(projectType);
+ }
+
+ public void UnRegisterProjectItemHandler(IProjectType projectType)
+ {
+ ProjectTypes.Remove(projectType);
+ }
}
}