aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs88
1 files changed, 88 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs
new file mode 100644
index 000000000..c88976948
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Threading;
+using Tango.Core.Commands;
+using Tango.MachineStudio.Common.Modules;
+using Tango.SharedUI;
+
+namespace Tango.MachineStudio.UI.Console
+{
+ public class ConsoleWindowVM : ViewModel
+ {
+
+ /// <summary>
+ /// Gets or sets the additional highlight C# types.
+ /// </summary>
+ public ObservableCollection<KeyValuePair<String, Type>> HighlightTypes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the intellisense types.
+ /// </summary>
+ public ObservableCollection<KeyValuePair<String, Type>> IntellisenseTypes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the run command.
+ /// </summary>
+ public RelayCommand RunCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the stop command.
+ /// </summary>
+ public RelayCommand StopCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the clear command.
+ /// </summary>
+ public RelayCommand ClearCommand { get; set; }
+
+ public ConsoleWindowVM(IStudioModuleLoader moduleLoader)
+ {
+ RunCommand = new RelayCommand(Run);
+ StopCommand = new RelayCommand(Stop);
+
+ HighlightTypes = new ObservableCollection<KeyValuePair<string, Type>>();
+ IntellisenseTypes = new ObservableCollection<KeyValuePair<string, Type>>();
+
+ IntellisenseTypes.Add(new KeyValuePair<string, Type>("consoleManager", typeof(ConsoleManager)));
+
+ foreach (var moduleType in moduleLoader.UserModules.SelectMany(x => x.MainViewType.Assembly.GetTypes()))
+ {
+ if (!moduleType.FullName.Contains("<") && !moduleType.FullName.Contains(">"))
+ {
+ HighlightTypes.Add(new KeyValuePair<string, Type>(moduleType.FullName, moduleType));
+ }
+ }
+
+ HighlightTypes.Add(new KeyValuePair<string, Type>("Thread", typeof(Thread)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("DateTime", typeof(DateTime)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("TimeSpan", typeof(TimeSpan)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("Dispatcher", typeof(Dispatcher)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("Task", typeof(Task)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("List", typeof(IList<Object>)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("int", typeof(Int32)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("double", typeof(Double)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("String", typeof(String)));
+ HighlightTypes.Add(new KeyValuePair<string, Type>("string", typeof(String)));
+
+ foreach (var item in HighlightTypes)
+ {
+ IntellisenseTypes.Add(item);
+ }
+ }
+
+ private void Stop()
+ {
+
+ }
+
+ private void Run()
+ {
+
+ }
+ }
+}