aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/packages.config
blob: d8e0c7e97bb6ac553614c8a8741a547dc4d9287b (plain)
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="EntityFramework" version="6.0.0" targetFramework="net472" />
  <package id="Google.Protobuf" version="3.4.1" targetFramework="net472" />
  <package id="MahApps.Metro" version="1.5.0" targetFramework="net472" />
  <package id="MaterialDesignColors" version="1.1.2" targetFramework="net472" />
  <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net472" />
</packages>
b22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
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.Core.Commands;
using Tango.Scripting.IDE.ProjectTypes;
using Tango.SharedUI;
using Microsoft.WindowsAPICodePack.Dialogs;
using Microsoft.Win32;

namespace Tango.Scripting.IDE.Dialogs
{
    public class NewProjectViewVM : BaseProjectDialogVM
    {
       
        static public ObservableCollection<String> Locations { get; set; } = new ObservableCollection<string>();
        
        private String _solutionName = "App1";
        public String SolutionName
        {
            get { return _solutionName; }
            set { _solutionName = value; RaisePropertyChangedAuto(); }
        }
        #region Commands
        public RelayCommand BrowseFileCommand { get; set; }
        #endregion
        public NewProjectViewVM() : base()
        {
            Title  = "New Project";

            if(Locations.IndexOf(ProjectLocation) < 0)
            {
                Locations.Add(ProjectLocation);
            }
            BrowseFileCommand = new RelayCommand(BrowseFile);
        }
        private void BrowseFile()
        {
            CommonOpenFileDialog dialog = new CommonOpenFileDialog();
            dialog.InitialDirectory = Locations.LastOrDefault<string>();
            dialog.IsFolderPicker = true;
            if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
            {
                if( Directory.Exists(dialog.FileName) == true)
                {
                    if(false == Locations.Contains(dialog.FileName))
                    {
                        Locations.Add(dialog.FileName);
                    }
                    ProjectLocation = dialog.FileName;
                }
            }
        }
    }
}