diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-05-05 10:31:06 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-05-05 10:31:06 +0300 |
| commit | 79bd7bb6a22f1da1a77fcc3f527a0955028f2447 (patch) | |
| tree | 3e1c30dbbf7b6ccf70aa5631ad2f42ee356b4e25 /Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs | |
| parent | 4129b6caa72f8bafeeefe1a4a88a0d5e1568e245 (diff) | |
| parent | 661c55343a468a9c150e8d163711567f89a02889 (diff) | |
| download | Tango-79bd7bb6a22f1da1a77fcc3f527a0955028f2447.tar.gz Tango-79bd7bb6a22f1da1a77fcc3f527a0955028f2447.zip | |
merge tpf
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs')
| -rw-r--r-- | Software/Visual_Studio/Scripting/Tango.Scripting.IDE/SolutionItemCommand.cs | 79 |
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)); + } + } +} |
