diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-28 10:55:56 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-28 10:55:56 +0200 |
| commit | 36f19301ac0cc27d74b73eb4b31fdecfd86f5060 (patch) | |
| tree | e4f4a636f4a2dc03376e6eff2077ced4079429ed /Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE | |
| parent | 1ea2a13900697e203658ff8c9489b70866792a49 (diff) | |
| parent | b62c4b8b67b3103c691564df80f65423a9c315a0 (diff) | |
| download | Tango-36f19301ac0cc27d74b73eb4b31fdecfd86f5060.tar.gz Tango-36f19301ac0cc27d74b73eb4b31fdecfd86f5060.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE')
62 files changed, 3051 insertions, 0 deletions
diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/SharedResourceDictionary.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/SharedResourceDictionary.cs new file mode 100644 index 000000000..a163355c4 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/SharedResourceDictionary.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; + +namespace Tango.Scripting.IDE.Controls +{ + + /// <summary> + /// The shared resource dictionary is a specialized resource dictionary + /// that loads it content only once. If a second instance with the same source + /// is created, it only merges the resources from the cache. + /// </summary> + public class SharedResourceDictionary : ResourceDictionary + { + /// <summary> + /// Internal cache of loaded dictionaries + /// </summary> + public static Dictionary<Uri, ResourceDictionary> _sharedDictionaries = + new Dictionary<Uri, ResourceDictionary>(); + + /// <summary> + /// Local member of the source uri + /// </summary> + private Uri _sourceUri; + + /// <summary> + /// Gets or sets the uniform resource identifier (URI) to load resources from. + /// </summary> + public new Uri Source + { + get { return _sourceUri; } + set + { + _sourceUri = value; + + if (!_sharedDictionaries.ContainsKey(value)) + { + // If the dictionary is not yet loaded, load it by setting + // the source of the base class + base.Source = value; + + // add it to the cache + _sharedDictionaries.Add(value, this); + } + else + { + // If the dictionary is already loaded, get it from the cache + MergedDictionaries.Add(_sharedDictionaries[value]); + } + } + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/SolutionItemControl.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/SolutionItemControl.cs new file mode 100644 index 000000000..ad6c65f22 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/SolutionItemControl.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Scripting.IDE.Controls +{ + public class SolutionItemControl : Control + { + public ISolutionItem SolutionItem + { + get { return (ISolutionItem)GetValue(SolutionItemProperty); } + set { SetValue(SolutionItemProperty, value); } + } + public static readonly DependencyProperty SolutionItemProperty = + DependencyProperty.Register("SolutionItem", typeof(ISolutionItem), typeof(SolutionItemControl), new PropertyMetadata(null)); + + public ICommand OpenCommand + { + get { return (ICommand)GetValue(OpenCommandProperty); } + set { SetValue(OpenCommandProperty, value); } + } + public static readonly DependencyProperty OpenCommandProperty = + DependencyProperty.Register("OpenCommand", typeof(ICommand), typeof(SolutionItemControl), new PropertyMetadata(null)); + + static SolutionItemControl() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(SolutionItemControl), new FrameworkPropertyMetadata(typeof(SolutionItemControl))); + } + + public SolutionItemControl() + { + PreviewMouseDoubleClick += (_, __) => + { + if (SolutionItem.CanOpen) + { + OpenCommand?.Execute(SolutionItem); + } + }; + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/TabConrolClose.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/TabConrolClose.cs new file mode 100644 index 000000000..7130733e5 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Controls/TabConrolClose.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Scripting.IDE.Controls +{ + + public class TabConrolClose : TabControl + { + static TabConrolClose() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(TabConrolClose), new FrameworkPropertyMetadata(typeof(TabConrolClose))); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialog.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialog.xaml new file mode 100644 index 000000000..7942a7165 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialog.xaml @@ -0,0 +1,12 @@ +<UserControl x:Class="Tango.Scripting.IDE.Dialogs.NewProjectDialog" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.Scripting.IDE.Dialogs" + mc:Ignorable="d" + d:DesignHeight="450" d:DesignWidth="800"> + <Grid> + + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialog.xaml.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialog.xaml.cs new file mode 100644 index 000000000..376190e3a --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialog.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Scripting.IDE.Dialogs +{ + /// <summary> + /// Interaction logic for NewProjectDialog.xaml + /// </summary> + public partial class NewProjectDialog : UserControl + { + public NewProjectDialog() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs new file mode 100644 index 000000000..3c25e70f3 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Dialogs/NewProjectDialogVM.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.Scripting.IDE.Dialogs +{ + public class NewProjectDialogVM : ViewModel + { + + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProject.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProject.cs new file mode 100644 index 000000000..18d95a7d8 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProject.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; + +namespace Tango.Scripting.IDE +{ + public interface IProject : ISolutionItem + { + String FilePath { get; set; } + + String WorkingFolder { get; } + + ObservableCollection<IProjectItem> Items { get; set; } + + Task Build(); + + Task Run(); + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProjectItem.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProjectItem.cs new file mode 100644 index 000000000..0d34cf2e6 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProjectItem.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; + +namespace Tango.Scripting.IDE +{ + public interface IProjectItem : ISolutionItem + { + ObservableCollection<IProjectItem> Items { get; set; } + + FrameworkElement View { get; } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProjectType.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProjectType.cs new file mode 100644 index 000000000..ed9ff51a8 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/IProjectType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; + +namespace Tango.Scripting.IDE +{ + public interface IProjectType + { + IProject NewProject(String projectPath); + + String Name { get; } + + String Description { get; } + + BitmapSource Image { get; } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ISolutionItem.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ISolutionItem.cs new file mode 100644 index 000000000..74bdab066 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ISolutionItem.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; + +namespace Tango.Scripting.IDE +{ + public interface ISolutionItem + { + String Name { get; } + + BitmapSource Image { get; } + + bool CanOpen { get; } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CSharpProject.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CSharpProject.png Binary files differnew file mode 100644 index 000000000..5b0f29960 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CSharpProject.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CSharpScriptItem.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CSharpScriptItem.png Binary files differnew file mode 100644 index 000000000..37e4e1727 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CSharpScriptItem.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CloseDocument_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CloseDocument_16x.png Binary files differnew file mode 100644 index 000000000..5c5691574 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CloseDocument_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CloseSolution_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CloseSolution_16x.png Binary files differnew file mode 100644 index 000000000..41ff45a94 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/CloseSolution_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/FindinFiles_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/FindinFiles_16x.png Binary files differnew file mode 100644 index 000000000..5b47a34ce --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/FindinFiles_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewFileCollection_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewFileCollection_16x.png Binary files differnew file mode 100644 index 000000000..8c383c1fc --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewFileCollection_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewRelationship_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewRelationship_16x.png Binary files differnew file mode 100644 index 000000000..0be7b4fbf --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewRelationship_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewWindow_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewWindow_16x.png Binary files differnew file mode 100644 index 000000000..d4d0c0329 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/NewWindow_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/OpenFolder_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/OpenFolder_16x.png Binary files differnew file mode 100644 index 000000000..15795d522 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/OpenFolder_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/Reference.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/Reference.png Binary files differnew file mode 100644 index 000000000..fa5430947 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/Reference.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveAll_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveAll_16x.png Binary files differnew file mode 100644 index 000000000..fea4fb0e1 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveAll_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveClose_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveClose_16x.png Binary files differnew file mode 100644 index 000000000..09941041f --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveClose_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveStatusBar9_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveStatusBar9_16x.png Binary files differnew file mode 100644 index 000000000..971471c89 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/SaveStatusBar9_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/Save_16x.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/Save_16x.png Binary files differnew file mode 100644 index 000000000..a88b09b5a --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/Save_16x.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/StubProject.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/StubProject.png Binary files differnew file mode 100644 index 000000000..cd0ad20ad --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/StubProject.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/pp_project.png b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/pp_project.png Binary files differnew file mode 100644 index 000000000..e5eb56670 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Images/pp_project.png diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Project.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Project.cs new file mode 100644 index 000000000..5a950d2c7 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Project.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; +using Tango.SharedUI.Helpers; + +namespace Tango.Scripting.IDE +{ + public abstract class Project : IProject + { + private static Dictionary<String, BitmapSource> _imageCache; + + static Project() + { + _imageCache = new Dictionary<string, BitmapSource>(); + } + + public string FilePath { get; set; } + + public string WorkingFolder => Path.GetDirectoryName(FilePath); + + public string Name => Path.GetFileNameWithoutExtension(FilePath); + + public abstract BitmapSource Image { get; } + + public ObservableCollection<IProjectItem> Items { get; set; } + + public Project() + { + Items = new ObservableCollection<IProjectItem>(); + } + + public abstract Task Build(); + public abstract Task Run(); + + protected static BitmapSource GetImage(String name) + { + if (_imageCache.ContainsKey(name)) + { + return _imageCache[name]; + } + else + { + var image = ResourceHelper.GetImageFromResources(name); + _imageCache.Add(name, image); + return image; + } + } + + public bool CanOpen => false; + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItem.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItem.cs new file mode 100644 index 000000000..8adc26dc7 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItem.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; +using Tango.Core; +using Tango.SharedUI.Helpers; + +namespace Tango.Scripting.IDE +{ + public abstract class ProjectItem : ExtendedObject, IProjectItem + { + private static Dictionary<String, BitmapSource> _imageCache; + + static ProjectItem() + { + _imageCache = new Dictionary<string, BitmapSource>(); + } + + public string Name { get; set; } + public ObservableCollection<IProjectItem> Items { get; set; } + + public ProjectItem() + { + Items = new ObservableCollection<IProjectItem>(); + } + + public abstract BitmapSource Image { get; } + + public abstract FrameworkElement OnGetView(); + + private FrameworkElement GetView() + { + return OnGetView(); + } + + protected static BitmapSource GetImage(String name) + { + if (_imageCache.ContainsKey(name)) + { + return _imageCache[name]; + } + else + { + var image = ResourceHelper.GetImageFromResources(name); + _imageCache.Add(name, image); + return image; + } + } + + public abstract bool CanOpen { get; } + public FrameworkElement View => GetView(); + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/CSharpScriptItem.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/CSharpScriptItem.cs new file mode 100644 index 000000000..cf4811047 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/CSharpScriptItem.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; +using Tango.Scripting.IDE.ProjectItemsViews; + +namespace Tango.Scripting.IDE.ProjectItems +{ + public class CSharpScriptItem : ProjectItem + { + public override BitmapSource Image => GetImage("Images/CSharpScriptItem.png"); + + private String _code; + public String Code + { + get { return _code; } + set { _code = value; RaisePropertyChangedAuto(); } + } + + public override bool CanOpen => true; + + public override FrameworkElement OnGetView() + { + return new CSharpScriptItemView(this); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/ReferenceAssembliesItem.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/ReferenceAssembliesItem.cs new file mode 100644 index 000000000..0e66fd241 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/ReferenceAssembliesItem.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; + +namespace Tango.Scripting.IDE.ProjectItems +{ + public class ReferenceAssembliesItem : ProjectItem + { + public ReferenceAssembliesItem() + { + Name = "References"; + } + + public override BitmapSource Image => GetImage("Images/Reference.png"); + + public override FrameworkElement OnGetView() + { + return null; + } + + public override bool CanOpen => false; + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/ReferenceAssemblyItem.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/ReferenceAssemblyItem.cs new file mode 100644 index 000000000..e9cd1e8f2 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItems/ReferenceAssemblyItem.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; + +namespace Tango.Scripting.IDE.ProjectItems +{ + public class ReferenceAssemblyItem : ProjectItem + { + public String Path { get; set; } + public override BitmapSource Image => GetImage("Images/Reference.png"); + + public override FrameworkElement OnGetView() + { + return null; + } + + public override bool CanOpen => false; + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItemsViews/CSharpScriptItemView.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItemsViews/CSharpScriptItemView.xaml new file mode 100644 index 000000000..682956205 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItemsViews/CSharpScriptItemView.xaml @@ -0,0 +1,13 @@ +<UserControl x:Class="Tango.Scripting.IDE.ProjectItemsViews.CSharpScriptItemView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.Scripting.IDE.ProjectItemsViews" + xmlns:editors="clr-namespace:Tango.Scripting.Editors;assembly=Tango.Scripting.Editors" + mc:Ignorable="d" + d:DesignHeight="450" d:DesignWidth="800"> + <Grid> + <editors:ScriptEditor /> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItemsViews/CSharpScriptItemView.xaml.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItemsViews/CSharpScriptItemView.xaml.cs new file mode 100644 index 000000000..34c604b83 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectItemsViews/CSharpScriptItemView.xaml.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.Scripting.IDE.ProjectItems; + +namespace Tango.Scripting.IDE.ProjectItemsViews +{ + /// <summary> + /// Interaction logic for CSharpScriptItemView.xaml + /// </summary> + public partial class CSharpScriptItemView : UserControl + { + public CSharpScriptItemView(CSharpScriptItem scriptItem) + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectTypes/StubProjectType.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectTypes/StubProjectType.cs new file mode 100644 index 000000000..4450f4a39 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectTypes/StubProjectType.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; +using Tango.Scripting.IDE.ProjectItems; +using Tango.Scripting.IDE.Projects; + +namespace Tango.Scripting.IDE.ProjectTypes +{ + public class StubProjectType : IProjectType + { + public IProject NewProject(string projectPath) + { + StubProject project = new StubProject(); + + project.FilePath = projectPath; + + var referenceAssembliesItem = new ReferenceAssembliesItem(); + + referenceAssembliesItem.Items.Add(new ReferenceAssemblyItem() + { + Path = "mscorelib.dll", + Name = "System.dll", + }); + referenceAssembliesItem.Items.Add(new ReferenceAssemblyItem() + { + Path = "System.Core.dll", + Name = "System.Core.dll", + }); + + project.Items.Add(referenceAssembliesItem); + + project.Items.Add(new CSharpScriptItem() { Name = "main.csx" }); + project.Items.Add(new CSharpScriptItem() { Name = "next.csx" }); + + return project; + } + + public string Name => "Unit Test Project"; + public string Description => "Create a unit test project template."; + public BitmapSource Image { get; } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectTypes/UnitTestProjectType.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectTypes/UnitTestProjectType.cs new file mode 100644 index 000000000..4519e5aca --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ProjectTypes/UnitTestProjectType.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; +using Tango.Scripting.IDE.ProjectItems; +using Tango.Scripting.IDE.Projects; + +namespace Tango.Scripting.IDE.ProjectTypes +{ + public class UnitTestProjectType : IProjectType + { + public IProject NewProject(string projectPath) + { + UnitTestProject project = new UnitTestProject(); + + project.FilePath = projectPath; + + var referenceAssembliesItem = new ReferenceAssembliesItem(); + + referenceAssembliesItem.Items.Add(new ReferenceAssemblyItem() + { + Path = "mscorelib.dll", + Name = "System.dll", + }); + referenceAssembliesItem.Items.Add(new ReferenceAssemblyItem() + { + Path = "System.Core.dll", + Name = "System.Core.dll", + }); + + project.Items.Add(referenceAssembliesItem); + + return project; + } + + public string Name => "Unit Test Project"; + public string Description => "Create a unit test project template."; + public BitmapSource Image { get; } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/CSharpProject.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/CSharpProject.cs new file mode 100644 index 000000000..62e830d06 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/CSharpProject.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Scripting.IDE.Projects +{ + public abstract class CSharpProject : Project + { + + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/StubProject.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/StubProject.cs new file mode 100644 index 000000000..bc915fa77 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/StubProject.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; + +namespace Tango.Scripting.IDE.Projects +{ + public class StubProject : CSharpProject + { + public override BitmapSource Image => GetImage("Images/StubProject.png"); + + public override Task Build() + { + throw new NotImplementedException(); + } + + public override Task Run() + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/UnitTestProject.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/UnitTestProject.cs new file mode 100644 index 000000000..e5510ad45 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Projects/UnitTestProject.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; + +namespace Tango.Scripting.IDE.Projects +{ + public class UnitTestProject : CSharpProject + { + public override BitmapSource Image { get; } + + public override Task Build() + { + throw new NotImplementedException(); + } + + public override Task Run() + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/AssemblyInfo.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..3ac597e08 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.Scripting.IDE")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.Scripting.IDE")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file +//inside a <PropertyGroup>. For example, if you are using US english +//in your source files, set the <UICulture> to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.Designer.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.Designer.cs new file mode 100644 index 000000000..ec92331cb --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.Scripting.IDE.Properties { + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.Scripting.IDE.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.resx b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.Designer.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.Designer.cs new file mode 100644 index 000000000..2a0fdc6a9 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.Scripting.IDE.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.settings b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Resources.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Resources.xaml new file mode 100644 index 000000000..ef5d1b599 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Resources.xaml @@ -0,0 +1,127 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" + xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:fa="http://schemas.fontawesome.io/icons/" + xmlns:local="clr-namespace:Tango.Scripting.IDE"> + + <Color x:Key="IdeDarkBackgroundColor">#202020</Color> + <Color x:Key="IdeMidBackgroundColor">#252526</Color> + <Color x:Key="IdeLightBackgroundColor">#2D2D30</Color> + <Color x:Key="IdeBorderColor">#676767</Color> + <Color x:Key="IdeAccentColor">#007ACC</Color> + <Color x:Key="IdeLightForegroundColor">#007ACC</Color> + <SolidColorBrush x:Key="IdeDarkBackgroundBrush" Color="{StaticResource IdeDarkBackgroundColor}"></SolidColorBrush> + <SolidColorBrush x:Key="IdeLightBackgroundBrush" Color="{StaticResource IdeLightBackgroundColor}"></SolidColorBrush> + <SolidColorBrush x:Key="IdeMidBackgroundBrush" Color="{StaticResource IdeMidBackgroundColor}"></SolidColorBrush> + <SolidColorBrush x:Key="IdeBorderBrush" Color="{StaticResource IdeBorderColor}"></SolidColorBrush> + <SolidColorBrush x:Key="IdeAccentBrush" Color="{StaticResource IdeAccentColor}"></SolidColorBrush> + <SolidColorBrush x:Key="IdeLightForegroundBrush" Color="{StaticResource IdeLightForegroundColor}"></SolidColorBrush> + + <!-- Background --> + <SolidColorBrush x:Key="Background" Color="#1C1C1C" options:Freeze="True" /> + <SolidColorBrush x:Key="LightBackground" Color="#2D2D30" options:Freeze="True" /> + + <Color x:Key="AccentColor">#2D2D30</Color> + <Color x:Key="BlackColor">#FFFFFFFF</Color> + <Color x:Key="WhiteColor">#2D2D30</Color> + + + + + + + + <!--Override Mahapps Colors--> + + <!-- re-set brushes too --> + <SolidColorBrush x:Key="HighlightBrush" Color="{StaticResource HighlightColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="AccentColorBrush" Color="{StaticResource AccentColor}" /> + <SolidColorBrush x:Key="AccentColorBrush2" Color="{StaticResource IdeAccentColor}" /> + <SolidColorBrush x:Key="AccentColorBrush3" Color="Transparent" /> + <SolidColorBrush x:Key="AccentColorBrush4" Color="{StaticResource IdeAccentColor}" /> + + <SolidColorBrush x:Key="WindowTitleColorBrush" Color="{StaticResource AccentColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="NonActiveWindowTitleColorBrush" Color="#808080" options:Freeze="True" /> + <SolidColorBrush x:Key="NonActiveBorderColorBrush" Color="#808080" options:Freeze="True" /> + + <SolidColorBrush x:Key="BlackBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="TextBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="LabelTextBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="BlackColorBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="TextBoxMouseOverInnerBorderBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="TextBoxFocusBorderBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="ButtonMouseOverBorderBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="ButtonMouseOverInnerBorderBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="ComboBoxMouseOverBorderBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="ComboBoxMouseOverInnerBorderBrush" Color="{StaticResource BlackColor}" options:Freeze="True" /> + + <SolidColorBrush x:Key="ControlBackgroundBrush" Color="{StaticResource WhiteColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource WhiteColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="WhiteColorBrush" Color="{StaticResource WhiteColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="DisabledWhiteBrush" Color="{StaticResource WhiteColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="WindowBackgroundBrush" Color="{StaticResource WhiteColor}" options:Freeze="True" /> + + <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="{StaticResource WhiteColor}" options:Freeze="True" /> + <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="{StaticResource BlackColor}" options:Freeze="True" /> + + <LinearGradientBrush x:Key="CheckBoxBackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1" options:Freeze="True"> + <GradientStop Offset="0" Color="{StaticResource Gray7}" /> + <GradientStop Offset="1" Color="{StaticResource WhiteColor}" /> + </LinearGradientBrush> + + <!-- Foreground --> + <SolidColorBrush x:Key="Foreground" Color="#FFFFFF" options:Freeze="True" /> + <SolidColorBrush x:Key="WindowTitleForeground" Color="#999988" options:Freeze="True" /> + + <!-- General --> + <SolidColorBrush x:Key="BackgroundHighlighted" Color="#54545C" options:Freeze="True" /> + <SolidColorBrush x:Key="BorderBrushHighlighted" Color="#6A6A75" options:Freeze="True" /> + <SolidColorBrush x:Key="BackgroundSelected" Color="#007ACC" options:Freeze="True" /> + <SolidColorBrush x:Key="BorderBrushSelected" Color="#1C97EA" options:Freeze="True" /> + <SolidColorBrush x:Key="BackgroundNormal" Color="#3F3F46" options:Freeze="True" /> + <SolidColorBrush x:Key="BorderBrushNormal" Color="#54545C" options:Freeze="True" /> + <SolidColorBrush x:Key="WindowGlowBrush" Color="#017ACC" options:Freeze="True" /> + + <!-- Text Box --> + <SolidColorBrush x:Key="TextBoxBackground" Color="#333337" options:Freeze="True" /> + <SolidColorBrush x:Key="TextBoxBackgroundSelected" Color="#3F3F46" options:Freeze="True" /> + + <!-- Search Text Box --> + <SolidColorBrush x:Key="SearchTextForeground" Color="#999999" options:Freeze="True" /> + + <!-- Link Button --> + <SolidColorBrush x:Key="LinkButtonForeground" Color="#1297FB" options:Freeze="True" /> + <SolidColorBrush x:Key="LinkButtonForegroundHighlighted" Color="#55AAFF" options:Freeze="True" /> + + <!-- Close Button --> + <SolidColorBrush x:Key="CloseButtonBackgroundHighlighted" Color="#39ADFB" options:Freeze="True" /> + <SolidColorBrush x:Key="CloseButtonBackgroundPressed" Color="#084E7D" options:Freeze="True" /> + <SolidColorBrush x:Key="CloseButtonStroke" Color="#AAFFFFFF" options:Freeze="True" /> + <SolidColorBrush x:Key="CloseButtonStrokeHighlighted" Color="#FFFFFF" options:Freeze="True" /> + + <!-- Menu --> + <SolidColorBrush x:Key="MenuSeparatorBorderBrush" Color="#333337" options:Freeze="True" /> + <SolidColorBrush x:Key="MenuItemHighlightedBackground" Color="#3E3E40" options:Freeze="True" /> + <SolidColorBrush x:Key="SubmenuItemBackground" Color="#1B1B1C" options:Freeze="True" /> + <SolidColorBrush x:Key="SubmenuItemBackgroundHighlighted" Color="#333334" options:Freeze="True" /> + <SolidColorBrush x:Key="MenuDisabledForeground" Color="#656565" options:Freeze="True" /> + + <!-- Scroll Bar --> + <SolidColorBrush x:Key="ScrollBarPageButtonBackgroundHighlighted" Color="#05FFFFFF" options:Freeze="True" /> + + <!-- Notification Button --> + <SolidColorBrush x:Key="NotificationButtonForegroundBrush" Color="#000000" /> + <SolidColorBrush x:Key="NotificationButtonBackgroundBrush" Color="#FFCC00" /> + <SolidColorBrush x:Key="NotificationButtonBackgroundOverBrush" Color="#FFDF66" /> + <SolidColorBrush x:Key="NotificationButtonBackgroundPressedBrush" Color="#C59E00" /> + + <!-- Quick Launch TextBox --> + <SolidColorBrush x:Key="QuickLaunchTextBoxBorderBrush" Color="#3F3F46" /> + <SolidColorBrush x:Key="QuickLaunchTextBoxFocusedBorderBrush" Color="#007ACC" /> + + <SolidColorBrush x:Key="HoverBackgroundBrush" Color="Red" options:Freeze="True" /> + +</ResourceDictionary> +
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml new file mode 100644 index 000000000..587997450 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml @@ -0,0 +1,148 @@ +<UserControl x:Class="Tango.Scripting.IDE.ScriptIDEView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" + xmlns:fa="http://schemas.fontawesome.io/icons/" + xmlns:controls="clr-namespace:Tango.Scripting.IDE.Controls" + xmlns:local="clr-namespace:Tango.Scripting.IDE" + mc:Ignorable="d" + d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:ScriptIDEViewVM, IsDesignTimeCreatable=False}" x:Name="control"> + + <UserControl.Resources> + <ResourceDictionary> + <ResourceDictionary.MergedDictionaries> + <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! --> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" /> + + <!-- Accent and AppTheme setting --> + + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" /> + + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Styles.xaml" /> + + <ResourceDictionary Source="Resources.xaml" /> + </ResourceDictionary.MergedDictionaries> + </ResourceDictionary> + </UserControl.Resources> + + <Grid Background="{StaticResource IdeLightBackgroundBrush}"> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="40"/> + <RowDefinition Height="41*"/> + </Grid.RowDefinitions> + + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="20"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <Grid> + <Menu> + <MenuItem Header="File"></MenuItem> + <MenuItem Header="Edit"></MenuItem> + <MenuItem Header="View"></MenuItem> + <MenuItem Header="Project"></MenuItem> + <MenuItem Header="Build"></MenuItem> + <MenuItem Header="Debug"></MenuItem> + <MenuItem Header="Tools"></MenuItem> + <MenuItem Header="Theme"></MenuItem> + </Menu> + </Grid> + </Grid> + + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*" MinWidth="100" /> + <ColumnDefinition Width="5"/> + <ColumnDefinition Width="300" MinWidth="20" /> + </Grid.ColumnDefinitions> + + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*" MinHeight="100" /> + <RowDefinition Height="5"/> + <RowDefinition Height="100" MinHeight="20" /> + </Grid.RowDefinitions> + + <Grid> + <TabControl ItemsSource="{Binding OpenProjectItems}" SelectedItem="{Binding SelectedProjectItem}"> + <TabControl.ItemContainerStyle> + <Style BasedOn="{StaticResource MetroTabItem}" TargetType="{x:Type TabItem}"> + <Setter Property="Background" Value="{StaticResource IdeLightBackgroundBrush}"></Setter> + <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="12"></Setter> + <Setter Property="HeaderTemplate"> + <Setter.Value> + <DataTemplate> + <Border> + <StackPanel Orientation="Horizontal"> + <TextBlock Text="{Binding Name}" Foreground="Gainsboro" VerticalAlignment="Center"></TextBlock> + <Button Command="{Binding ElementName=control,Path=DataContext.CloseProjectItemCommand}" CommandParameter="{Binding}" Margin="5 0 0 0" Cursor="Hand" Width="24" Height="24" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0"> + <StackPanel Orientation="Horizontal"> + <fa:ImageAwesome Width="10" Height="10" Icon="WindowClose" Foreground="Gainsboro"></fa:ImageAwesome> + </StackPanel> + </Button> + </StackPanel> + </Border> + </DataTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=IsSelected}" Value="True"> + <Setter Property="Background" Value="#007ACC"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </TabControl.ItemContainerStyle> + + <TabControl.ContentTemplate> + <DataTemplate> + <ContentPresenter Content="{Binding View}" /> + </DataTemplate> + </TabControl.ContentTemplate> + </TabControl> + </Grid> + + <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" Background="{StaticResource IdeLightBackgroundBrush}" /> + + <Grid Grid.Row="2" Background="{StaticResource IdeMidBackgroundBrush}"> + + </Grid> + </Grid> + + <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Background="{StaticResource IdeLightBackgroundBrush}" /> + + <Grid Grid.Column="2"> + <GroupBox Margin="0" Header="Solution Explorer" BorderThickness="1" BorderBrush="{StaticResource IdeBorderBrush}" mahapps:ControlsHelper.ContentCharacterCasing="Normal"> + <TreeView ItemsSource="{Binding Solution.Projects}" Background="{StaticResource IdeMidBackgroundBrush}" > + <TreeView.ItemContainerStyle> + <Style TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}"> + <Setter Property="Background" Value="Transparent"></Setter> + <Style.Triggers> + <Trigger Property="IsMouseOver" Value="True"> + <Setter Property="Background" Value="Transparent"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </TreeView.ItemContainerStyle> + <TreeView.ItemTemplate> + <HierarchicalDataTemplate ItemsSource="{Binding Path=Items}" DataType="{x:Type local:IProject}"> + <controls:SolutionItemControl SolutionItem="{Binding}" OpenCommand="{Binding ElementName=control,Path=DataContext.OpenProjectItemCommand}" /> + </HierarchicalDataTemplate> + </TreeView.ItemTemplate> + </TreeView> + </GroupBox> + </Grid> + </Grid> + </Grid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml.cs new file mode 100644 index 000000000..3c816be05 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Scripting.IDE +{ + /// <summary> + /// Interaction logic for ScriptIDEControl.xaml + /// </summary> + public partial class ScriptIDEView : UserControl + { + public ScriptIDEView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView2.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView2.xaml new file mode 100644 index 000000000..a28101a17 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView2.xaml @@ -0,0 +1,136 @@ +<UserControl x:Class="Tango.Scripting.IDE.ScriptIDEView2" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.Scripting.IDE" + xmlns:fa="http://schemas.fontawesome.io/icons/" + xmlns:controls="clr-namespace:Tango.Scripting.IDE.Controls" + mc:Ignorable="d" + d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:ScriptIDEViewVM, IsDesignTimeCreatable=False}" x:Name="control"> + <UserControl.Resources> + <ResourceDictionary> + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="Themes/DarkThemesColors.xaml"/> + <ResourceDictionary Source="Themes/Shared.xaml"/> + </ResourceDictionary.MergedDictionaries> + </ResourceDictionary> + </UserControl.Resources> + <Grid Background="{DynamicResource Background.Static}"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" ></RowDefinition> + <RowDefinition Height="Auto"></RowDefinition> + <RowDefinition Height="*"></RowDefinition> + </Grid.RowDefinitions> + <Menu Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,0,0,0" Style="{DynamicResource TangoMenuStyle}"> + <MenuItem Header="File"> + <MenuItem Header="New"></MenuItem> + <MenuItem Header="Open"></MenuItem> + <MenuItem Header="Start page"></MenuItem> + <Separator/> + <MenuItem Header="Add"></MenuItem> + <Separator/> + <MenuItem Header="Close"></MenuItem> + <Separator/> + <MenuItem Header="Save"> + <MenuItem.Icon> + <Image Source="/Tango.Scripting.IDE;component/Images/Save_16x.png" Height="10"/> + </MenuItem.Icon> + </MenuItem> + <MenuItem Header="SaveAll"> + <MenuItem.Icon> + <Image Source="/Tango.Scripting.IDE;component/Images/SaveAll_16x.png" Height="10"/> + </MenuItem.Icon> + </MenuItem> + <Separator/> + <MenuItem Header="Exit"></MenuItem> + </MenuItem> + <MenuItem Header="Edit"></MenuItem> + <MenuItem Header="View"></MenuItem> + <MenuItem Header="Project"></MenuItem> + <MenuItem Header="Build"></MenuItem> + <MenuItem Header="Debug"></MenuItem> + <MenuItem Header="Tools"></MenuItem> + <MenuItem Header="Theme"></MenuItem> + </Menu> + <ToolBarTray Grid.Row="1" Background="{DynamicResource Background.Static}" Width="Auto" Orientation="Horizontal"> + <ToolBar Style="{DynamicResource TangoToolBarStyle}" Background="{DynamicResource Background.Static}" Height="30" HorizontalAlignment="Left" Foreground="{DynamicResource ControlForegroundKey}"> + + <Button Click="Button_Click" ToolTip="New Project"> + <Image Source="/Tango.Scripting.IDE;component/Images/NewFileCollection_16x.png" Height="16"/> + </Button> + <Button Click="Button_Click" ToolTip="Open File"> + <Image Source="/Tango.Scripting.IDE;component/Images/OpenFolder_16x.png" Height="16"/> + </Button> + <Button Click="Button_Click" ToolTip="Open File"> + <Image Source="/Tango.Scripting.IDE;component/Images/Save_16x.png" Height="16"/> + </Button> + <Button Click="Button_Click" ToolTip="Open File"> + <Image Source="/Tango.Scripting.IDE;component/Images/SaveAll_16x.png" Height="16"/> + </Button> + <Separator ></Separator> + <ComboBox Style="{DynamicResource TangoComboboxStyle}" Margin="2" x:Name="cmb2" SelectedIndex="0" HorizontalContentAlignment="Stretch" Width="100" > + <ComboBoxItem IsSelected="True">Debug</ComboBoxItem> + <ComboBoxItem >Release</ComboBoxItem> + <ComboBoxItem>Configuration Manager...</ComboBoxItem> + </ComboBox> + <Button Foreground="White" Click="Button_Click" Content="Cut" ToolBar.OverflowMode="Always" /> + </ToolBar> + </ToolBarTray> + <Grid Grid.Row="2"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*" MinWidth="100" /> + <ColumnDefinition Width="5"/> + <ColumnDefinition Width="300" MinWidth="20" /> + </Grid.ColumnDefinitions> + + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*" MinHeight="100" /> + <RowDefinition Height="5"/> + <RowDefinition Height="100" MinHeight="20" /> + </Grid.RowDefinitions> + + <Grid> + <TabControl Foreground="{DynamicResource ControlForegroundKey}" ItemsSource="{Binding OpenProjectItems}" SelectedItem="{Binding SelectedProjectItem}" Style="{DynamicResource TangoTabControlStyle}"> + <TabControl.ItemTemplate> + <DataTemplate> + <TextBlock Text="{Binding Name}" Foreground="Gainsboro" VerticalAlignment="Center"></TextBlock> + </DataTemplate> + </TabControl.ItemTemplate> + <TabControl.ContentTemplate> + <DataTemplate> + <ContentPresenter Content="{Binding View}" /> + </DataTemplate> + </TabControl.ContentTemplate> + </TabControl> + + </Grid> + + <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" Background="{DynamicResource Background.Static}" /> + <Grid Grid.Row="2" Background="{DynamicResource Background.Static}"> + <Border BorderThickness="0" Margin="1,0,0,2"> + <TabControl TabStripPlacement="Bottom" Style="{DynamicResource TangoTabControlStyle}"> + <TabItem Header="Error list">error list</TabItem> + <TabItem Header="Output">output</TabItem> + </TabControl> + </Border> + </Grid> + </Grid> + + <GridSplitter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Background="{DynamicResource Background.Static}" /> + + <Grid Grid.Column="2"> + <GroupBox Margin="0,0,5,5" Header="Solution Explorer" BorderThickness="1" Style="{DynamicResource TangoGroupBoxStyle}" > + <TreeView Style="{DynamicResource TangoTreeViewStyle}" ItemsSource="{Binding Solution.Projects}" Background="{DynamicResource TabItem.Content.Static}" > + <TreeView.ItemTemplate> + <HierarchicalDataTemplate ItemsSource="{Binding Path=Items}" DataType="{x:Type local:IProject}"> + <controls:SolutionItemControl SolutionItem="{Binding}" OpenCommand="{Binding ElementName=control,Path=DataContext.OpenProjectItemCommand}" /> + </HierarchicalDataTemplate> + </TreeView.ItemTemplate> + </TreeView> + </GroupBox> + </Grid> + </Grid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView2.xaml.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView2.xaml.cs new file mode 100644 index 000000000..27251851c --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEView2.xaml.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Scripting.IDE +{ + + /// <summary> + /// Interaction logic for ScriptIDEView2.xaml + /// </summary> + public partial class ScriptIDEView2 : UserControl + { + public enum eSkin { Dark, Light } + public static eSkin Skin { get; set; } + public ScriptIDEView2() + { + InitializeComponent(); + } + public void ChangeSkin(eSkin newSkin) + { + Skin = newSkin; + Resources.Clear(); + Resources.MergedDictionaries.Clear(); + if (Skin == eSkin.Dark) + ApplyResources("Themes/DarkThemesColors.xaml"); + else if (Skin == eSkin.Light) + ApplyResources("Themes/LightThemesColors.xaml"); + ApplyResources("Themes/Shared.xaml"); + } + + private void ApplyResources(string src) + { + var dict = new ResourceDictionary() { Source = new Uri(src, UriKind.Relative) }; + foreach (var mergeDict in dict.MergedDictionaries) + { + Resources.MergedDictionaries.Add(mergeDict); + } + + foreach (var key in dict.Keys) + { + Resources[key] = dict[key]; + } + } + + private void Button_Click(object sender, RoutedEventArgs e) + { + MessageBox.Show("I am here"); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEViewVM.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEViewVM.cs new file mode 100644 index 000000000..e52b58775 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ScriptIDEViewVM.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Commands; +using Tango.Scripting.IDE.Projects; +using Tango.Scripting.IDE.ProjectTypes; +using Tango.SharedUI; + +namespace Tango.Scripting.IDE +{ + public class ScriptIDEViewVM : ViewModel + { + private List<IProjectType> _projectTypes; + + #region Properties + + private Solution _solution; + public Solution Solution + { + get { return _solution; } + set { _solution = value; RaisePropertyChangedAuto(); } + } + + private IProject _selectedProject; + public IProject SelectedProject + { + get { return _selectedProject; } + set { _selectedProject = value; RaisePropertyChangedAuto(); } + } + + private IProjectItem _selectedProjectItem; + public IProjectItem SelectedProjectItem + { + get { return _selectedProjectItem; } + set { _selectedProjectItem = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection<IProjectItem> _openProjectItems; + public ObservableCollection<IProjectItem> OpenProjectItems + { + get { return _openProjectItems; } + set { _openProjectItems = value; RaisePropertyChangedAuto(); } + } + + #endregion + + #region Commands + + public RelayCommand<IProjectItem> OpenProjectItemCommand { get; set; } + + public RelayCommand<IProjectItem> CloseProjectItemCommand { get; set; } + + #endregion + + #region Constructors + + public ScriptIDEViewVM() + { + _projectTypes = new List<IProjectType>(); + OpenProjectItems = new ObservableCollection<IProjectItem>(); + + RegisterProjectType(new StubProjectType()); + + Solution = new Solution(); + Solution.Projects.Add(_projectTypes.First().NewProject("Test Project.stub")); + + //Init Commands + OpenProjectItemCommand = new RelayCommand<IProjectItem>(OpenProjectItem); + CloseProjectItemCommand = new RelayCommand<IProjectItem>(CloseProjectItem); + } + + #endregion + + #region Public Methods + + private void OpenProjectItem(IProjectItem projectItem) + { + if (!OpenProjectItems.Contains(projectItem)) + { + OpenProjectItems.Add(projectItem); + } + + SelectedProjectItem = projectItem; + } + + private void CloseProjectItem(IProjectItem projectItem) + { + OpenProjectItems.Remove(projectItem); + + SelectedProjectItem = OpenProjectItems.FirstOrDefault(); + } + + public void RegisterProjectType(IProjectType projectType) + { + _projectTypes.Add(projectType); + } + + public void UnRegisterProjectItemHandler(IProjectType projectType) + { + _projectTypes.Remove(projectType); + } + + #endregion + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Solution.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Solution.cs new file mode 100644 index 000000000..eded27413 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Solution.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Scripting.IDE +{ + public class Solution + { + public ObservableCollection<IProject> Projects { get; set; } + + public Solution() + { + Projects = new ObservableCollection<IProject>(); + } + } +} diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Tango.Scripting.IDE.csproj b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Tango.Scripting.IDE.csproj new file mode 100644 index 000000000..5dde283e0 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Tango.Scripting.IDE.csproj @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{C9F60285-91FB-4293-BCF5-164D76755CDD}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.Scripting.IDE</RootNamespace> + <AssemblyName>Tango.Scripting.IDE</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL"> + <HintPath>..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath> + </Reference> + <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL"> + <HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath> + </Reference> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="Tango.Core, Version=2.0.33.1608, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\Build\Core\Debug\Tango.Core.dll</HintPath> + </Reference> + <Reference Include="Tango.SharedUI"> + <HintPath>..\..\..\Build\Core\Debug\Tango.SharedUI.dll</HintPath> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Controls\SharedResourceDictionary.cs" /> + <Compile Include="Controls\SolutionItemControl.cs" /> + <Compile Include="Controls\TabConrolClose.cs" /> + <Compile Include="Dialogs\NewProjectDialog.xaml.cs"> + <DependentUpon>NewProjectDialog.xaml</DependentUpon> + </Compile> + <Compile Include="Dialogs\NewProjectDialogVM.cs" /> + <Compile Include="IProjectType.cs" /> + <Compile Include="ISolutionItem.cs" /> + <Compile Include="ProjectItem.cs" /> + <Compile Include="ProjectItemsViews\CSharpScriptItemView.xaml.cs"> + <DependentUpon>CSharpScriptItemView.xaml</DependentUpon> + </Compile> + <Compile Include="ProjectItems\CSharpScriptItem.cs" /> + <Compile Include="ProjectItems\ReferenceAssembliesItem.cs" /> + <Compile Include="ProjectItems\ReferenceAssemblyItem.cs" /> + <Compile Include="Projects\CSharpProject.cs" /> + <Compile Include="IProjectItem.cs" /> + <Compile Include="IProject.cs" /> + <Compile Include="Project.cs" /> + <Compile Include="Projects\UnitTestProject.cs" /> + <Compile Include="ProjectTypes\StubProjectType.cs" /> + <Compile Include="ProjectTypes\UnitTestProjectType.cs" /> + <Compile Include="ScriptIDEView.xaml.cs"> + <DependentUpon>ScriptIDEView.xaml</DependentUpon> + </Compile> + <Compile Include="ScriptIDEView2.xaml.cs"> + <DependentUpon>ScriptIDEView2.xaml</DependentUpon> + </Compile> + <Compile Include="ScriptIDEViewVM.cs" /> + <Compile Include="Solution.cs" /> + <Compile Include="Projects\StubProject.cs" /> + <Page Include="Dialogs\NewProjectDialog.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="ProjectItemsViews\CSharpScriptItemView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Resources.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="ScriptIDEView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="ScriptIDEView2.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\ComboboxStyle.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\DarkThemesColors.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\Generic.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Page Include="Themes\LightThemesColors.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\MenuDict.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\Shared.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\TabConrolStyle.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\ToolbarStyle.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Themes\TreeViewItem.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="app.config" /> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Tango.Scripting.Editors\Tango.Scripting.Editors.csproj"> + <Project>{6c55b776-26d4-4db3-a6ab-87e783b2f3d1}</Project> + <Name>Tango.Scripting.Editors</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.Scripting\Tango.Scripting.csproj"> + <Project>{1e938fd2-c669-4738-98c9-77f96ce4d451}</Project> + <Name>Tango.Scripting</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\CSharpScriptItem.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Reference.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\CSharpProject.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\StubProject.png" /> + </ItemGroup> + <ItemGroup> + <Folder Include="Converters\" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Save_16x.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\SaveAll_16x.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\NewFileCollection_16x.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\OpenFolder_16x.png" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ComboboxStyle.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ComboboxStyle.xaml new file mode 100644 index 000000000..503f8c20c --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ComboboxStyle.xaml @@ -0,0 +1,200 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes"> + <Style x:Key="ToolBarComboBoxTransparentButtonStyle" TargetType="{x:Type ToggleButton}"> + <Setter Property="MinWidth" Value="0"/> + <Setter Property="MinHeight" Value="0"/> + <Setter Property="Width" Value="Auto"/> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="Focusable" Value="false"/> + <Setter Property="ClickMode" Value="Press"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ToggleButton}"> + <Grid Background="Transparent"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + <ColumnDefinition SharedSizeGroup="ComboBoxButton" Width="Auto"/> + </Grid.ColumnDefinitions> + <Border x:Name="Chrome" Width="13" SnapsToDevicePixels="true" Grid.Column="1" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"> + <Path x:Name="ArrowDownPath" VerticalAlignment="Center" Fill="{DynamicResource ControlForegroundKey}" Data="M 2.5 0 L 8.5 0 L 5.5 3 Z"/> + </Border> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="BorderBrush" TargetName="Chrome" Value="{x:Null}"/> + </Trigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="IsMouseOver" Value="true"/> + <Condition Property="IsChecked" Value="false"/> + </MultiTrigger.Conditions> + <Setter Property="Background" TargetName="Chrome" Value="Transparent"/> + <Setter Property="Fill" TargetName="ArrowDownPath" Value="{DynamicResource ToolBarButtonPressedBorder}"/> + + </MultiTrigger> + <Trigger Property="IsChecked" Value="true"> + <Setter Property="BorderBrush" TargetName="Chrome" Value="{DynamicResource ToolBarButtonPressedBorder}"/> + <Setter Property="Background" TargetName="Chrome" Value="{DynamicResource ToolBarButtonPressedBorder}"/> + </Trigger> + <Trigger Property="IsPressed" Value="true"> + <Setter Property="Background" TargetName="Chrome" Value="{DynamicResource ToolBarButtonPressed}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Fill" TargetName="ArrowDownPath" Value="{DynamicResource ToolBarDisabledBorder}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}"> + <Setter Property="OverridesDefaultStyle" Value="true"/> + <Setter Property="AllowDrop" Value="true"/> + <Setter Property="MinWidth" Value="0"/> + <Setter Property="MinHeight" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/> + <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type TextBox}"> + <ScrollViewer x:Name="PART_ContentHost" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" Focusable="false" Background="Transparent"/> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <Style x:Key="TangoComboboxStyle" TargetType="{x:Type ComboBox}"> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="Foreground" Value="{DynamicResource ControlForegroundKey}"/> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="BorderBrush" Value="{DynamicResource Inactive.Selection}"/> + <Setter Property="BorderThickness" Value="1"/> + <Setter Property="Margin" Value="1,0"/> + <Setter Property="Padding" Value="0"/> + <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> + <Setter Property="ScrollViewer.CanContentScroll" Value="true"/> + <Setter Property="ScrollViewer.PanningMode" Value="Both"/> + <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> + <Setter Property="HorizontalAlignment" Value="Center"/> + <Setter Property="VerticalAlignment" Value="Center"/> + <Setter Property="MinHeight" Value="18"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ComboBox}"> + <Grid SnapsToDevicePixels="true"> + <Grid Grid.IsSharedSizeScope="true"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + <ColumnDefinition SharedSizeGroup="ComboBoxButton" Width="Auto"/> + </Grid.ColumnDefinitions> + <Border x:Name="Background" Background="{TemplateBinding Background}"/> + <Border x:Name="SelectedContentBorder" Margin="2,2,1,2"> + <ContentPresenter x:Name="ContentSite" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Content="{TemplateBinding SelectionBoxItem}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/> + </Border> + <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2"/> + <ToggleButton x:Name="DropDownButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ToolBarComboBoxTransparentButtonStyle}"/> + <TextBox x:Name="PART_EditableTextBox" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="1,1,0,1" MinHeight="18" Padding="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" Visibility="Collapsed" VerticalAlignment="Center"/> + </Grid> + <Popup x:Name="PART_Popup" AllowsTransparency="true" Focusable="false" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom"> + <Border x:Name="DropDownBorder" BorderBrush="{DynamicResource ComboboxDropDownBorder}" BorderThickness="1" Background="{DynamicResource ComboboxDropDownBackground}" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}" Margin="2,0,0,0"> + <ScrollViewer x:Name="DropDownScrollViewer"> + <Grid RenderOptions.ClearTypeHint="Enabled"> + <Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0"> + <Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=DropDownBorder}" Height="{Binding ActualHeight, ElementName=DropDownBorder}" Width="{Binding ActualWidth, ElementName=DropDownBorder}"/> + </Canvas> + <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained"/> + </Grid> + </ScrollViewer> + </Border> + </Popup> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Foreground" Value="{DynamicResource Menu.Disable.Foreground}"/> + <Setter Property="Background" TargetName="Background" Value="{DynamicResource ToolBarDisabledFill}"/> + <Setter Property="Grid.ColumnSpan" TargetName="Background" Value="2"/> + <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ToolBarDisabledBorder}"/> + </Trigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="IsKeyboardFocusWithin" Value="true"/> + <Condition Property="IsDropDownOpen" Value="false"/> + <Condition Property="IsEditable" Value="false"/> + </MultiTrigger.Conditions> + <Setter Property="Background" TargetName="SelectedContentBorder" Value="{DynamicResource ListBorder}"/> + <Setter Property="Foreground" Value="{DynamicResource ControlForegroundKey}"/> + </MultiTrigger> + <Trigger Property="IsEditable" Value="true"> + <Setter Property="Background" TargetName="DropDownButton" Value="{x:Null}"/> + <Setter Property="Visibility" TargetName="ContentSite" Value="Collapsed"/> + <Setter Property="Visibility" TargetName="PART_EditableTextBox" Value="Visible"/> + </Trigger> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="BorderBrush" TargetName="DropDownButton" Value="{DynamicResource ToolBarButtonHoverBorder}"/> + <Setter Property="Background" TargetName="DropDownButton" Value="{DynamicResource DropDownButtonHover}"/> + <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ToolBarButtonHoverBorder}"/> + </Trigger> + <Trigger Property="IsKeyboardFocusWithin" Value="true"> + <Setter Property="BorderBrush" TargetName="DropDownButton" Value="{DynamicResource ToolBarButtonHoverBorder}"/> + <Setter Property="Background" TargetName="DropDownButton" Value="{DynamicResource DropDownButtonHover}"/> + <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource ToolBarButtonHoverBorder}"/> + </Trigger> + <Trigger Property="HasItems" Value="false"> + <Setter Property="MinHeight" TargetName="DropDownBorder" Value="95"/> + </Trigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="IsGrouping" Value="true"/> + <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/> + </MultiTrigger.Conditions> + <Setter Property="ScrollViewer.CanContentScroll" Value="false"/> + </MultiTrigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="IsKeyboardFocusWithin" Value="true"/> + <Condition Property="IsDropDownOpen" Value="false"/> + <Condition Property="IsEditable" Value="false"/> + </MultiTrigger.Conditions> + <Setter Property="Foreground" Value="{DynamicResource ControlForegroundKey}"/> + </MultiTrigger> + <Trigger Property="IsEditable" Value="true"> + <Setter Property="Padding" Value="2"/> + <Setter Property="IsTabStop" Value="false"/> + </Trigger> + <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false"> + <Setter Property="Canvas.Top" TargetName="OpaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/> + <Setter Property="Canvas.Left" TargetName="OpaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Resources> + <Style TargetType="{x:Type ComboBoxItem}"> + <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" /> + <Setter Property="Control.Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ComboBoxItem}"> + <Border x:Name="ItemBorder" Background="{DynamicResource ComboboxItemBackground}" BorderBrush="Transparent" BorderThickness="1"> + <ContentPresenter /> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="Background" TargetName="ItemBorder" Value="{DynamicResource ComboboxItemMouseOverBackground}"/> + </Trigger> + + <Trigger Property="IsKeyboardFocusWithin" Value="true"> + <Setter Property="Background" TargetName="ItemBorder" Value="{DynamicResource ComboboxItemMouseOverBackground}"/> + </Trigger> + + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + </Style.Resources> + </Style> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/DarkThemesColors.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/DarkThemesColors.xaml new file mode 100644 index 000000000..867c89032 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/DarkThemesColors.xaml @@ -0,0 +1,65 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes"> + + <SolidColorBrush x:Key="Menu.Background" Color="#FF2D2D30"/> + <SolidColorBrush x:Key="Menu.Foreground" Color="#FFF1F1F1"/> + <SolidColorBrush x:Key="Menu.MouseOverColor" Color="#FF464646"/> + <SolidColorBrush x:Key="Menu.Disable.Foreground" Color="#FF888888"/> + <SolidColorBrush x:Key="Menu.Submenu.Background" Color="#FF1B1B1C"/> + <SolidColorBrush x:Key="Menu.Submenu.MouseOverColor" Color="#FF3E3E40"/> + <SolidColorBrush x:Key="Grip.Submenu.Background.Static" Color="#FF3F3F46"/> + <SolidColorBrush x:Key="Grip.Submenu.Background.Selected" Color="#FF007ACC"/> + + <SolidColorBrush x:Key="Background.Static" Color="#FF2D2D30"/> + + <SolidColorBrush x:Key="ControlTextBrush" Color="#FFF0F0F0"/> + <SolidColorBrush x:Key="ControlBrushColorKey" Color="#FF007ACC"/> + <SolidColorBrush x:Key="ControlForegroundKey" Color="#FFF1F1F1"/> + <SolidColorBrush x:Key="HighlightTextBrushKey" Color="#FFF0F0F0"/> + <SolidColorBrush x:Key="ListBorder" Color="#FF3F3F46"/> + <SolidColorBrush x:Key="Inactive.Selection" Color="#FF444444"/> + + + <SolidColorBrush x:Key="TabItem.Selected.Background" Color="#FF007ACC"/> + <SolidColorBrush x:Key="TabItem.Selected.Border" Color="#FF007ACC"/> + <SolidColorBrush x:Key="TabItem.MouseOver.Border" Color="#FF007ACC"/> + <SolidColorBrush x:Key="TabItem.MouseOver.Background" Color="#FF007ACC"/> + <SolidColorBrush x:Key="TabItem.Disabled.Border" Color="#FF444444"/> + <SolidColorBrush x:Key="TabItem.Content.Static" Color="#FF1E1E1E"/> + <SolidColorBrush x:Key="TabItem.Static.Background" Color="Transparent" /> + <SolidColorBrush x:Key="TabItem.Static.Border" Color="Transparent"/> + <SolidColorBrush x:Key="TabItem.Disabled.Background" Color="#FF444444"/> + <SolidColorBrush x:Key="TabItem.MouseOver.Bottom.Background" Color="#19FFFFFF"/> + + <SolidColorBrush x:Key="ToolBarHorizontalBackground" Color="#FF2D2D30"/> + <SolidColorBrush x:Key="ToolBarToggleButtonVerticalBackground" Color="#FF2D2D30"/> + <SolidColorBrush x:Key="ToolBarButtonHover" Color="#42595959"/> + <SolidColorBrush x:Key="ToolBarGripper" Color="#FF3F3F46"/> + <SolidColorBrush x:Key="ToolBarVerticalBackground" Color="#FF2D2D30"/> + <SolidColorBrush x:Key="ToolBarToggleButtonHorizontalBackground" Color="#FF2D2D30"/> + <SolidColorBrush x:Key="ToolBarMenuBorder" Color="#FF2D2D30"/> + <SolidColorBrush x:Key="ToolBarSubMenuBackground" Color="#FF2D2D30"/> + + <SolidColorBrush x:Key="TreeBackgroundColor" Color="#FF252526"/> + <SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Checked.Fill" Color="#FFF0F0F0"/> + <SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Checked.Stroke" Color="#FFF0F0F0"/> + <SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Stroke" Color="#FF007ACC"/> + <SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Fill" Color="#FF007ACC"/> + <SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Checked.Stroke" Color="#FF007ACC"/> + <SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Checked.Fill" Color="#FF007ACC"/> + <SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Fill" Color="#FFF0F0F0"/> + <SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Stroke" Color="#FFF0F0F0"/> + + <SolidColorBrush x:Key="ToolBarDisabledFill" Color="#FF444444"/> + <SolidColorBrush x:Key="ToolBarDisabledBorder" Color="#FF2D2D2E"/> + <SolidColorBrush x:Key="ToolBarButtonHoverBorder" Color="#FF007ACC"/> + <SolidColorBrush x:Key="ToolBarButtonPressedBorder" Color="#FF007ACC"/> + <SolidColorBrush x:Key="ToolBarButtonPressed" Color="Transparent"/> + <SolidColorBrush x:Key="DropDownButtonHover" Color="#FF1F1F20"/> + <SolidColorBrush x:Key="ComboboxDropDownBorder" Color="#FF444444"/> + <SolidColorBrush x:Key="ComboboxDropDownBackground" Color="#FF1F1F20"/> + <SolidColorBrush x:Key="ComboboxItemBackground" Color="#FF1F1F20"/> + <SolidColorBrush x:Key="ComboboxItemMouseOverBackground" Color="#FF3F3F46"/> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Generic.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Generic.xaml new file mode 100644 index 000000000..6c016ae84 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Generic.xaml @@ -0,0 +1,36 @@ +<ResourceDictionary + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:controls="clr-namespace:Tango.Scripting.IDE.Controls" + xmlns:local="clr-namespace:Tango.Scripting.IDE"> + + <Style TargetType="{x:Type controls:SolutionItemControl}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type controls:SolutionItemControl}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + <StackPanel Orientation="Horizontal" Background="Transparent"> + <Image VerticalAlignment="Center" Width="16" Height="16" Source="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SolutionItem.Image}" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SolutionItem.Name}"></TextBlock> + </StackPanel> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + + <Style TargetType="{x:Type controls:TabConrolClose}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type controls:TabConrolClose}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> +</ResourceDictionary> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/LightThemesColors.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/LightThemesColors.xaml new file mode 100644 index 000000000..da65cc9b7 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/LightThemesColors.xaml @@ -0,0 +1,15 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes"> + + + <SolidColorBrush x:Key="Menu.Background" Color="#FF2D2D30"/> + <SolidColorBrush x:Key="Menu.Foreground" Color="#FFF1F1F1"/> + <SolidColorBrush x:Key="Menu.MouseOverColor" Color="#FF333334"/> + <SolidColorBrush x:Key="Menu.Disable.Foreground" Color="#FF888888"/> + <SolidColorBrush x:Key="Menu.Submenu.Background" Color="#FF1B1B1C"/> + <SolidColorBrush x:Key="Menu.Submenu.MouseOverColor" Color="#FF3E3E40"/> + <SolidColorBrush x:Key="Grip.Submenu.Background.Static" Color="#FF3F3F46"/> + <SolidColorBrush x:Key="Grip.Submenu.Background.Selected" Color="#FF007ACC"/> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/MenuDict.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/MenuDict.xaml new file mode 100644 index 000000000..b2c3fd965 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/MenuDict.xaml @@ -0,0 +1,184 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes"> + + + <Style x:Key="TangoMenuStyle" TargetType="{x:Type Menu}"> + <Setter Property="OverridesDefaultStyle" Value="True" /> + <Setter Property="Background" Value="{DynamicResource Menu.Background}"/> + <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}"/> + <Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MenuFontSizeKey}}"/> + <Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}"/> + <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}"/> + <Setter Property="Foreground" Value="{DynamicResource Menu.Foreground}"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Menu}"> + <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> + <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Resources> + <Style TargetType="{x:Type MenuItem}"> + <Setter Property="OverridesDefaultStyle" Value="True" /> + <Style.Triggers> + <Trigger Property="Role" Value="TopLevelHeader"> + <Setter Property="Template" Value="{DynamicResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}" /> + <Setter Property="Grid.IsSharedSizeScope" Value="true" /> + </Trigger> + <Trigger Property="Role" Value="TopLevelItem"> + <Setter Property="Template" Value="{DynamicResource {x:Static MenuItem.TopLevelItemTemplateKey}}" /> + </Trigger> + <Trigger Property="Role" Value="SubmenuHeader"> + <Setter Property="Template" Value="{DynamicResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}" /> + </Trigger> + <Trigger Property="Role" Value="SubmenuItem"> + <Setter Property="Template" Value="{DynamicResource {x:Static MenuItem.SubmenuItemTemplateKey}}" /> + </Trigger> + </Style.Triggers> + </Style> + <Style TargetType="TextBlock"> + <Setter Property="TextWrapping" Value="Wrap"></Setter> + </Style> + </Style.Resources> + </Style> + <Geometry x:Key="Checkmark">M 0,5.1 L 1.7,5.2 L 3.4,7.1 L 8,0.4 L 9.2,0 L 3.3,10.8 Z</Geometry> + <!-- TopLevelHeader --> + <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}"> + <Grid x:Name="Border" Background="Transparent" Margin="0,2,0,2"> + <Rectangle x:Name="Bg" Fill="Transparent" /> + <Rectangle x:Name="Inner_Border" Margin="4" Fill="Transparent"/> + <ContentPresenter Margin="8,2,8,2" ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + <Popup x:Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade"> + <Border x:Name="SubmenuBorder" BorderBrush="Transparent" BorderThickness="0" Background="{DynamicResource Menu.Background}" Padding="2"> + <Grid RenderOptions.ClearTypeHint="Enabled" Background="Transparent"> + <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/> + </Grid> + </Border> + </Popup> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsSuspendingPopupAnimation" Value="true"> + <Setter TargetName="Popup" Property="PopupAnimation" Value="None" /> + </Trigger> + <Trigger Property="IsHighlighted" Value="true"> + <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> + </Trigger> + <Trigger SourceName="Popup" Property="AllowsTransparency" Value="True"> + <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0,0,4,4" /> + <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,0,0,3" /> + </Trigger> + <Trigger Property="IsEnabled" Value="False"> + <Setter Property="Foreground" Value="{DynamicResource Menu.Disable.Foreground}"/> + </Trigger> + <Trigger Property="IsSubmenuOpen" Value="true"> + <Setter Property="Background" TargetName="Border" Value="{DynamicResource Menu.Submenu.Background}"/> + <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.Background}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + + <!-- TopLevelItem --> + <ControlTemplate x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}" TargetType="{x:Type MenuItem}" > + <Grid SnapsToDevicePixels="true" Background="Transparent" Margin="0,2,0,2"> + <Rectangle x:Name="Bg" Fill="Transparent" /> + <Rectangle x:Name="InnerBorder" Margin="4" Fill="Transparent"/> + <!--<DockPanel> + <ContentPresenter x:Name="Icon" ContentSource="Icon" Margin="4,0,6,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/> + <Path x:Name="GlyphPanel" Data="{StaticResource Checkmark}" Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" Margin="7,0,0,0" Visibility="Collapsed" VerticalAlignment="Center"/>--> + <ContentPresenter ContentSource="Header" Margin="8,2,8,2" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + <!--</DockPanel>--> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsHighlighted" Value="true"> + <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="False"> + <Setter Property="Foreground" Value="{DynamicResource Menu.Disable.Foreground}"/> + </Trigger> + <Trigger Property="IsKeyboardFocused" Value="true"> + <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + <ControlTemplate x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}" TargetType="MenuItem"> + <Grid SnapsToDevicePixels="true" Background="{DynamicResource Menu.Submenu.Background}" x:Name="_grid" MinHeight="22"> + <Rectangle x:Name="Bg" Fill="Transparent" /> + <Rectangle x:Name="Inner_Border" Margin="4" Fill="Transparent"/> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition SharedSizeGroup="Icon" Width="Auto" MinWidth="20"/> + <ColumnDefinition Width="*" MinWidth="60"/> + <ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto" MinWidth="60"/> + <ColumnDefinition Width="13" /> + </Grid.ColumnDefinitions> + <ContentPresenter x:Name="Iconh" ContentSource="Icon" Margin="3" VerticalAlignment="Center" Grid.Column="0"/> + <ContentPresenter x:Name="HeaderHost" Margin="3,0,3,0" Grid.Column="1" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="True" TextOptions.TextFormattingMode="Display" /> + <TextBlock Grid.Column="2" Margin="10,0,0,0" Text="{TemplateBinding InputGestureText}" VerticalAlignment="Center"/> + <Path x:Name="RightArrow" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 0 7 L 4 3.5 Z" Fill="{DynamicResource Grip.Submenu.Background.Static}" Margin="8,0,0,0"/> + <Popup x:Name="popup" PlacementTarget="{Binding ElementName=_grid}" Placement="Right" HorizontalOffset="0" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade"> + <Border x:Name="SubmenuBorder" SnapsToDevicePixels="True" Background="{DynamicResource Menu.Submenu.Background}" BorderThickness="0" BorderBrush="#49a3e1"> + <ItemsPresenter x:Name="_items" /> + </Border> + </Popup> + </Grid> + </Grid> + <!--</Border>--> + <ControlTemplate.Triggers> + <Trigger Property="IsHighlighted" Value="True" > + <Setter Property="Visibility" Value="Visible" TargetName="_items" /> + <Setter Property="IsOpen" Value="True" TargetName="popup" /> + <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> + <Setter Property="Fill" TargetName="Inner_Border" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> + <Setter TargetName="RightArrow" Property="Fill" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="False"> + <Setter Property="Foreground" Value="{DynamicResource Menu.Disable.Foreground}"/> + </Trigger> + <Trigger Property="IsSubmenuOpen" Value="true"> + <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> + <Setter Property="Fill" TargetName="Inner_Border" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + <ControlTemplate x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}" TargetType="MenuItem"> + <Grid SnapsToDevicePixels="true" Background="{DynamicResource Menu.Submenu.Background}" MinHeight="22"> + <Rectangle x:Name="Bg" Fill="Transparent" /> + <Rectangle x:Name="InnerBorder" Margin="4"/> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" MinWidth="24" SharedSizeGroup="IconGroup"/> + <ColumnDefinition Width="Auto" MinWidth="60" /> + <ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto" MinWidth="60"/> + <ColumnDefinition Width="20" /> + </Grid.ColumnDefinitions> + <ContentPresenter x:Name="Icon" ContentSource="Icon" Margin="{TemplateBinding Padding}" /> + <ContentPresenter Grid.Column="1" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + <TextBlock Grid.Column="2" Margin="10,0,0,0" Text="{TemplateBinding InputGestureText}" VerticalAlignment="Center"/> + </Grid> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsHighlighted" Value="True"> + <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> + </Trigger> + <Trigger Property="Icon" Value="{x:Null}"> + <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" /> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + + <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}"> + <Setter Property="Height" Value="1" /> + <Setter Property="Margin" Value="20,0,2,0" /> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Separator}"> + <Border BorderThickness="1" BorderBrush="{DynamicResource Submenu.MouseOverColor}" /> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Shared.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Shared.xaml new file mode 100644 index 000000000..fd5dc19dd --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Shared.xaml @@ -0,0 +1,11 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes"> + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="MenuDict.xaml"/> + <ResourceDictionary Source="TabConrolStyle.xaml"/> + <ResourceDictionary Source="ToolbarStyle.xaml"/> + <ResourceDictionary Source="TreeViewItem.xaml"/> + <ResourceDictionary Source="ComboboxStyle.xaml"/> + </ResourceDictionary.MergedDictionaries> +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TabConrolStyle.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TabConrolStyle.xaml new file mode 100644 index 000000000..81b4463f6 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TabConrolStyle.xaml @@ -0,0 +1,354 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes"> + <Style x:Key="TangoTabControlStyle" TargetType="{x:Type TabControl}"> + <Setter Property="Padding" Value="2"/> + <Setter Property="HorizontalContentAlignment" Value="Center"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="BorderBrush" Value="Transparent"/> + <Setter Property="BorderThickness" Value="1"/> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type TabControl}"> + <Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local"> + <Grid.ColumnDefinitions> + <ColumnDefinition x:Name="ColumnDefinition0"/> + <ColumnDefinition x:Name="ColumnDefinition1" Width="0"/> + </Grid.ColumnDefinitions> + <Grid.RowDefinitions> + <RowDefinition x:Name="RowDefinition0" Height="Auto"/> + <RowDefinition x:Name="RowDefinition1" Height="*"/> + </Grid.RowDefinitions> + <TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="2,1,2,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/> + <Border x:Name="contentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,1,0,0" Background="{DynamicResource TabItem.Content.Static}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local"> + <ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + </Border> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="TabStripPlacement" Value="Bottom"> + <Setter Property="Grid.Row" TargetName="headerPanel" Value="1"/> + <Setter Property="Grid.Row" TargetName="contentPanel" Value="0"/> + <Setter Property="Height" TargetName="RowDefinition0" Value="*"/> + <Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/> + <Setter Property="Margin" TargetName="headerPanel" Value="0,0,2,2"/> + </Trigger> + <Trigger Property="TabStripPlacement" Value="Left"> + <Setter Property="Grid.Row" TargetName="headerPanel" Value="0"/> + <Setter Property="Grid.Row" TargetName="contentPanel" Value="0"/> + <Setter Property="Grid.Column" TargetName="headerPanel" Value="0"/> + <Setter Property="Grid.Column" TargetName="contentPanel" Value="1"/> + <Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/> + <Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/> + <Setter Property="Height" TargetName="RowDefinition0" Value="*"/> + <Setter Property="Height" TargetName="RowDefinition1" Value="0"/> + <Setter Property="Margin" TargetName="headerPanel" Value="2,2,0,2"/> + </Trigger> + <Trigger Property="TabStripPlacement" Value="Right"> + <Setter Property="Grid.Row" TargetName="headerPanel" Value="0"/> + <Setter Property="Grid.Row" TargetName="contentPanel" Value="0"/> + <Setter Property="Grid.Column" TargetName="headerPanel" Value="1"/> + <Setter Property="Grid.Column" TargetName="contentPanel" Value="0"/> + <Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/> + <Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/> + <Setter Property="Height" TargetName="RowDefinition0" Value="*"/> + <Setter Property="Height" TargetName="RowDefinition1" Value="0"/> + <Setter Property="Margin" TargetName="headerPanel" Value="0,2,2,2"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource ControlTextBrush}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Resources> + <Style TargetType="{x:Type TabItem}"> + <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + <Setter Property="Background" Value="{DynamicResource TabItem.Static.Background}"/> + <Setter Property="BorderBrush" Value="{DynamicResource TabItem.Static.Border}"/> + <Setter Property="Margin" Value="0"/> + <Setter Property="Padding" Value="6,2,6,2"/> + <Setter Property="HorizontalContentAlignment" Value="Stretch"/> + <Setter Property="VerticalContentAlignment" Value="Stretch"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type TabItem}"> + <Grid x:Name="templateRoot" SnapsToDevicePixels="true"> + <Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" Margin="0,-1,0,0"> + <Border x:Name="innerBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" Margin="0" Opacity="0"/> + </Border> + <StackPanel Orientation="Horizontal" Margin="0" > + <ContentPresenter x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> + <Button x:Name="CloseButton" Width="18" Height="18" + Margin="6,0,2,0" Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center" + Command="{Binding DataContext.CloseProjectItemCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" + CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=Content}" + VerticalAlignment="Center" Focusable="False" Visibility="Hidden"> + <Grid Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" > + <Line StrokeThickness="2" StrokeStartLineCap="Round" StrokeEndLineCap="Round" Stroke="{DynamicResource ControlTextBrush}" X1="1" Y1="1" X2="9" Y2="9" HorizontalAlignment="Center" VerticalAlignment="Center" /> + <Line StrokeThickness="2" StrokeStartLineCap="Round" StrokeEndLineCap="Round" Stroke="{DynamicResource ControlTextBrush}" X1="1" Y1="9" X2="9" Y2="1" HorizontalAlignment="Center" VerticalAlignment="Center" /> + </Grid> + <Button.Style> + <Style TargetType="{x:Type Button}"> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Button}"> + <Border Background="{TemplateBinding Background}"> + <Grid> + <Rectangle x:Name="background" Fill="{DynamicResource TabItem.Static.Background}" Opacity="1"/> + <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> + </Grid> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsMouseOver" Value="True"> + <Setter TargetName="background" Property="Fill" Value="#E51C97EA"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + + </Style> + </Button.Style> + </Button> + </StackPanel> + </Grid> + <ControlTemplate.Triggers> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left"/> + </MultiDataTrigger.Conditions> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Border}"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,0,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,0,1"/> + <Setter Property="Visibility" TargetName="CloseButton" Value="Visible"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom"/> + </MultiDataTrigger.Conditions> + <Setter Property="Opacity" TargetName="contentPresenter" Value="1.0"/> + <Setter Property="Margin" Value="-2,0,-2,0"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Bottom.Background}"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Bottom.Background}"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,0,1,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,0,1,1"/> + <Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource TabItem.Selected.Background}"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right"/> + </MultiDataTrigger.Conditions> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Border}"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="0,1,1,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="0,1,1,1"/> + <Setter Property="Visibility" TargetName="CloseButton" Value="Visible"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/> + </MultiDataTrigger.Conditions> + <Setter Property="Visibility" TargetName="CloseButton" Value="Visible"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Border}"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,1,0"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,1,0"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left"/> + </MultiDataTrigger.Conditions> + <Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.Disabled.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.Disabled.Border}"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,0,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,0,1"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom"/> + </MultiDataTrigger.Conditions> + <Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/> + <Setter Property="Background" TargetName="mainBorder" Value="Transparent"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="Transparent"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,0,1,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,0,1,1"/> + <Setter Property="Visibility" TargetName="CloseButton" Value="Collapsed"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right"/> + </MultiDataTrigger.Conditions> + <Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.Disabled.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.Disabled.Border}"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="0,1,1,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="0,1,1,1"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/> + </MultiDataTrigger.Conditions> + <Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.Disabled.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.Disabled.Border}"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,1,0"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,1,0"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left"/> + </MultiDataTrigger.Conditions> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,0,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,0,1"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left"/> + </MultiDataTrigger.Conditions> + <Setter Property="Panel.ZIndex" Value="1"/> + <Setter Property="Margin" Value="-2,-2,0,-2"/> + <Setter Property="Opacity" TargetName="innerBorder" Value="1"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,0,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,0,1"/> + <Setter Property="Visibility" TargetName="CloseButton" Value="Visible"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom"/> + </MultiDataTrigger.Conditions> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,0,1,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,0,1,1"/> + <Setter Property="Visibility" TargetName="CloseButton" Value="Collapsed"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="Transparent"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom"/> + </MultiDataTrigger.Conditions> + <Setter Property="Panel.ZIndex" Value="1"/> + <Setter Property="Margin" Value="-2,0,-2,0"/> + <Setter Property="Opacity" TargetName="innerBorder" Value="1"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,0,1,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,0,1,1"/> + <Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource TabItem.MouseOver.Background}"/> + <Setter Property="Visibility" TargetName="CloseButton" Value="Collapsed"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.Content.Static}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.Disabled.Background}"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right"/> + </MultiDataTrigger.Conditions> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="0,1,1,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="0,1,1,1"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right"/> + </MultiDataTrigger.Conditions> + <Setter Property="Panel.ZIndex" Value="1"/> + <Setter Property="Margin" Value="0,-2,-2,-2"/> + <Setter Property="Opacity" TargetName="innerBorder" Value="1"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="0,1,1,1"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="0,1,1,1"/> + <Setter Property="Visibility" TargetName="CloseButton" Value="Visible"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="false"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/> + </MultiDataTrigger.Conditions> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,1,0"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,1,0"/> + </MultiDataTrigger> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="true"/> + <Condition Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top"/> + </MultiDataTrigger.Conditions> + <Setter Property="Panel.ZIndex" Value="1"/> + <Setter Property="Margin" Value="-2,-2,-2,0"/> + <Setter Property="Opacity" TargetName="innerBorder" Value="1"/> + <Setter Property="BorderThickness" TargetName="innerBorder" Value="1,1,1,0"/> + <Setter Property="BorderThickness" TargetName="mainBorder" Value="1,1,1,0"/> + <Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + <Setter Property="BorderBrush" TargetName="mainBorder" Value="{DynamicResource TabItem.MouseOver.Background}"/> + <Setter Property="Visibility" TargetName="CloseButton" Value="Visible"/> + </MultiDataTrigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + </Style.Resources> + </Style> + <Style x:Key="FocusVisual"> + <Setter Property="Control.Template"> + <Setter.Value> + <ControlTemplate> + <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + + <Style x:Key="TangoGroupBoxStyle" TargetType="{x:Type GroupBox}"> + <Setter Property="BorderBrush" Value="Transparent"/> + <Setter Property="BorderThickness" Value="1"/> + <Setter Property="Background" Value="{DynamicResource Background.Static}"/> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type GroupBox}"> + <Grid SnapsToDevicePixels="true"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto"/> + <ColumnDefinition Width="*"/> + </Grid.ColumnDefinitions> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="Auto"/> + <RowDefinition Height="*"/> + </Grid.RowDefinitions> + <Border BorderBrush="{DynamicResource ListBorder}" BorderThickness="{TemplateBinding BorderThickness}" + Background="{TemplateBinding Background}" + Grid.ColumnSpan="2" + Grid.Column="0" CornerRadius="0" + Grid.Row="0" + Grid.RowSpan="3"> + </Border> + <Border x:Name="Header" Grid.Column="0" Padding="3,1,3,0" Grid.Row="0" Grid.RowSpan="2" BorderBrush="Transparent" BorderThickness="1" Margin="1" Grid.ColumnSpan="2"> + <ContentPresenter ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + </Border> + <ContentPresenter Grid.Row="2" Margin="0,1,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Grid.ColumnSpan="2" /> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml new file mode 100644 index 000000000..2cc24d31e --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml @@ -0,0 +1,204 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + x:Class="ToolbarSttyle.MainWindow"> + <Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}"> + <Setter Property="Background" Value="{DynamicResource ToolBarToggleButtonVerticalBackground}"/> + <Setter Property="MinHeight" Value="0"/> + <Setter Property="MinWidth" Value="0"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ToggleButton}"> + <Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,0,3,3" Background="{TemplateBinding Background}"> + <Canvas Width="7" VerticalAlignment="Bottom" SnapsToDevicePixels="true" Margin="2,7,2,2" Height="6" HorizontalAlignment="Right"> + <!--<Path x:Name="Path1" Data="M 1.5 1 L 1.5 6" Stroke="{DynamicResource ToolBarGripper}"/>--> + <Path x:Name="Path2" Data="M 0.5 0 L 0.5 5" Stroke="{DynamicResource ControlForegroundKey}"/> + <!--<Path x:Name="Path3" Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" Fill="{DynamicResource ToolBarGripper}"/>--> + <Path x:Name="Path4" Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" Fill="{DynamicResource ControlForegroundKey}"/> + </Canvas> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarButtonHover}"/> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsKeyboardFocused" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarButtonHover}"/> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Foreground" Value="{DynamicResource ToolBarGripper}"/> + </Trigger> + <Trigger Property="IsPressed" Value="True"> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"> + <Setter Property="Background" Value="{DynamicResource ControlBrushColorKey}"/> + </DataTrigger> + </Style.Triggers> + </Style> + <Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="{x:Type ToggleButton}"> + <Setter Property="Background" Value="{DynamicResource ToolBarToggleButtonHorizontalBackground}"/> + <Setter Property="MinHeight" Value="0"/> + <Setter Property="MinWidth" Value="0"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ToggleButton}"> + <Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,3,3,0" Background="{TemplateBinding Background}"> + <Canvas Width="6" VerticalAlignment="Bottom" SnapsToDevicePixels="true" Margin="7,2,2,2" Height="7" HorizontalAlignment="Right"> + <!--<Path x:Name="Path1" Data="M 1 1.5 L 6 1.5" Stroke="{DynamicResource ControlForegroundKey}"/>--> + <Path x:Name="Path2" Data="M 0 0.5 L 5 0.5" Stroke="{DynamicResource ControlForegroundKey}"/> + <!--<Path x:Name="Path3" Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" Fill="{DynamicResource ControlForegroundKey}"/>--> + <Path x:Name="Path4" Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" Fill="{DynamicResource ControlForegroundKey}"/> + </Canvas> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarButtonHover}"/> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsKeyboardFocused" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarButtonHover}"/> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Foreground" Value="{DynamicResource ToolBarGripper}"/> + </Trigger> + <Trigger Property="IsPressed" Value="True"> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"> + <Setter Property="Background" Value="{DynamicResource ControlBrushColorKey}"/> + </DataTrigger> + </Style.Triggers> + </Style> + <Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}"> + <Setter Property="OverridesDefaultStyle" Value="true" /> + <Setter Property="Cursor" Value="SizeAll" /> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Thumb}"> + <Border Background="Transparent" SnapsToDevicePixels="True"> + <Rectangle Margin="0,2" > + <Rectangle.Fill> + <DrawingBrush Viewport="0,0,4,4" ViewportUnits="Absolute" Viewbox="0,0,8,8" ViewboxUnits="Absolute" TileMode="Tile"> + <DrawingBrush.Drawing> + <DrawingGroup> + <GeometryDrawing Brush="#FF46464A" + Geometry="M 4 4 L 4 8 L 8 8 L 8 4 z" /> + </DrawingGroup> + </DrawingBrush.Drawing> + </DrawingBrush> + </Rectangle.Fill> + </Rectangle> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <Style x:Key="ToolBarMainPanelBorderStyle" TargetType="{x:Type Border}"> + <Setter Property="Margin" Value="0,0,11,0"/> + <Setter Property="CornerRadius" Value="3,3,3,3"/> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"> + <Setter Property="CornerRadius" Value="0,0,0,0"/> + </DataTrigger> + </Style.Triggers> + </Style> + <Style x:Key="TangoToolBarStyle" TargetType="{x:Type ToolBar}"> + <Setter Property="Background" Value="{DynamicResource ToolBarHorizontalBackground}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ToolBar}"> + <Grid x:Name="Grid" Margin="3,1,1,1" SnapsToDevicePixels="true"> + <Grid x:Name="OverflowGrid" HorizontalAlignment="Right"> + <ToggleButton x:Name="OverflowButton" ClickMode="Press" FocusVisualStyle="{x:Null}" IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{TemplateBinding HasOverflowItems}" Style="{DynamicResource ToolBarHorizontalOverflowButtonStyle}"/> + <Popup x:Name="OverflowPopup" AllowsTransparency="true" Focusable="false" IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom" StaysOpen="false"> + <!--<AThemes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent">--> + <Border x:Name="ToolBarSubMenuBorder" BorderBrush="{DynamicResource ToolBarMenuBorder}" BorderThickness="1" Background="{DynamicResource ToolBarSubMenuBackground}" RenderOptions.ClearTypeHint="Enabled"> + <ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel" KeyboardNavigation.DirectionalNavigation="Cycle" FocusVisualStyle="{x:Null}" Focusable="true" Margin="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle" WrapWidth="200"/> + </Border> + <!--</AThemes:SystemDropShadowChrome>--> + </Popup> + </Grid> + <Border x:Name="MainPanelBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" Style="{DynamicResource ToolBarMainPanelBorderStyle}"> + <DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local"> + <Thumb x:Name="ToolBarThumb" Margin="-3,-1,0,0" Padding="6,5,1,6" Style="{StaticResource ToolBarThumbStyle}" Width="10"/> + <ContentPresenter x:Name="ToolBarHeader" ContentSource="Header" HorizontalAlignment="Center" Margin="4,0,4,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/> + <ToolBarPanel x:Name="PART_ToolBarPanel" IsItemsHost="true" Margin="0,1,2,2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + </DockPanel> + </Border> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsOverflowOpen" Value="true"> + <Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false"/> + </Trigger> + <Trigger Property="Header" Value="{x:Null}"> + <Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed"/> + </Trigger> + <Trigger Property="ToolBarTray.IsLocked" Value="true"> + <Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed"/> + </Trigger> + <Trigger Property="HasDropShadow" SourceName="OverflowPopup" Value="true"> + <!--<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/> + <Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="true"/> + <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>--> + </Trigger> + <Trigger Property="Orientation" Value="Vertical"> + <Setter Property="Margin" TargetName="Grid" Value="1,3,1,1"/> + <Setter Property="Style" TargetName="OverflowButton" Value="{StaticResource ToolBarVerticalOverflowButtonStyle}"/> + <Setter Property="Height" TargetName="ToolBarThumb" Value="10"/> + <Setter Property="Width" TargetName="ToolBarThumb" Value="Auto"/> + <Setter Property="Margin" TargetName="ToolBarThumb" Value="-1,-3,0,0"/> + <Setter Property="Padding" TargetName="ToolBarThumb" Value="5,6,6,1"/> + <Setter Property="Margin" TargetName="ToolBarHeader" Value="0,0,0,4"/> + <Setter Property="Margin" TargetName="PART_ToolBarPanel" Value="1,0,2,2"/> + <Setter Property="DockPanel.Dock" TargetName="ToolBarThumb" Value="Top"/> + <Setter Property="DockPanel.Dock" TargetName="ToolBarHeader" Value="Top"/> + <Setter Property="HorizontalAlignment" TargetName="OverflowGrid" Value="Stretch"/> + <Setter Property="VerticalAlignment" TargetName="OverflowGrid" Value="Bottom"/> + <Setter Property="Placement" TargetName="OverflowPopup" Value="Right"/> + <Setter Property="Margin" TargetName="MainPanelBorder" Value="0,0,0,11"/> + <Setter Property="Background" Value="{DynamicResource ToolBarVerticalBackground}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Foreground" Value="{DynamicResource Menu.Disable.Foreground}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"> + <Setter Property="Background" Value="{DynamicResource ControlBrushColorKey}"/> + </DataTrigger> + </Style.Triggers> + </Style> + + <Style x:Key="{x:Static ToolBar.SeparatorStyleKey}" TargetType="{x:Type Separator}"> + <Setter Property="Width" Value="1" /> + <Setter Property="Margin" Value="10,2,10,2" /> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Separator}"> + <Rectangle Fill="{DynamicResource Inactive.Selection}" VerticalAlignment="Stretch"/> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TreeViewItem.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TreeViewItem.xaml new file mode 100644 index 000000000..f37744004 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TreeViewItem.xaml @@ -0,0 +1,161 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes"> + <Style x:Key="TangoTreeViewStyle" TargetType="{x:Type TreeView}"> + <Setter Property="Background" Value="{DynamicResource TreeBackgroundColor}"/> + <Setter Property="BorderBrush" Value="{DynamicResource ListBorder}"/> + <Setter Property="BorderThickness" Value="1"/> + <Setter Property="Padding" Value="1"/> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> + <Setter Property="ScrollViewer.PanningMode" Value="Both"/> + <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type TreeView}"> + <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true"> + <ScrollViewer x:Name="_tv_scrollviewer_" Background="{TemplateBinding Background}" CanContentScroll="false" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"> + <ItemsPresenter /> + </ScrollViewer> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ControlTextBrush}"/> + </Trigger> + <Trigger Property="VirtualizingPanel.IsVirtualizing" Value="true"> + <Setter Property="CanContentScroll" TargetName="_tv_scrollviewer_" Value="true"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <Trigger Property="VirtualizingPanel.IsVirtualizing" Value="true"> + <Setter Property="ItemsPanel"> + <Setter.Value> + <ItemsPanelTemplate> + <VirtualizingStackPanel/> + </ItemsPanelTemplate> + </Setter.Value> + </Setter> + </Trigger> + </Style.Triggers> + </Style> + <Style x:Key="TreeViewItemFocusVisual"> + <Setter Property="Control.Template"> + <Setter.Value> + <ControlTemplate> + <Rectangle/> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <StreamGeometry x:Key="TreeArrow" >M0,0L0,6 6,0z</StreamGeometry> + <Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}"> + <Setter Property="Focusable" Value="False"/> + <Setter Property="Width" Value="16"/> + <Setter Property="Height" Value="16"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ToggleButton}"> + <Border Background="Transparent" Height="16" Padding="5,5,5,5" Width="16"> + <Path x:Name="ExpandPath" Data="{StaticResource TreeArrow}" Fill="{DynamicResource TreeViewItem.TreeArrow.Static.Fill}" Stroke="{DynamicResource TreeViewItem.TreeArrow.Static.Stroke}"> + <Path.RenderTransform> + <RotateTransform Angle="135" CenterY="3" CenterX="3"/> + </Path.RenderTransform> + </Path> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsChecked" Value="True"> + <Setter Property="RenderTransform" TargetName="ExpandPath"> + <Setter.Value> + <RotateTransform Angle="180" CenterY="3" CenterX="3"/> + </Setter.Value> + </Setter> + <Setter Property="Fill" TargetName="ExpandPath" Value="{DynamicResource TreeViewItem.TreeArrow.Static.Checked.Fill}"/> + <Setter Property="Stroke" TargetName="ExpandPath" Value="{DynamicResource TreeViewItem.TreeArrow.Static.Checked.Stroke}"/> + </Trigger> + <Trigger Property="IsMouseOver" Value="True"> + <Setter Property="Stroke" TargetName="ExpandPath" Value="{DynamicResource TreeViewItem.TreeArrow.MouseOver.Stroke}"/> + <Setter Property="Fill" TargetName="ExpandPath" Value="{DynamicResource TreeViewItem.TreeArrow.MouseOver.Fill}"/> + </Trigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="IsMouseOver" Value="True"/> + <Condition Property="IsChecked" Value="True"/> + </MultiTrigger.Conditions> + <Setter Property="Stroke" TargetName="ExpandPath" Value="{DynamicResource TreeViewItem.TreeArrow.MouseOver.Checked.Stroke}"/> + <Setter Property="Fill" TargetName="ExpandPath" Value="{DynamicResource TreeViewItem.TreeArrow.MouseOver.Checked.Fill}"/> + </MultiTrigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <Style TargetType="{x:Type TreeViewItem}"> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> + <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> + <Setter Property="Padding" Value="4,0,0,0"/> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + <Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type TreeViewItem}"> + <Grid x:Name="GridTreeItem"> + <Grid.ColumnDefinitions> + <ColumnDefinition MinWidth="19" Width="Auto"/> + <ColumnDefinition Width="Auto"/> + <ColumnDefinition Width="*"/> + </Grid.ColumnDefinitions> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition/> + </Grid.RowDefinitions> + <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/> + <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> + <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + </Border> + <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsExpanded" Value="false"> + <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/> + </Trigger> + <Trigger Property="HasItems" Value="false"> + <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/> + </Trigger> + <Trigger Property="IsSelected" Value="true"> + <Setter Property="Background" TargetName="GridTreeItem" Value="{DynamicResource ControlBrushColorKey}"/> + <Setter Property="Foreground" Value="{DynamicResource HighlightTextBrushKey}"/> + </Trigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="IsSelected" Value="true"/> + <Condition Property="IsSelectionActive" Value="false"/> + </MultiTrigger.Conditions> + <Setter Property="Background" TargetName="GridTreeItem" Value="{DynamicResource Inactive.Selection}"/> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + </MultiTrigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <Trigger Property="VirtualizingPanel.IsVirtualizing" Value="true"> + <Setter Property="ItemsPanel"> + <Setter.Value> + <ItemsPanelTemplate> + <VirtualizingStackPanel/> + </ItemsPanelTemplate> + </Setter.Value> + </Setter> + </Trigger> + </Style.Triggers> + </Style> +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/app.config b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/app.config new file mode 100644 index 000000000..a00da21b0 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/app.config @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/packages.config b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/packages.config new file mode 100644 index 000000000..893958c68 --- /dev/null +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net461" /> + <package id="MahApps.Metro" version="1.5.0" targetFramework="net461" /> +</packages>
\ No newline at end of file |
