aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-05-01 14:44:53 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-01 14:44:53 +0300
commit47fad304ebc8f056f1c5ffcde037c66029fc80c9 (patch)
tree1e321a7099a3988785485f16e677cd3eb0803a73 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs
parent52a09ecb4ae9577f6f1bb124d246ec1c3858ec23 (diff)
downloadTango-47fad304ebc8f056f1c5ffcde037c66029fc80c9.tar.gz
Tango-47fad304ebc8f056f1c5ffcde037c66029fc80c9.zip
Added device information for ConnectResponse.
Fixed issue with razor parser. Added report issue option to application crash. Added DeviceInformation to MachineOperator. Added LastHardwareConfiguration to machine operator.
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()
+ {
+
+ }
+ }
+}