aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-04-11 19:40:25 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-04-11 19:40:25 +0300
commite3cd087cbe1b6c62df2beac4f6351bc20013726c (patch)
tree0be80f9892fe1f10f6b50cd38d5e6a5811d20a7e /Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
parent2aa2afca5b09d465e8bf683af232cfe366abf7d4 (diff)
parent3c6ab0ddb3f0ae70f4a30b7899b256a703d9a50b (diff)
downloadTango-e3cd087cbe1b6c62df2beac4f6351bc20013726c.tar.gz
Tango-e3cd087cbe1b6c62df2beac4f6351bc20013726c.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs')
-rw-r--r--Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs79
1 files changed, 79 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
new file mode 100644
index 000000000..9fbac01c2
--- /dev/null
+++ b/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs
@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media.Imaging;
+using Tango.Core.Commands;
+
+namespace Tango.Scripting.IDE
+{
+ public class SolutionItemCommand : RelayCommand, ISolutionItemCommand, INotifyPropertyChanged
+ {
+ public SolutionItemCommand() : base(()=> { })
+ {
+ Init();
+ }
+ public SolutionItemCommand(Action<object> action) : base(action)
+ {
+ Init();
+ }
+
+ public SolutionItemCommand(Action action) : base(action)
+ {
+ Init();
+ }
+
+ public SolutionItemCommand(Action<object> action, Func<object, bool> canExecute) : base(action, canExecute)
+ {
+ Init();
+ }
+
+ public SolutionItemCommand(Action<object> action, Func<bool> canExecute) : base(action, canExecute)
+ {
+ Init();
+ }
+
+ public SolutionItemCommand(Action action, Func<object, bool> canExecute) : base(action, canExecute)
+ {
+ Init();
+ }
+
+ public SolutionItemCommand(Action action, Func<bool> canExecute) : base(action, canExecute)
+ {
+ Init();
+ }
+
+ private void Init()
+ {
+ Commands = new ObservableCollection<ISolutionItemCommand>();
+ }
+
+ public String Name { get; set; }
+ BitmapSource _bImage;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public BitmapSource Image {
+ get
+ {
+ return _bImage;
+ }
+ set
+ {
+ _bImage = value;
+ RaisePropertyChanged(nameof(Image));
+ }
+ }
+ public ObservableCollection<ISolutionItemCommand> Commands { get; set; }
+
+ protected virtual void RaisePropertyChanged(String propName)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
+ }
+ }
+}