diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-21 14:30:01 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-21 14:30:01 +0200 |
| commit | 36dcf50eec20835ab1955932e89f9c6ffc68acde (patch) | |
| tree | 3ca1331b626f04c8f19af24b65b7459b5f0660cb /Software/Visual_Studio/Tango.Explorer | |
| parent | 5f321b419501b2c836e8b03400fff2934be5f135 (diff) | |
| download | Tango-36dcf50eec20835ab1955932e89f9c6ffc68acde.tar.gz Tango-36dcf50eec20835ab1955932e89f9c6ffc68acde.zip | |
Working on Touch FileExplorer !
Diffstat (limited to 'Software/Visual_Studio/Tango.Explorer')
18 files changed, 687 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs b/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs new file mode 100644 index 000000000..6f276f184 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.IO; +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.Core.Commands; + +namespace Tango.Explorer +{ + public class ExplorerControl : Control + { + private bool _changing_current_path; + + public String CurrentPath + { + get { return (String)GetValue(CurrentPathProperty); } + set { SetValue(CurrentPathProperty, value); } + } + public static readonly DependencyProperty CurrentPathProperty = + DependencyProperty.Register("CurrentPath", typeof(String), typeof(ExplorerControl), new PropertyMetadata(null, (d, e) => (d as ExplorerControl).OnCurrentPathChanged())); + + public ExplorerFolderItem CurrentFolder + { + get { return (ExplorerFolderItem)GetValue(CurrentFolderProperty); } + set { SetValue(CurrentFolderProperty, value); } + } + public static readonly DependencyProperty CurrentFolderProperty = + DependencyProperty.Register("CurrentFolder", typeof(ExplorerFolderItem), typeof(ExplorerControl), new PropertyMetadata(null, (d, e) => (d as ExplorerControl).OnCurrentFolderChanged())); + + public ExplorerItem SelectedItem + { + get { return (ExplorerItem)GetValue(SelectedItemProperty); } + set { SetValue(SelectedItemProperty, value); } + } + public static readonly DependencyProperty SelectedItemProperty = + DependencyProperty.Register("SelectedItem", typeof(ExplorerItem), typeof(ExplorerControl), new PropertyMetadata(null, (d, e) => (d as ExplorerControl).OnSelectedItemChanged())); + + public RelayCommand BackCommand + { + get { return (RelayCommand)GetValue(BackCommandProperty); } + set { SetValue(BackCommandProperty, value); } + } + public static readonly DependencyProperty BackCommandProperty = + DependencyProperty.Register("BackCommand", typeof(RelayCommand), typeof(ExplorerControl), new PropertyMetadata(null)); + + static ExplorerControl() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(ExplorerControl), new FrameworkPropertyMetadata(typeof(ExplorerControl))); + } + + public ExplorerControl() + { + BackCommand = new RelayCommand(NavigateBack); + } + + private void OnCurrentPathChanged() + { + if (_changing_current_path) return; + + _changing_current_path = true; + + if (Directory.Exists(CurrentPath)) + { + CurrentFolder = ExplorerFolderItem.LoadFromPath(CurrentPath); + } + + _changing_current_path = false; + } + + private void OnCurrentFolderChanged() + { + if (_changing_current_path) return; + + _changing_current_path = true; + + CurrentPath = CurrentFolder.Path; + + _changing_current_path = false; + } + + private void OnSelectedItemChanged() + { + if (SelectedItem != null) + { + if (SelectedItem is ExplorerFolderItem) + { + var folder = SelectedItem as ExplorerFolderItem; + folder = ExplorerFolderItem.LoadFromPath(folder.Path); + CurrentFolder = folder; + SelectedItem = null; + } + } + } + + private void NavigateBack() + { + var parentPath = CurrentFolder.GetParentPath(); + + if (parentPath != null) + { + CurrentFolder = ExplorerFolderItem.LoadFromPath(parentPath); + } + } + } +} diff --git a/Software/Visual_Studio/Tango.Explorer/ExplorerFileDefinition.cs b/Software/Visual_Studio/Tango.Explorer/ExplorerFileDefinition.cs new file mode 100644 index 000000000..67f93dc6c --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/ExplorerFileDefinition.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; +using Tango.SharedUI.Helpers; + +namespace Tango.Explorer +{ + public class ExplorerFileDefinition + { + private static List<ExplorerFileDefinition> _definitions; + + public String Extension { get; set; } + public String Description { get; set; } + public BitmapSource Icon { get; set; } + + public static ExplorerFileDefinition Folder => new ExplorerFileDefinition() + { + Icon = ResourceHelper.GetImageFromResources("/Images/folder.png") + }; + + public static ExplorerFileDefinition File => new ExplorerFileDefinition() + { + Icon = ResourceHelper.GetImageFromResources("/Images/file.png"), + Description = "Unknown Type" + }; + + public static ExplorerFileDefinition Job => new ExplorerFileDefinition() + { + Icon = ResourceHelper.GetImageFromResources("/Images/job.png"), + Description = "Tango Job Definition", + Extension = ".job", + }; + + public static ExplorerFileDefinition Pulse => new ExplorerFileDefinition() + { + Icon = ResourceHelper.GetImageFromResources("/Images/pulse.png"), + Description = "Twine Embroidery Design", + Extension = ".twn", + }; + + public static ExplorerFileDefinition Update => new ExplorerFileDefinition() + { + Icon = ResourceHelper.GetImageFromResources("/Images/update.png"), + Description = "Tango Software Update Package", + Extension = ".tup", + }; + + public static ExplorerFileDefinition ColorProfile => new ExplorerFileDefinition() + { + Icon = ResourceHelper.GetImageFromResources("/Images/color.png"), + Description = "Tango Color Profile", + Extension = ".ccp", + }; + + static ExplorerFileDefinition() + { + _definitions = typeof(ExplorerFileDefinition).GetProperties(BindingFlags.Public | BindingFlags.Static).Where(x => x.PropertyType == typeof(ExplorerFileDefinition)).ToList().Select(x => x.GetValue(null,null) as ExplorerFileDefinition).ToList(); + } + + public static ExplorerFileDefinition GetByExtension(String ext) + { + return _definitions.Where(x => x.Extension != null).SingleOrDefault(x => x.Extension.ToLower() == ext.ToLower()); + + //switch (ext.ToLower()) + //{ + // case ".job": + // return Job; + // case ".twn": + // return Pulse; + // case ".tup": + // return Update; + // case ".ccp": + // return ColorProfile; + // default: + // return File; + //} + } + + public static List<String> GetSupportedExtensions() + { + return _definitions.Where(x => x.Extension != null).Select(x => x.Extension).ToList(); + } + } +} diff --git a/Software/Visual_Studio/Tango.Explorer/ExplorerFileItem.cs b/Software/Visual_Studio/Tango.Explorer/ExplorerFileItem.cs new file mode 100644 index 000000000..e4ac8f5d4 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/ExplorerFileItem.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.Explorer +{ + public class ExplorerFileItem : ExplorerItem + { + public static ExplorerFileItem LoadFromPath(String path) + { + ExplorerFileItem fileItem = new ExplorerFileItem(); + + var definition = ExplorerFileDefinition.GetByExtension(System.IO.Path.GetExtension(path)); + + fileItem.Path = path; + fileItem.Description = definition.Description; + fileItem.Name = System.IO.Path.GetFileName(path); + fileItem.Icon = definition.Icon; + + return fileItem; + } + } +} diff --git a/Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs b/Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs new file mode 100644 index 000000000..48f870b20 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Imaging; + +namespace Tango.Explorer +{ + public class ExplorerFolderItem : ExplorerItem + { + private static List<String> extensions = ExplorerFileDefinition.GetSupportedExtensions().Select(x => x.Replace(".","")).ToList(); + + public List<ExplorerItem> Items { get; set; } + + public ExplorerFolderItem() + { + Items = new List<ExplorerItem>(); + } + + public static ExplorerFolderItem LoadFromPath(String path) + { + ExplorerFolderItem folderItem = new ExplorerFolderItem(); + + folderItem.Path = path; + folderItem.Icon = ExplorerFileDefinition.Folder.Icon; + folderItem.Name = System.IO.Path.GetFileName(path); + + foreach (var folder in new DirectoryInfo(path).GetDirectories().Where(x => !x.Attributes.HasFlag(FileAttributes.Hidden))) + { + ExplorerFolderItem fItem = new ExplorerFolderItem(); + fItem.Path = folder.FullName; + fItem.Icon = ExplorerFileDefinition.Folder.Icon; + fItem.Name = System.IO.Path.GetFileName(folder.FullName); + folderItem.Items.Add(fItem); + } + + foreach (var file in Directory.GetFiles(path,"*.*").Where(f => extensions.Contains(f.Split('.').Last().ToLower())).ToArray()) + { + folderItem.Items.Add(ExplorerFileItem.LoadFromPath(file)); + } + + return folderItem; + } + + public String GetParentPath() + { + var parent = new DirectoryInfo(Path).Parent; + var parentPath = parent != null ? parent.FullName : null; + return parentPath; + } + } +} diff --git a/Software/Visual_Studio/Tango.Explorer/ExplorerItem.cs b/Software/Visual_Studio/Tango.Explorer/ExplorerItem.cs new file mode 100644 index 000000000..b604c71b5 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/ExplorerItem.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; + +namespace Tango.Explorer +{ + public abstract class ExplorerItem + { + public String Name { get; set; } + public String Description { get; set; } + public String Path { get; set; } + public BitmapSource Icon { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.Explorer/Images/color.png b/Software/Visual_Studio/Tango.Explorer/Images/color.png Binary files differnew file mode 100644 index 000000000..44ca22ae2 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/Images/color.png diff --git a/Software/Visual_Studio/Tango.Explorer/Images/file.png b/Software/Visual_Studio/Tango.Explorer/Images/file.png Binary files differnew file mode 100644 index 000000000..a8cf88667 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/Images/file.png diff --git a/Software/Visual_Studio/Tango.Explorer/Images/folder.png b/Software/Visual_Studio/Tango.Explorer/Images/folder.png Binary files differnew file mode 100644 index 000000000..1d32e80bf --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/Images/folder.png diff --git a/Software/Visual_Studio/Tango.Explorer/Images/job.png b/Software/Visual_Studio/Tango.Explorer/Images/job.png Binary files differnew file mode 100644 index 000000000..a41bcf8f0 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/Images/job.png diff --git a/Software/Visual_Studio/Tango.Explorer/Images/pulse.png b/Software/Visual_Studio/Tango.Explorer/Images/pulse.png Binary files differnew file mode 100644 index 000000000..1cabab56d --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/Images/pulse.png diff --git a/Software/Visual_Studio/Tango.Explorer/Images/update.png b/Software/Visual_Studio/Tango.Explorer/Images/update.png Binary files differnew file mode 100644 index 000000000..3e2475359 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/Images/update.png diff --git a/Software/Visual_Studio/Tango.Explorer/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Explorer/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..82a33f7c2 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +[assembly: AssemblyTitle("Tango - File System Explorer Library")] +[assembly: AssemblyVersion("2.0.8.1119")] +[assembly: ComVisible(false)] + +[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) +)] diff --git a/Software/Visual_Studio/Tango.Explorer/Properties/Resources.Designer.cs b/Software/Visual_Studio/Tango.Explorer/Properties/Resources.Designer.cs new file mode 100644 index 000000000..78e8696e7 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/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.Explorer.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.Explorer.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/Tango.Explorer/Properties/Resources.resx b/Software/Visual_Studio/Tango.Explorer/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/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/Tango.Explorer/Properties/Settings.Designer.cs b/Software/Visual_Studio/Tango.Explorer/Properties/Settings.Designer.cs new file mode 100644 index 000000000..25995bb0c --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/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.Explorer.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/Tango.Explorer/Properties/Settings.settings b/Software/Visual_Studio/Tango.Explorer/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/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/Tango.Explorer/Tango.Explorer.csproj b/Software/Visual_Studio/Tango.Explorer/Tango.Explorer.csproj new file mode 100644 index 000000000..a436400a4 --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/Tango.Explorer.csproj @@ -0,0 +1,114 @@ +<?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>{4399AF76-DB52-4CFB-8020-6F85BDB29FD5}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.Explorer</RootNamespace> + <AssemblyName>Tango.Explorer</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\Build\Core\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>..\Build\Core\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <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="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Page Include="Themes\Generic.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Compile Include="..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="ExplorerControl.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="ExplorerFileDefinition.cs" /> + <Compile Include="ExplorerFileItem.cs" /> + <Compile Include="ExplorerFolderItem.cs" /> + <Compile Include="ExplorerItem.cs" /> + <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="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.SharedUI\Tango.SharedUI.csproj"> + <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> + <Name>Tango.SharedUI</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.Touch\Tango.Touch.csproj"> + <Project>{fd86424c-6e84-491b-8df9-3d0f5c236a2a}</Project> + <Name>Tango.Touch</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\file.png" /> + <Resource Include="Images\folder.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\color.png" /> + <Resource Include="Images\job.png" /> + <Resource Include="Images\pulse.png" /> + <Resource Include="Images\update.png" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Explorer/Themes/Generic.xaml b/Software/Visual_Studio/Tango.Explorer/Themes/Generic.xaml new file mode 100644 index 000000000..a141dc88f --- /dev/null +++ b/Software/Visual_Studio/Tango.Explorer/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:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:local="clr-namespace:Tango.Explorer"> + + <Style TargetType="{x:Type local:ExplorerControl}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:ExplorerControl}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + + <touch:TouchListBox SelectionMode="None" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=local:ExplorerControl},Path=CurrentFolder.Items}" SelectedItem="{Binding RelativeSource={RelativeSource AncestorType=local:ExplorerControl},Path=SelectedItem,Mode=TwoWay}"> + <touch:TouchListBox.ItemTemplate> + <DataTemplate DataType="local:ExplorerItem"> + <DockPanel Margin="5"> + <Image DockPanel.Dock="Left" Source="{Binding Icon}" Width="64" Height="64" /> + <StackPanel VerticalAlignment="Center" Margin="20 0 0 0"> + <TextBlock FontSize="16" Text="{Binding Name}"></TextBlock> + <TextBlock Opacity="0.5" FontSize="12" Margin="0 5 0 0" Text="{Binding Description}"></TextBlock> + </StackPanel> + </DockPanel> + </DataTemplate> + </touch:TouchListBox.ItemTemplate> + </touch:TouchListBox> + + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + + +</ResourceDictionary> |
