diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index a358587..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index 9fb31cb..0576fb8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs +deploy/DynaFire_bin + # Build results [Dd]ebug/ [Dd]ebugPublic/ diff --git a/DynaFire.sln b/DynaFire.sln index 1814f07..3bda747 100644 --- a/DynaFire.sln +++ b/DynaFire.sln @@ -3,7 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynaFire", "DynaFire\DynaFire.csproj", "{0F6001FE-40BC-4A00-A900-A9BABDACE3CC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynaFire", "src\DynaFire\DynaFire.csproj", "{0F6001FE-40BC-4A00-A900-A9BABDACE3CC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A8D8A7A6-9EC7-43B2-97A4-B4CA8109DC55}" + ProjectSection(SolutionItems) = preProject + deploy\DynaFire_ViewExtensionDefinition.xml = deploy\DynaFire_ViewExtensionDefinition.xml + deploy\shortcuts.txt = deploy\shortcuts.txt + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/DynaFire/DynaFire.csproj b/DynaFire/DynaFire.csproj deleted file mode 100644 index f82a5c3..0000000 --- a/DynaFire/DynaFire.csproj +++ /dev/null @@ -1,75 +0,0 @@ - - - - - Debug - AnyCPU - {0F6001FE-40BC-4A00-A900-A9BABDACE3CC} - Library - Properties - DynaFire - DynaFire - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\..\..\..\..\Program Files\Dynamo\Dynamo Core\1.3\DynamoCore.dll - - - ..\..\..\..\..\..\..\Program Files\Dynamo\Dynamo Core\1.3\DynamoCoreWpf.dll - - - - - - - - - - - - - - - - - - - - NodeNamesView.xaml - - - - - - Designer - MSBuild:Compile - - - - - \ No newline at end of file diff --git a/DynaFire/DynaFire_ViewExtensionDefinition.xml b/DynaFire/DynaFire_ViewExtensionDefinition.xml deleted file mode 100644 index 5895ba8..0000000 --- a/DynaFire/DynaFire_ViewExtensionDefinition.xml +++ /dev/null @@ -1,4 +0,0 @@ - - C:\Users\erudisaile\Documents\_code\_gitHub\DynaFire\DynaFire\bin\Debug\DynaFire.dll - DynaFire.DynaFireExtension - \ No newline at end of file diff --git a/DynaFireExtension.cs b/DynaFireExtension.cs deleted file mode 100644 index de36cf7..0000000 --- a/DynaFireExtension.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Collections.ObjectModel; -using Dynamo.Wpf.Extensions; -using System.Linq; -using Dynamo.ViewModels; -using Dynamo.Controls; -using static Dynamo.Models.DynamoModel; - -using System.Collections.Generic; - - -using System.Windows.Input; -using Dynamo.UI.Commands; - -namespace DynaFire -{ - public class DynaFireExtension : IViewExtension - { - - Dictionary Map = new Dictionary(); - private ObservableCollection _nodeNames = new ObservableCollection(); - public ObservableCollection NodeShortcuts - { - get - { - return _nodeNames; - } - set - { - _nodeNames = value; - - } - } - - public string Name - { - get - { - return "DynaFire"; - } - } - - public string UniqueId - { - get - { - return "83482364-4536-41DD-9367-358329D2E31C"; - } - } - - public void Dispose() - { - - } - - DynamoView view; - char? lastChar; - - public void Loaded(ViewLoadedParams p) - { - view = p.DynamoWindow as DynamoView; - view.KeyDown += View_KeyDown; - view.KeyUp += View_KeyUp; - - SetNodeShortcuts(); - - NodeNamesView v = new NodeNamesView(this); - v.ShowDialog(); - } - - private void SetNodeShortcuts() - { - DynamoViewModel vm = view.DataContext as DynamoViewModel; - NodeShortcuts = new ObservableCollection(); - foreach( string name in vm.SearchViewModel.Model.SearchEntries.Select(s => s.CreationName) ) - { - NodeShortcuts.Add(new Shortcut("", name)); - } - } - - private void View_KeyUp(object sender, KeyEventArgs e) - { - lastChar = null; - - System.Windows.Forms.MessageBox.Show(System.Windows.Forms.Cursor.Position.ToString()); - } - - private void View_KeyDown(object sender, KeyEventArgs e) - { - if (lastChar == null) - { - char[] chars = e.Key.ToString().ToCharArray(); - if (chars.Length == 1) - { - lastChar = chars[0]; - } - } - else - { - char[] chars = e.Key.ToString().ToCharArray(); - if (chars.Length == 1) - { - string key = lastChar.ToString() + chars[0].ToString(); - string val; - if (Map.TryGetValue(key, out val)) - { - DynamoViewModel vm = view.DataContext as DynamoViewModel; - vm.Model.ExecuteCommand(new CreateNodeCommand(Guid.NewGuid().ToString(), val, 0, 0, false, true)); - } - } - } - } - - public void Shutdown() - { - - } - - public void Startup(ViewStartupParams p) - { - Map.Add("CR", "Color Range"); - Map.Add("IN", "Input"); - Map.Add("OT", "SortIndexByValue@double[],bool"); - } - - public DelegateCommand TryOKCommand = new DelegateCommand(TryOK); - - private static void TryOK(object obj) - { - System.Windows.Forms.MessageBox.Show("ok clicked"); - } - } -} diff --git a/DynaFire_ViewExtensionDefinition.xml b/DynaFire_ViewExtensionDefinition.xml deleted file mode 100644 index 5895ba8..0000000 --- a/DynaFire_ViewExtensionDefinition.xml +++ /dev/null @@ -1,4 +0,0 @@ - - C:\Users\erudisaile\Documents\_code\_gitHub\DynaFire\DynaFire\bin\Debug\DynaFire.dll - DynaFire.DynaFireExtension - \ No newline at end of file diff --git a/NodeNamesView.xaml b/NodeNamesView.xaml deleted file mode 100644 index 365098e..0000000 --- a/NodeNamesView.xaml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NodeNamesView.xaml.cs b/NodeNamesView.xaml.cs deleted file mode 100644 index b34afef..0000000 --- a/NodeNamesView.xaml.cs +++ /dev/null @@ -1,32 +0,0 @@ -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 System.Xaml; - -namespace DynaFire -{ - /// - /// Interaction logic for UserControl1.xaml - /// - public partial class NodeNamesView : Window - { - DynaFireExtension model; - public NodeNamesView(DynaFireExtension dynaFire) - { - model = dynaFire; - DataContext = dynaFire; - InitializeComponent(); - } - } -} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs deleted file mode 100644 index 0349785..0000000 --- a/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("DynaFire")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("DynaFire")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0f6001fe-40bc-4a00-a900-a9babdace3cc")] - -// 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/Shortcut.cs b/Shortcut.cs deleted file mode 100644 index ba545be..0000000 --- a/Shortcut.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DynaFire -{ - public class Shortcut - { - public string Keys { get; set; } - public string NodeName { get; set; } - - public Shortcut(string key, string name) - { - Keys = key; - NodeName = name; - } - } -} diff --git a/deploy/DynaFire_ViewExtensionDefinition.xml b/deploy/DynaFire_ViewExtensionDefinition.xml new file mode 100644 index 0000000..9bc8982 --- /dev/null +++ b/deploy/DynaFire_ViewExtensionDefinition.xml @@ -0,0 +1,4 @@ + + DynaFire\DynaFire.dll + DynaFire.DynaFireExtension + \ No newline at end of file diff --git a/deploy/shortcuts.txt b/deploy/shortcuts.txt new file mode 100644 index 0000000..0c201b5 --- /dev/null +++ b/deploy/shortcuts.txt @@ -0,0 +1,11 @@ +DT|Date Time| +FP|File Path| +DP|Directory Path| +CR|Color Range| +LC|List.Create| +AC|All Elements of Category| +CA|Categories| +OT|SortIndexByValue@double[],bool| +CN|DSCore.Color.ByARGB@int,int,int,int| +DC|Display.Display.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color| +GE|Revit.Elements.Element.Geometry| diff --git a/shortcuts.txt b/shortcuts.txt deleted file mode 100644 index ebd5981..0000000 --- a/shortcuts.txt +++ /dev/null @@ -1,3 +0,0 @@ -CR|Color Range| -LN|Line| -OT|SortIndexByValue@double[],bool| diff --git a/DynaFire.csproj b/src/DynaFire/DynaFire.csproj similarity index 91% rename from DynaFire.csproj rename to src/DynaFire/DynaFire.csproj index 3f84ebb..3e8f352 100644 --- a/DynaFire.csproj +++ b/src/DynaFire/DynaFire.csproj @@ -41,7 +41,6 @@ - @@ -66,6 +65,13 @@ + + xcopy /y $(TargetDir)* $(SolutionDir)deploy\DynaFire_bin\ + + + del $(SolutionDir)deploy\DynaFire_bin\*.dll +del $(SolutionDir)deploy\DynaFire_bin\*.pdb +