From 47fad304ebc8f056f1c5ffcde037c66029fc80c9 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 1 May 2018 14:44:53 +0300 Subject: 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. --- .../Console/ConsoleWindowVM.cs | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/ConsoleWindowVM.cs') 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 + { + + /// + /// Gets or sets the additional highlight C# types. + /// + public ObservableCollection> HighlightTypes { get; set; } + + /// + /// Gets or sets the intellisense types. + /// + public ObservableCollection> IntellisenseTypes { get; set; } + + /// + /// Gets or sets the run command. + /// + public RelayCommand RunCommand { get; set; } + + /// + /// Gets or sets the stop command. + /// + public RelayCommand StopCommand { get; set; } + + /// + /// Gets or sets the clear command. + /// + public RelayCommand ClearCommand { get; set; } + + public ConsoleWindowVM(IStudioModuleLoader moduleLoader) + { + RunCommand = new RelayCommand(Run); + StopCommand = new RelayCommand(Stop); + + HighlightTypes = new ObservableCollection>(); + IntellisenseTypes = new ObservableCollection>(); + + IntellisenseTypes.Add(new KeyValuePair("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(moduleType.FullName, moduleType)); + } + } + + HighlightTypes.Add(new KeyValuePair("Thread", typeof(Thread))); + HighlightTypes.Add(new KeyValuePair("DateTime", typeof(DateTime))); + HighlightTypes.Add(new KeyValuePair("TimeSpan", typeof(TimeSpan))); + HighlightTypes.Add(new KeyValuePair("Dispatcher", typeof(Dispatcher))); + HighlightTypes.Add(new KeyValuePair("Task", typeof(Task))); + HighlightTypes.Add(new KeyValuePair("List", typeof(IList))); + HighlightTypes.Add(new KeyValuePair("int", typeof(Int32))); + HighlightTypes.Add(new KeyValuePair("double", typeof(Double))); + HighlightTypes.Add(new KeyValuePair("String", typeof(String))); + HighlightTypes.Add(new KeyValuePair("string", typeof(String))); + + foreach (var item in HighlightTypes) + { + IntellisenseTypes.Add(item); + } + } + + private void Stop() + { + + } + + private void Run() + { + + } + } +} -- cgit v1.3.1