From f7c317a2f5116786f1083ba95d0069123c046b58 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Sat, 27 Oct 2018 16:46:39 +0100 Subject: [PATCH 01/20] Basically checks the serialisation and deserialisation from a speckle stream to grevit objs in revit (see #4). changelog: - adds speckle core as a reference - adds a speckle command - receives objects from a speckle stream --- Grevit.Revit.2019/Grevit.Revit.2019.csproj | 1 + Grevit.Revit/Revit.cs | 1013 +++++++++-------- .../Grevit.GrassHopper.gha | Bin 144896 -> 144896 bytes .../Grevit.Types.dll | Bin 65536 -> 65536 bytes 4 files changed, 524 insertions(+), 490 deletions(-) diff --git a/Grevit.Revit.2019/Grevit.Revit.2019.csproj b/Grevit.Revit.2019/Grevit.Revit.2019.csproj index bd93753..d203381 100644 --- a/Grevit.Revit.2019/Grevit.Revit.2019.csproj +++ b/Grevit.Revit.2019/Grevit.Revit.2019.csproj @@ -31,6 +31,7 @@ 4 + diff --git a/Grevit.Revit/Revit.cs b/Grevit.Revit/Revit.cs index 16a5778..142e931 100644 --- a/Grevit.Revit/Revit.cs +++ b/Grevit.Revit/Revit.cs @@ -37,597 +37,630 @@ using System.Threading; using Grevit.Types; using System.Windows.Media.Imaging; - +using SpeckleCore; namespace Grevit.Revit { + /// + /// Create Grevit UI + /// + class GrevitUI : IExternalApplication + { /// - /// Create Grevit UI - /// - class GrevitUI : IExternalApplication - { - /// - /// Grevit Assembly path - /// - static string path = typeof(GrevitUI).Assembly.Location; - - /// - /// Create UI on StartUp - /// - /// - /// - public Result OnStartup(UIControlledApplication application) - { - RibbonPanel grevitPanel = null; - - foreach (RibbonPanel rpanel in application.GetRibbonPanels()) - if (rpanel.Name == "Grevit") grevitPanel = rpanel; - - if (grevitPanel == null) grevitPanel = application.CreateRibbonPanel("Grevit"); - - PushButton commandButton = grevitPanel.AddItem(new PushButtonData("GrevitCommand", "Grevit", path, "Grevit.Revit.GrevitCommand")) as PushButton; - commandButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( - Properties.Resources.paper_airplane.GetHbitmap(), - IntPtr.Zero, - System.Windows.Int32Rect.Empty, - BitmapSizeOptions.FromWidthAndHeight(32, 32)); - - commandButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "http://grevit.net/")); - - PushButton parameterButton = grevitPanel.AddItem(new PushButtonData("ParameterNames", "Parameter names", path, "Grevit.Revit.ParameterNames")) as PushButton; - parameterButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( - Properties.Resources.tag_hash.GetHbitmap(), - IntPtr.Zero, - System.Windows.Int32Rect.Empty, - BitmapSizeOptions.FromWidthAndHeight(32, 32)); - - parameterButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "http://grevit.net/")); - - PushButton getFaceRefButton = grevitPanel.AddItem(new PushButtonData("GetFaceReference", "Face Reference", path, "Grevit.Revit.GrevitFaceReference")) as PushButton; - getFaceRefButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( - Properties.Resources.radio_button.GetHbitmap(), - IntPtr.Zero, - System.Windows.Int32Rect.Empty, - BitmapSizeOptions.FromWidthAndHeight(32, 32)); - - getFaceRefButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "http://grevit.net/")); - - PushButton speckleButton = grevitPanel.AddItem( new PushButtonData( "Speckle Client", "Speckle Client", path, "Grevit.Revit.GrevitFaceReference" ) ) as PushButton; - - speckleButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( - Properties.Resources.speckle.GetHbitmap(), - IntPtr.Zero, - System.Windows.Int32Rect.Empty, - BitmapSizeOptions.FromWidthAndHeight( 32, 32 ) ); - - speckleButton.SetContextualHelp( new ContextualHelp( ContextualHelpType.Url, "https://github.com/speckleworks/Grevit" ) ); - - return Result.Succeeded; - } - - public Result OnShutdown(UIControlledApplication a) - { - return Result.Succeeded; - } - - } + /// Grevit Assembly path + /// + static string path = typeof( GrevitUI ).Assembly.Location; /// - /// The actual Revit Grevit Command + /// Create UI on StartUp /// - [Transaction(TransactionMode.Manual)] - public class GrevitCommand : IExternalCommand + /// + /// + public Result OnStartup( UIControlledApplication application ) { + RibbonPanel grevitPanel = null; - public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) - { - // Get Environment Variables - UIApplication uiApp = commandData.Application; - GrevitBuildModel model = new GrevitBuildModel(uiApp.ActiveUIDocument.Document); - return model.BuildModel(null); - } + foreach ( RibbonPanel rpanel in application.GetRibbonPanels() ) + if ( rpanel.Name == "Grevit" ) grevitPanel = rpanel; - } + if ( grevitPanel == null ) grevitPanel = application.CreateRibbonPanel( "Grevit" ); + + PushButton commandButton = grevitPanel.AddItem( new PushButtonData( "GrevitCommand", "Grevit", path, "Grevit.Revit.GrevitCommand" ) ) as PushButton; + commandButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( + Properties.Resources.paper_airplane.GetHbitmap(), + IntPtr.Zero, + System.Windows.Int32Rect.Empty, + BitmapSizeOptions.FromWidthAndHeight( 32, 32 ) ); + + commandButton.SetContextualHelp( new ContextualHelp( ContextualHelpType.Url, "http://grevit.net/" ) ); + + PushButton parameterButton = grevitPanel.AddItem( new PushButtonData( "ParameterNames", "Parameter names", path, "Grevit.Revit.ParameterNames" ) ) as PushButton; + parameterButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( + Properties.Resources.tag_hash.GetHbitmap(), + IntPtr.Zero, + System.Windows.Int32Rect.Empty, + BitmapSizeOptions.FromWidthAndHeight( 32, 32 ) ); + + parameterButton.SetContextualHelp( new ContextualHelp( ContextualHelpType.Url, "http://grevit.net/" ) ); + + PushButton getFaceRefButton = grevitPanel.AddItem( new PushButtonData( "GetFaceReference", "Face Reference", path, "Grevit.Revit.GrevitFaceReference" ) ) as PushButton; + getFaceRefButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( + Properties.Resources.radio_button.GetHbitmap(), + IntPtr.Zero, + System.Windows.Int32Rect.Empty, + BitmapSizeOptions.FromWidthAndHeight( 32, 32 ) ); + getFaceRefButton.SetContextualHelp( new ContextualHelp( ContextualHelpType.Url, "http://grevit.net/" ) ); - [Transaction(TransactionMode.Manual)] - public class GrevitFaceReference : IExternalCommand + PushButton speckleButton = grevitPanel.AddItem( new PushButtonData( "Speckle Client", "Speckle Client", path, "Grevit.Revit.GetSpeckleStream" ) ) as PushButton; + + speckleButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( + Properties.Resources.speckle.GetHbitmap(), + IntPtr.Zero, + System.Windows.Int32Rect.Empty, + BitmapSizeOptions.FromWidthAndHeight( 32, 32 ) ); + + speckleButton.SetContextualHelp( new ContextualHelp( ContextualHelpType.Url, "https://github.com/speckleworks/Grevit" ) ); + + return Result.Succeeded; + } + + public Result OnShutdown( UIControlledApplication a ) { + return Result.Succeeded; + } - public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) - { - // Get Environment Variables - UIApplication uiApp = commandData.Application; - Reference reference = uiApp.ActiveUIDocument.Selection.PickObject(ObjectType.Face, "Select Face"); - if (reference != null) - { - string stable = reference.ConvertToStableRepresentation(uiApp.ActiveUIDocument.Document); - Grevit.Reporting.MessageBox.ShowInTextBox("Stable Reference:", stable); - } + } - return Result.Succeeded; - } + /// + /// The actual Revit Grevit Command + /// + [Transaction( TransactionMode.Manual )] + public class GrevitCommand : IExternalCommand + { + public Result Execute( ExternalCommandData commandData, ref string message, ElementSet elements ) + { + // Get Environment Variables + UIApplication uiApp = commandData.Application; + GrevitBuildModel model = new GrevitBuildModel( uiApp.ActiveUIDocument.Document ); + return model.BuildModel( null ); } + } - /// - /// The actual Revit Grevit Command - /// - public class GrevitBuildModel + [Transaction( TransactionMode.Manual )] + public class GrevitFaceReference : IExternalCommand + { + + public Result Execute( ExternalCommandData commandData, ref string message, ElementSet elements ) { - public GrevitBuildModel(Autodesk.Revit.DB.Document doc) - { - document = doc; - } + // Get Environment Variables + UIApplication uiApp = commandData.Application; + Reference reference = uiApp.ActiveUIDocument.Selection.PickObject( ObjectType.Face, "Select Face" ); + if ( reference != null ) + { + string stable = reference.ConvertToStableRepresentation( uiApp.ActiveUIDocument.Document ); + Grevit.Reporting.MessageBox.ShowInTextBox( "Stable Reference:", stable ); + } + + return Result.Succeeded; + } - /// - /// Current Revit document - /// - public static Document document; - - /// - /// Elements newly created by Grevit - /// - public static Dictionary created_Elements; - - /// - /// Existing Grevit Elements - /// - public static Dictionary existing_Elements; - - /// - /// List for roof shape points to apply - /// - public static List> RoofShapePoints; - - public static double Scale; - - /// - /// Version of the API being used - /// -#if (Revit2016) - public static string Version = "2016"; -#endif -#if (Revit2015) - public static string Version = "2015"; -#endif -#if (Revit2017) - public static string Version = "2017"; -#endif -#if (Revit2018) - public static string Version = "2018"; -#endif -#if (Revit2019) - public static string Version = "2019"; -#endif - /// - /// Revit Template Folder for creating template based family instances - /// - public static string RevitTemplateFolder = String.Format(@"C:\ProgramData\Autodesk\RAC {0}\Family Templates\English", Version); + } - public Result BuildModel(Grevit.Types.ComponentCollection components) - { - bool delete = false; + [Transaction( TransactionMode.Manual )] + public class GetSpeckleStream : IExternalCommand + { + public Result Execute( ExternalCommandData commandData, ref string message, ElementSet elements ) + { + var restApi = "https://hestia.speckle.works/api/v1"; - if (components == null) - { - // Create new Grevit Client sending existing Families - Grevit.Client.ClientWindow grevitClientDialog = new Grevit.Client.ClientWindow(document.GetFamilies()); - //Grevit.Serialization.Client grevitClientDialog = new Grevit.Serialization.Client(document.GetFamilies()); + var streamId = Microsoft.VisualBasic.Interaction.InputBox( "StreamId?", "StreamId", "SkdXGWM37" ); // has some floors in it - // Show Client Dialog - grevitClientDialog.ShowWindow(); - //if (grevitClientDialog.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) return Result.Cancelled; - // Set the received component collection - components = grevitClientDialog.componentCollection; + var myClient = new SpeckleApiClient( restApi ); + var objects = myClient.StreamGetObjectsAsync( streamId, "" ).Result.Resources; - delete = grevitClientDialog.componentCollection.delete; + var hack = new Grevit.Types.Line(); // the grevit types assembly is not loaded yet in the app domain, so this forces it to load. - Scale = grevitClientDialog.componentCollection.scale; - } + var grevitObjects = SpeckleCore.Converter.Deserialise( objects ); - RoofShapePoints = new List>(); + var copy = ""; + Grevit.Types.ComponentCollection myCollection = new ComponentCollection(); - // Set up a List for stalled components (with References) - List componentsWithReferences = new List(); + foreach ( var obj in grevitObjects ) + myCollection.Items.Add( obj as Component ); - // Get all existing Grevit Elements from the Document - // If Update is false this will just be an empty List - existing_Elements = document.GetExistingGrevitElements(components.update); + //myCollection.Items.AddRange( grevitObjects ); - // Set up an empty List for created Elements - created_Elements = new Dictionary(); + // Get Environment Variables + UIApplication uiApp = commandData.Application; + GrevitBuildModel model = new GrevitBuildModel( uiApp.ActiveUIDocument.Document ); + model.BuildModel( myCollection ); + return Result.Succeeded; + } + } + + /// + /// The actual Revit Grevit Command + /// + public class GrevitBuildModel + { + public GrevitBuildModel( Autodesk.Revit.DB.Document doc ) + { + document = doc; + } - #region createComponents + /// + /// Current Revit document + /// + public static Document document; - Transaction trans = new Transaction(GrevitBuildModel.document, "GrevitCreate"); - trans.Start(); + /// + /// Elements newly created by Grevit + /// + public static Dictionary created_Elements; - // Walk thru all received components - foreach (Component component in components.Items) - { - // If they are not reference dependent, create them directly - // Otherwise add the component to a List of stalled elements - if (!component.stalledForReference) - { - try - { - component.Build(false); - } - catch (Exception e) { Grevit.Reporting.MessageBox.Show(component.GetType().Name + " Error", e.InnerException.Message); } - } - else - componentsWithReferences.Add(component); - } + /// + /// Existing Grevit Elements + /// + public static Dictionary existing_Elements; - // Walk thru all elements which are stalled because they are depending on - // an Element which needed to be created first + /// + /// List for roof shape points to apply + /// + public static List> RoofShapePoints; + public static double Scale; - foreach (Component component in componentsWithReferences) - { - try - { - component.Build(true); - } - catch (Exception e) { Grevit.Reporting.MessageBox.Show(component.GetType().Name + " Error", e.InnerException.Message); } - } + /// + /// Version of the API being used + /// +#if ( Revit2016 ) + public static string Version = "2016"; +#endif +#if ( Revit2015 ) + public static string Version = "2015"; +#endif +#if ( Revit2017 ) + public static string Version = "2017"; +#endif +#if ( Revit2018 ) + public static string Version = "2018"; +#endif +#if ( Revit2019 ) + public static string Version = "2019"; +#endif + /// + /// Revit Template Folder for creating template based family instances + /// + public static string RevitTemplateFolder = String.Format( @"C:\ProgramData\Autodesk\RAC {0}\Family Templates\English", Version ); - trans.Commit(); - trans.Dispose(); + public Result BuildModel( Grevit.Types.ComponentCollection components ) + { + bool delete = false; + if ( components == null ) + { + // Create new Grevit Client sending existing Families + Grevit.Client.ClientWindow grevitClientDialog = new Grevit.Client.ClientWindow( document.GetFamilies() ); + //Grevit.Serialization.Client grevitClientDialog = new Grevit.Serialization.Client(document.GetFamilies()); + // Show Client Dialog + grevitClientDialog.ShowWindow(); + //if (grevitClientDialog.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) return Result.Cancelled; - foreach (Tuple rsp in RoofShapePoints) - { - if (rsp.Item1 != ElementId.InvalidElementId) - { - Autodesk.Revit.DB.RoofBase roof = (Autodesk.Revit.DB.RoofBase)document.GetElement(rsp.Item1); - if (roof != null) - { - if (roof.SlabShapeEditor != null) - { - if (roof.SlabShapeEditor.IsEnabled) - { - Transaction pp = new Transaction(GrevitBuildModel.document, "GrevitPostProcessing"); - pp.Start(); - roof.SlabShapeEditor.Enable(); - pp.Commit(); - pp.Dispose(); - } - - List points = new List(); - foreach (Curve c in rsp.Item2) - points.Add(c.GetEndPoint(0)); - - Transaction ppx = new Transaction(GrevitBuildModel.document, "GrevitPostProcessing"); - ppx.Start(); - - foreach (SlabShapeVertex v in roof.SlabShapeEditor.SlabShapeVertices) - { - double Zdiff = 0; - - foreach (XYZ pt in points) - { - if (Math.Abs(v.Position.X - pt.X) < double.Epsilon - && Math.Abs(v.Position.Y - pt.Y) < double.Epsilon - && Math.Abs(v.Position.Z - pt.Z) > double.Epsilon) - Zdiff = pt.Z; - } - - if (Zdiff != 0) - roof.SlabShapeEditor.ModifySubElement(v, Zdiff); - } - - ppx.Commit(); - ppx.Dispose(); - - } - - } - - } - } + // Set the received component collection + components = grevitClientDialog.componentCollection; + delete = grevitClientDialog.componentCollection.delete; + Scale = grevitClientDialog.componentCollection.scale; + } - #endregion + RoofShapePoints = new List>(); - // If Delete Setting is activated - if (delete) - { - // Create a new transaction - Transaction transaction = new Transaction(document, "GrevitDelete"); - transaction.Start(); + // Set up a List for stalled components (with References) + List componentsWithReferences = new List(); - // get the Difference between existing and new elements to erase them - IEnumerable> unused = - existing_Elements.Except(created_Elements).Concat(created_Elements.Except(existing_Elements)); + // Get all existing Grevit Elements from the Document + // If Update is false this will just be an empty List + existing_Elements = document.GetExistingGrevitElements( components.update ); - // Delete those elements from the document - foreach (KeyValuePair element in unused) document.Delete(element.Value); + // Set up an empty List for created Elements + created_Elements = new Dictionary(); - // commit and dispose the transaction - transaction.Commit(); - transaction.Dispose(); - } + #region createComponents + Transaction trans = new Transaction( GrevitBuildModel.document, "GrevitCreate" ); + trans.Start(); - return Result.Succeeded; + // Walk thru all received components + foreach ( Component component in components.Items ) + { + // If they are not reference dependent, create them directly + // Otherwise add the component to a List of stalled elements + if ( !component.stalledForReference ) + { + try + { + component.Build( false ); + } + catch ( Exception e ) { Grevit.Reporting.MessageBox.Show( component.GetType().Name + " Error", e.InnerException.Message ); } } + else + componentsWithReferences.Add( component ); + } + // Walk thru all elements which are stalled because they are depending on + // an Element which needed to be created first - } + foreach ( Component component in componentsWithReferences ) + { + try + { + component.Build( true ); + } + catch ( Exception e ) { Grevit.Reporting.MessageBox.Show( component.GetType().Name + " Error", e.InnerException.Message ); } + } + trans.Commit(); + trans.Dispose(); - /// - /// Provides a parameter overview on selected elements - /// - [Transaction(TransactionMode.Manual)] - public class ParameterNames : IExternalCommand - { - private UIApplication uiApp; - private System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) + + foreach ( Tuple rsp in RoofShapePoints ) + { + if ( rsp.Item1 != ElementId.InvalidElementId ) { - // if the request is coming from us - if ((args.RequestingAssembly != null) && (args.RequestingAssembly == this.GetType().Assembly)) + Autodesk.Revit.DB.RoofBase roof = ( Autodesk.Revit.DB.RoofBase ) document.GetElement( rsp.Item1 ); + if ( roof != null ) + { + if ( roof.SlabShapeEditor != null ) { - if ((args.Name != null) && (args.Name.Contains(","))) // ignore resources and such + if ( roof.SlabShapeEditor.IsEnabled ) + { + Transaction pp = new Transaction( GrevitBuildModel.document, "GrevitPostProcessing" ); + pp.Start(); + roof.SlabShapeEditor.Enable(); + pp.Commit(); + pp.Dispose(); + } + + List points = new List(); + foreach ( Curve c in rsp.Item2 ) + points.Add( c.GetEndPoint( 0 ) ); + + Transaction ppx = new Transaction( GrevitBuildModel.document, "GrevitPostProcessing" ); + ppx.Start(); + + foreach ( SlabShapeVertex v in roof.SlabShapeEditor.SlabShapeVertices ) + { + double Zdiff = 0; + + foreach ( XYZ pt in points ) { - string asmName = args.Name.Split(',')[0]; - string targetFilename = Path.Combine(System.Reflection.Assembly.GetExecutingAssembly().Location, asmName + ".dll"); - uiApp.Application.WriteJournalComment("Assembly Resolve issue. Looking for: " + args.Name, false); - uiApp.Application.WriteJournalComment("Looking for " + targetFilename, false); - if (File.Exists(targetFilename)) - { - uiApp.Application.WriteJournalComment("Found, and loading...", false); - return System.Reflection.Assembly.LoadFrom(targetFilename); - } + if ( Math.Abs( v.Position.X - pt.X ) < double.Epsilon + && Math.Abs( v.Position.Y - pt.Y ) < double.Epsilon + && Math.Abs( v.Position.Z - pt.Z ) > double.Epsilon ) + Zdiff = pt.Z; } + + if ( Zdiff != 0 ) + roof.SlabShapeEditor.ModifySubElement( v, Zdiff ); + } + + ppx.Commit(); + ppx.Dispose(); + } - return null; + + } + } + } - public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) - { - // Get Revit Environment - uiApp = commandData.Application; - Document doc = uiApp.ActiveUIDocument.Document; - UIDocument uidoc = uiApp.ActiveUIDocument; - AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; - // Initialize a new Dictionary containing 4 string fields for parameter values - Dictionary> Parameters = - new Dictionary>(); + #endregion - // Walk thru selected elements - foreach (ElementId elementid in uidoc.Selection.GetElementIds()) - { - // Get the element - Element element = doc.GetElement(elementid); - // Walk thru all parameters - foreach (Autodesk.Revit.DB.Parameter param in element.Parameters) - { - // If the parameter hasn't been added yet, - // Add a new entry to the dictionary - if (!Parameters.ContainsKey(param.Id)) - Parameters.Add(param.Id, new Tuple - ( - param.Definition.Name, - param.StorageType.ToString(), - param.AsValueString(), - param.IsReadOnly.ToString()) - ); - } - } + // If Delete Setting is activated + if ( delete ) + { + // Create a new transaction + Transaction transaction = new Transaction( document, "GrevitDelete" ); + transaction.Start(); - // Create a new instance of the parameter List Dialog - ParameterList parameterListDialog = new ParameterList(); - - // Walk thru the sorted (by name) dictionary - foreach (KeyValuePair> kvp in Parameters.OrderBy(val => val.Value.Item1)) - { - // Create a ListViewItem containing all four values as subitems - System.Windows.Forms.ListViewItem lvi = new System.Windows.Forms.ListViewItem(); - lvi.Text = kvp.Key.IntegerValue.ToString(); - lvi.SubItems.Add(kvp.Value.Item1); - lvi.SubItems.Add(kvp.Value.Item2); - lvi.SubItems.Add(kvp.Value.Item3); - lvi.SubItems.Add(kvp.Value.Item4); - - // Add the ListViewItem to the List View - parameterListDialog.parameters.Items.Add(lvi); - } - - // Show the Dialog - parameterListDialog.ShowDialog(); + // get the Difference between existing and new elements to erase them + IEnumerable> unused = + existing_Elements.Except( created_Elements ).Concat( created_Elements.Except( existing_Elements ) ); - // Return Success - return Result.Succeeded; - } - } + // Delete those elements from the document + foreach ( KeyValuePair element in unused ) document.Delete( element.Value ); + // commit and dispose the transaction + transaction.Commit(); + transaction.Dispose(); + } - /* - /// - /// Imports a SketchUp Model - /// - [Transaction(TransactionMode.Manual)] - public class ImportSketchUp : IExternalCommand - { - public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) - { - // Get Revit Environment - UIApplication uiApp = commandData.Application; - Document doc = uiApp.ActiveUIDocument.Document; - UIDocument uidoc = uiApp.ActiveUIDocument; - GrevitBuildModel c = new GrevitBuildModel(doc); - GrevitBuildModel.Scale = 3.28084; + return Result.Succeeded; + } - System.Windows.Forms.OpenFileDialog filedialog = new System.Windows.Forms.OpenFileDialog(); - filedialog.Multiselect = false; - if (filedialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - SketchUpNET.SketchUp skp = new SketchUpNET.SketchUp(); - if (skp.LoadModel(filedialog.FileName)) - { - Grevit.Types.ComponentCollection components = new ComponentCollection() { Items = new List() }; - - foreach (SketchUpNET.Instance instance in skp.Instances) - { - if (instance.Name.ToLower().Contains("wall")) - { - foreach (SketchUpNET.Surface surface in instance.Parent.Surfaces) - { - components.Items.Add(new WallProfileBased(instance.Parent.Name, instance.Parent.Name, new List(), surface.ToGrevitOutline(instance.Transformation), "") { GID = instance.Guid }); - } - } - - - if (instance.Name.ToLower().Contains("floor")) - { - foreach (SketchUpNET.Surface surface in instance.Parent.Surfaces) - { - Types.Point bottom = instance.Transformation.GetTransformed(surface.Vertices[0]).ToGrevitPoint(); - int ctr = surface.Vertices.Count / 2; - Types.Point top = instance.Transformation.GetTransformed(surface.Vertices[ctr]).ToGrevitPoint(); - - - - components.Items.Add(new Slab() - { - FamilyOrStyle = instance.Parent.Name, - TypeOrLayer = instance.Parent.Name, - parameters = new List(), - structural = true, - height = 1, - surface = - surface.ToGrevitProfile(instance.Transformation), - bottom = bottom, - top = top, - slope = top.z - bottom.z, - GID = instance.Guid, - levelbottom = "", - }); - } - } - - if (instance.Name.ToLower().Contains("column")) - { - Grevit.Types.Profile profile = null; - Grevit.Types.Point top = null; - Grevit.Types.Point btm = new Types.Point(instance.Transformation.X, instance.Transformation.Y, instance.Transformation.Z); - - foreach (SketchUpNET.Surface surface in instance.Parent.Surfaces) - { - - if (surface.Normal.Z == 1) - { - top = new Types.Point(instance.Transformation.X, instance.Transformation.Y, - surface.Vertices[0].ToGrevitPoint(instance.Transformation).z); - } - - } - - components.Items.Add(new Grevit.Types.Column(instance.Parent.Name, instance.Parent.Name, new List(), btm, top, "", true) - { - GID = instance.Guid - }); - } - - - - } - - c.BuildModel(components); - } + } - } + /// + /// Provides a parameter overview on selected elements + /// + [Transaction( TransactionMode.Manual )] + public class ParameterNames : IExternalCommand + { + private UIApplication uiApp; - // Return Success - return Result.Succeeded; + private System.Reflection.Assembly CurrentDomain_AssemblyResolve( object sender, ResolveEventArgs args ) + { + // if the request is coming from us + if ( ( args.RequestingAssembly != null ) && ( args.RequestingAssembly == this.GetType().Assembly ) ) + { + if ( ( args.Name != null ) && ( args.Name.Contains( "," ) ) ) // ignore resources and such + { + string asmName = args.Name.Split( ',' )[ 0 ]; + string targetFilename = Path.Combine( System.Reflection.Assembly.GetExecutingAssembly().Location, asmName + ".dll" ); + uiApp.Application.WriteJournalComment( "Assembly Resolve issue. Looking for: " + args.Name, false ); + uiApp.Application.WriteJournalComment( "Looking for " + targetFilename, false ); + if ( File.Exists( targetFilename ) ) + { + uiApp.Application.WriteJournalComment( "Found, and loading...", false ); + return System.Reflection.Assembly.LoadFrom( targetFilename ); + } } + } + return null; } - public static class Geometry + public Result Execute( ExternalCommandData commandData, ref string message, ElementSet elements ) { + // Get Revit Environment + uiApp = commandData.Application; + Document doc = uiApp.ActiveUIDocument.Document; + UIDocument uidoc = uiApp.ActiveUIDocument; - public static Grevit.Types.Profile ToGrevitProfile(this SketchUpNET.Surface surface, SketchUpNET.Transform t = null) - { - Types.Profile profile = new Types.Profile(); - profile.profile = new List(); + AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; - Loop outerloop = new Loop(); + // Initialize a new Dictionary containing 4 string fields for parameter values + Dictionary> Parameters = + new Dictionary>(); - outerloop.outline = new List(); - foreach (SketchUpNET.Edge corner in surface.OuterEdges.Edges) - outerloop.outline.Add(corner.ToGrevitLine(t)); + // Walk thru selected elements + foreach ( ElementId elementid in uidoc.Selection.GetElementIds() ) + { + // Get the element + Element element = doc.GetElement( elementid ); + + // Walk thru all parameters + foreach ( Autodesk.Revit.DB.Parameter param in element.Parameters ) + { + // If the parameter hasn't been added yet, + // Add a new entry to the dictionary + if ( !Parameters.ContainsKey( param.Id ) ) + Parameters.Add( param.Id, new Tuple + ( + param.Definition.Name, + param.StorageType.ToString(), + param.AsValueString(), + param.IsReadOnly.ToString() ) + ); + } + } + + // Create a new instance of the parameter List Dialog + ParameterList parameterListDialog = new ParameterList(); + + // Walk thru the sorted (by name) dictionary + foreach ( KeyValuePair> kvp in Parameters.OrderBy( val => val.Value.Item1 ) ) + { + // Create a ListViewItem containing all four values as subitems + System.Windows.Forms.ListViewItem lvi = new System.Windows.Forms.ListViewItem(); + lvi.Text = kvp.Key.IntegerValue.ToString(); + lvi.SubItems.Add( kvp.Value.Item1 ); + lvi.SubItems.Add( kvp.Value.Item2 ); + lvi.SubItems.Add( kvp.Value.Item3 ); + lvi.SubItems.Add( kvp.Value.Item4 ); + + // Add the ListViewItem to the List View + parameterListDialog.parameters.Items.Add( lvi ); + } + + // Show the Dialog + parameterListDialog.ShowDialog(); + + // Return Success + return Result.Succeeded; + } + } + + + + /* + /// + /// Imports a SketchUp Model + /// + [Transaction(TransactionMode.Manual)] + public class ImportSketchUp : IExternalCommand + { + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + // Get Revit Environment + UIApplication uiApp = commandData.Application; + Document doc = uiApp.ActiveUIDocument.Document; + UIDocument uidoc = uiApp.ActiveUIDocument; + + GrevitBuildModel c = new GrevitBuildModel(doc); + GrevitBuildModel.Scale = 3.28084; + + System.Windows.Forms.OpenFileDialog filedialog = new System.Windows.Forms.OpenFileDialog(); + filedialog.Multiselect = false; + if (filedialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + SketchUpNET.SketchUp skp = new SketchUpNET.SketchUp(); + if (skp.LoadModel(filedialog.FileName)) + { + Grevit.Types.ComponentCollection components = new ComponentCollection() { Items = new List() }; - profile.profile.Add(outerloop); + foreach (SketchUpNET.Instance instance in skp.Instances) + { + if (instance.Name.ToLower().Contains("wall")) + { + foreach (SketchUpNET.Surface surface in instance.Parent.Surfaces) + { + components.Items.Add(new WallProfileBased(instance.Parent.Name, instance.Parent.Name, new List(), surface.ToGrevitOutline(instance.Transformation), "") { GID = instance.Guid }); + } + } - foreach (SketchUpNET.Loop skploop in surface.InnerEdges) - { - Loop innerloop = new Loop(); + if (instance.Name.ToLower().Contains("floor")) + { + foreach (SketchUpNET.Surface surface in instance.Parent.Surfaces) + { + Types.Point bottom = instance.Transformation.GetTransformed(surface.Vertices[0]).ToGrevitPoint(); + int ctr = surface.Vertices.Count / 2; + Types.Point top = instance.Transformation.GetTransformed(surface.Vertices[ctr]).ToGrevitPoint(); + - innerloop.outline = new List(); - foreach (SketchUpNET.Edge corner in skploop.Edges) - innerloop.outline.Add(corner.ToGrevitLine(t)); - profile.profile.Add(innerloop); - } + components.Items.Add(new Slab() + { + FamilyOrStyle = instance.Parent.Name, + TypeOrLayer = instance.Parent.Name, + parameters = new List(), + structural = true, + height = 1, + surface = + surface.ToGrevitProfile(instance.Transformation), + bottom = bottom, + top = top, + slope = top.z - bottom.z, + GID = instance.Guid, + levelbottom = "", + }); + } + } + + if (instance.Name.ToLower().Contains("column")) + { + Grevit.Types.Profile profile = null; + Grevit.Types.Point top = null; + Grevit.Types.Point btm = new Types.Point(instance.Transformation.X, instance.Transformation.Y, instance.Transformation.Z); + + foreach (SketchUpNET.Surface surface in instance.Parent.Surfaces) + { + + if (surface.Normal.Z == 1) + { + top = new Types.Point(instance.Transformation.X, instance.Transformation.Y, + surface.Vertices[0].ToGrevitPoint(instance.Transformation).z); + } + + } + + components.Items.Add(new Grevit.Types.Column(instance.Parent.Name, instance.Parent.Name, new List(), btm, top, "", true) + { + GID = instance.Guid + }); + } + + + + } + + c.BuildModel(components); + + } + + } + + + + // Return Success + return Result.Succeeded; + } + } + + public static class Geometry + { + + public static Grevit.Types.Profile ToGrevitProfile(this SketchUpNET.Surface surface, SketchUpNET.Transform t = null) + { + Types.Profile profile = new Types.Profile(); + profile.profile = new List(); + + Loop outerloop = new Loop(); + + outerloop.outline = new List(); + foreach (SketchUpNET.Edge corner in surface.OuterEdges.Edges) + outerloop.outline.Add(corner.ToGrevitLine(t)); + + profile.profile.Add(outerloop); + + + foreach (SketchUpNET.Loop skploop in surface.InnerEdges) + { + Loop innerloop = new Loop(); + + innerloop.outline = new List(); + foreach (SketchUpNET.Edge corner in skploop.Edges) + innerloop.outline.Add(corner.ToGrevitLine(t)); + + profile.profile.Add(innerloop); + } + + return profile; + } - return profile; - } + public static List ToGrevitOutline(this SketchUpNET.Surface surface, SketchUpNET.Transform t = null) + { + List lines = new List(); + foreach (SketchUpNET.Edge corner in surface.OuterEdges.Edges) + { + lines.Add(corner.ToGrevitLine(t)); + } + return lines; + } - public static List ToGrevitOutline(this SketchUpNET.Surface surface, SketchUpNET.Transform t = null) - { - List lines = new List(); - foreach (SketchUpNET.Edge corner in surface.OuterEdges.Edges) - { - lines.Add(corner.ToGrevitLine(t)); - } - return lines; - } + public static Grevit.Types.Line ToGrevitLine(this SketchUpNET.Edge corner, SketchUpNET.Transform t = null) + { + return new Grevit.Types.Line() + { + from = corner.Start.ToGrevitPoint(t), + to = corner.End.ToGrevitPoint(t) + }; + } - public static Grevit.Types.Line ToGrevitLine(this SketchUpNET.Edge corner, SketchUpNET.Transform t = null) - { - return new Grevit.Types.Line() - { - from = corner.Start.ToGrevitPoint(t), - to = corner.End.ToGrevitPoint(t) - }; - } + public static Grevit.Types.Point ToGrevitPoint(this SketchUpNET.Vertex v, SketchUpNET.Transform t = null) + { - public static Grevit.Types.Point ToGrevitPoint(this SketchUpNET.Vertex v, SketchUpNET.Transform t = null) - { - - if (t != null) - { - SketchUpNET.Vertex vertex = t.GetTransformed(v); - return new Grevit.Types.Point(vertex.X, vertex.Y, vertex.Z); - } - else - return new Grevit.Types.Point(v.X, v.Y , v.Z ); - } - } - */ + if (t != null) + { + SketchUpNET.Vertex vertex = t.GetTransformed(v); + return new Grevit.Types.Point(vertex.X, vertex.Y, vertex.Z); + } + else + return new Grevit.Types.Point(v.X, v.Y , v.Z ); + } + } + */ } diff --git a/Package/APPDATA_Grasshopper_Libraries/Grevit.GrassHopper.gha b/Package/APPDATA_Grasshopper_Libraries/Grevit.GrassHopper.gha index 9f097a2f7ed2cc533fadac3491e43f6ea0506b54..e179e3c1cd4a60a69167e0e93fad66d53e6db752 100644 GIT binary patch delta 74 zcmZp8!_n}DV?qZrNBxzJ-JK5vN|O)O@SlF>vL`3+=$_hk=Q?jd6U delta 74 zcmZp8!_n}DV?qbB9M|QI-JK5vCU2N3ChPvqY4!=x1dS~#W13YSZdZB8$l?Q1Fr0XdjUP diff --git a/Package/APPDATA_Grasshopper_Libraries/Grevit.Types.dll b/Package/APPDATA_Grasshopper_Libraries/Grevit.Types.dll index cf133f7ca2a9e2290c39c792cae9418cc0b60b92..e6cb0084f07e2b1d0945f94c0bad72b2339021e2 100644 GIT binary patch delta 87 zcmZo@U}ZujfTTTHd^25UPW8=hJJ$AT^M&OC0Xh?`E=Mx}0TU3* qFfuUw5M^Ze@tuJoDA*-f>~o8LG!M7S#kYi()*>ZvY!~pG8MxCzn`{g=S?`Z~azOY;%K<6OGnTGsD$q>WTfcH}m}X!VUmjnIMS( From ad8009dd8beb73148551f4bf8aec25409511d1f0 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Sat, 27 Oct 2018 16:51:28 +0100 Subject: [PATCH 02/20] minor cleanup & extra comments --- Grevit.Revit/Revit.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Grevit.Revit/Revit.cs b/Grevit.Revit/Revit.cs index 142e931..346c0a6 100644 --- a/Grevit.Revit/Revit.cs +++ b/Grevit.Revit/Revit.cs @@ -157,26 +157,26 @@ public Result Execute( ExternalCommandData commandData, ref string message, Elem { var restApi = "https://hestia.speckle.works/api/v1"; - var streamId = Microsoft.VisualBasic.Interaction.InputBox( "StreamId?", "StreamId", "SkdXGWM37" ); // has some floors in it - + // best way to get user input ever + var streamId = Microsoft.VisualBasic.Interaction.InputBox( "StreamId?", "StreamId", "SkdXGWM37" ); // this hardcoded streamId has some grevit slabs in. + // create a light weight client var myClient = new SpeckleApiClient( restApi ); - var objects = myClient.StreamGetObjectsAsync( streamId, "" ).Result.Resources; + // get the stream objects & force sync + var objects = myClient.StreamGetObjectsAsync( streamId, "" ).Result.Resources; var hack = new Grevit.Types.Line(); // the grevit types assembly is not loaded yet in the app domain, so this forces it to load. + // this makes possible native deserialisation by the speckle converter var grevitObjects = SpeckleCore.Converter.Deserialise( objects ); - var copy = ""; - + // create a grevit collection Grevit.Types.ComponentCollection myCollection = new ComponentCollection(); foreach ( var obj in grevitObjects ) myCollection.Items.Add( obj as Component ); - //myCollection.Items.AddRange( grevitObjects ); - - // Get Environment Variables + // Push back into grevit (copy paste from the grevit command). UIApplication uiApp = commandData.Application; GrevitBuildModel model = new GrevitBuildModel( uiApp.ActiveUIDocument.Document ); model.BuildModel( myCollection ); From 0fe8ffd053c589793f7bd59a890ecbf081a6494e Mon Sep 17 00:00:00 2001 From: Matteo Cominetti Date: Tue, 30 Oct 2018 18:36:27 +0000 Subject: [PATCH 03/20] init receiver ui --- Grevit.sln | 24 ++++ SpeckleClientUI.Test/App.config | 6 + SpeckleClientUI.Test/App.xaml | 9 ++ SpeckleClientUI.Test/App.xaml.cs | 17 +++ SpeckleClientUI.Test/MainWindow.xaml | 15 +++ SpeckleClientUI.Test/MainWindow.xaml.cs | 41 ++++++ .../Properties/AssemblyInfo.cs | 55 ++++++++ .../Properties/Resources.Designer.cs | 71 +++++++++++ .../Properties/Resources.resx | 117 ++++++++++++++++++ .../Properties/Settings.Designer.cs | 30 +++++ .../Properties/Settings.settings | 7 ++ .../SpeckleClientUI.Test.csproj | 111 +++++++++++++++++ SpeckleClientUI.Test/packages.config | 5 + SpeckleClientUI/CustomControl1.cs | 54 ++++++++ SpeckleClientUI/Properties/AssemblyInfo.cs | 55 ++++++++ .../Properties/Resources.Designer.cs | 62 ++++++++++ SpeckleClientUI/Properties/Resources.resx | 117 ++++++++++++++++++ .../Properties/Settings.Designer.cs | 30 +++++ SpeckleClientUI/Properties/Settings.settings | 7 ++ SpeckleClientUI/Receiver.xaml | 55 ++++++++ SpeckleClientUI/Receiver.xaml.cs | 28 +++++ SpeckleClientUI/ReceiverViewModel.cs | 48 +++++++ SpeckleClientUI/SampleReceiverData.xaml | 9 ++ SpeckleClientUI/SpeckleClientUI.csproj | 103 +++++++++++++++ SpeckleClientUI/SpeckleExpander.cs | 34 +++++ SpeckleClientUI/Themes/Generic.xaml | 99 +++++++++++++++ SpeckleClientUI/packages.config | 5 + 27 files changed, 1214 insertions(+) create mode 100644 SpeckleClientUI.Test/App.config create mode 100644 SpeckleClientUI.Test/App.xaml create mode 100644 SpeckleClientUI.Test/App.xaml.cs create mode 100644 SpeckleClientUI.Test/MainWindow.xaml create mode 100644 SpeckleClientUI.Test/MainWindow.xaml.cs create mode 100644 SpeckleClientUI.Test/Properties/AssemblyInfo.cs create mode 100644 SpeckleClientUI.Test/Properties/Resources.Designer.cs create mode 100644 SpeckleClientUI.Test/Properties/Resources.resx create mode 100644 SpeckleClientUI.Test/Properties/Settings.Designer.cs create mode 100644 SpeckleClientUI.Test/Properties/Settings.settings create mode 100644 SpeckleClientUI.Test/SpeckleClientUI.Test.csproj create mode 100644 SpeckleClientUI.Test/packages.config create mode 100644 SpeckleClientUI/CustomControl1.cs create mode 100644 SpeckleClientUI/Properties/AssemblyInfo.cs create mode 100644 SpeckleClientUI/Properties/Resources.Designer.cs create mode 100644 SpeckleClientUI/Properties/Resources.resx create mode 100644 SpeckleClientUI/Properties/Settings.Designer.cs create mode 100644 SpeckleClientUI/Properties/Settings.settings create mode 100644 SpeckleClientUI/Receiver.xaml create mode 100644 SpeckleClientUI/Receiver.xaml.cs create mode 100644 SpeckleClientUI/ReceiverViewModel.cs create mode 100644 SpeckleClientUI/SampleReceiverData.xaml create mode 100644 SpeckleClientUI/SpeckleClientUI.csproj create mode 100644 SpeckleClientUI/SpeckleExpander.cs create mode 100644 SpeckleClientUI/Themes/Generic.xaml create mode 100644 SpeckleClientUI/packages.config diff --git a/Grevit.sln b/Grevit.sln index 3a2a4f5..d7034b1 100644 --- a/Grevit.sln +++ b/Grevit.sln @@ -36,6 +36,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeckleCore", "SpeckleCore\SpeckleCore\SpeckleCore.csproj", "{CFE27D3D-8A1A-43F9-9387-8FD9E119E174}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{B00ABF13-362D-4138-82DC-8AAF54CFBE95}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeckleClientUI", "SpeckleClientUI\SpeckleClientUI.csproj", "{5FFC275E-4DC5-4351-A12D-10985BFF4E04}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeckleClientUI.Test", "SpeckleClientUI.Test\SpeckleClientUI.Test.csproj", "{B5511A1D-73EF-4B1B-AAFE-276B109188E8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -134,6 +140,22 @@ Global {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Release|Any CPU.Build.0 = Release|Any CPU {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Release|x64.ActiveCfg = Release|Any CPU {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Release|x64.Build.0 = Release|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Debug|x64.ActiveCfg = Debug|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Debug|x64.Build.0 = Debug|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Release|Any CPU.Build.0 = Release|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Release|x64.ActiveCfg = Release|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Release|x64.Build.0 = Release|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Debug|x64.ActiveCfg = Debug|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Debug|x64.Build.0 = Debug|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Release|Any CPU.Build.0 = Release|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Release|x64.ActiveCfg = Release|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -150,6 +172,8 @@ Global {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945} = {C4D07AA9-402E-41C4-BFAD-9FA21646A621} {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8} = {C4D07AA9-402E-41C4-BFAD-9FA21646A621} {CFE27D3D-8A1A-43F9-9387-8FD9E119E174} = {E2C92A33-0613-453A-BF85-C934E2099A6C} + {5FFC275E-4DC5-4351-A12D-10985BFF4E04} = {B00ABF13-362D-4138-82DC-8AAF54CFBE95} + {B5511A1D-73EF-4B1B-AAFE-276B109188E8} = {B00ABF13-362D-4138-82DC-8AAF54CFBE95} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E692DC88-C969-4267-B377-87AEAFCA44A3} diff --git a/SpeckleClientUI.Test/App.config b/SpeckleClientUI.Test/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/SpeckleClientUI.Test/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SpeckleClientUI.Test/App.xaml b/SpeckleClientUI.Test/App.xaml new file mode 100644 index 0000000..c24ce2f --- /dev/null +++ b/SpeckleClientUI.Test/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/SpeckleClientUI.Test/App.xaml.cs b/SpeckleClientUI.Test/App.xaml.cs new file mode 100644 index 0000000..cd682a0 --- /dev/null +++ b/SpeckleClientUI.Test/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace SpeckleClientUI.Test +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/SpeckleClientUI.Test/MainWindow.xaml b/SpeckleClientUI.Test/MainWindow.xaml new file mode 100644 index 0000000..4c2ad2b --- /dev/null +++ b/SpeckleClientUI.Test/MainWindow.xaml @@ -0,0 +1,15 @@ + + + + + diff --git a/SpeckleClientUI.Test/MainWindow.xaml.cs b/SpeckleClientUI.Test/MainWindow.xaml.cs new file mode 100644 index 0000000..9f0189b --- /dev/null +++ b/SpeckleClientUI.Test/MainWindow.xaml.cs @@ -0,0 +1,41 @@ +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 SpeckleClientUI.Test +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + receiver.DataContext = new List + { + new ReceiverViewModel + { + StreamName="TEST", + StreamId="123", + }, + new ReceiverViewModel + { + StreamName="AAAA", + StreamId="sdfsdf", + }, + }; + } + } +} diff --git a/SpeckleClientUI.Test/Properties/AssemblyInfo.cs b/SpeckleClientUI.Test/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b3e1e09 --- /dev/null +++ b/SpeckleClientUI.Test/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("SpeckleClientUI.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SpeckleClientUI.Test")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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 +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the 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/SpeckleClientUI.Test/Properties/Resources.Designer.cs b/SpeckleClientUI.Test/Properties/Resources.Designer.cs new file mode 100644 index 0000000..0aa6b5b --- /dev/null +++ b/SpeckleClientUI.Test/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace SpeckleClientUI.Test.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("SpeckleClientUI.Test.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [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/SpeckleClientUI.Test/Properties/Resources.resx b/SpeckleClientUI.Test/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/SpeckleClientUI.Test/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SpeckleClientUI.Test/Properties/Settings.Designer.cs b/SpeckleClientUI.Test/Properties/Settings.Designer.cs new file mode 100644 index 0000000..645476b --- /dev/null +++ b/SpeckleClientUI.Test/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace SpeckleClientUI.Test.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/SpeckleClientUI.Test/Properties/Settings.settings b/SpeckleClientUI.Test/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/SpeckleClientUI.Test/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SpeckleClientUI.Test/SpeckleClientUI.Test.csproj b/SpeckleClientUI.Test/SpeckleClientUI.Test.csproj new file mode 100644 index 0000000..13893af --- /dev/null +++ b/SpeckleClientUI.Test/SpeckleClientUI.Test.csproj @@ -0,0 +1,111 @@ + + + + + Debug + AnyCPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8} + WinExe + SpeckleClientUI.Test + SpeckleClientUI.Test + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll + + + ..\packages\MaterialDesignThemes.2.5.1-ci1219\lib\net45\MaterialDesignThemes.Wpf.dll + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {5ffc275e-4dc5-4351-a12d-10985bff4e04} + SpeckleClientUI + + + + \ No newline at end of file diff --git a/SpeckleClientUI.Test/packages.config b/SpeckleClientUI.Test/packages.config new file mode 100644 index 0000000..04eca74 --- /dev/null +++ b/SpeckleClientUI.Test/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/SpeckleClientUI/CustomControl1.cs b/SpeckleClientUI/CustomControl1.cs new file mode 100644 index 0000000..e7e61cd --- /dev/null +++ b/SpeckleClientUI/CustomControl1.cs @@ -0,0 +1,54 @@ +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 SpeckleClientUI +{ + /// + /// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file. + /// + /// Step 1a) Using this custom control in a XAML file that exists in the current project. + /// Add this XmlNamespace attribute to the root element of the markup file where it is + /// to be used: + /// + /// xmlns:MyNamespace="clr-namespace:SpeckleClientUI" + /// + /// + /// Step 1b) Using this custom control in a XAML file that exists in a different project. + /// Add this XmlNamespace attribute to the root element of the markup file where it is + /// to be used: + /// + /// xmlns:MyNamespace="clr-namespace:SpeckleClientUI;assembly=SpeckleClientUI" + /// + /// You will also need to add a project reference from the project where the XAML file lives + /// to this project and Rebuild to avoid compilation errors: + /// + /// Right click on the target project in the Solution Explorer and + /// "Add Reference"->"Projects"->[Select this project] + /// + /// + /// Step 2) + /// Go ahead and use your control in the XAML file. + /// + /// + /// + /// + public class CustomControl1 : Control + { + static CustomControl1() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomControl1), new FrameworkPropertyMetadata(typeof(CustomControl1))); + } + } +} diff --git a/SpeckleClientUI/Properties/AssemblyInfo.cs b/SpeckleClientUI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..dd0d301 --- /dev/null +++ b/SpeckleClientUI/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("SpeckleClientUI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SpeckleClientUI")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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 +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the 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/SpeckleClientUI/Properties/Resources.Designer.cs b/SpeckleClientUI/Properties/Resources.Designer.cs new file mode 100644 index 0000000..3fa8db0 --- /dev/null +++ b/SpeckleClientUI/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace SpeckleClientUI.Properties { + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("SpeckleClientUI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [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/SpeckleClientUI/Properties/Resources.resx b/SpeckleClientUI/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/SpeckleClientUI/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SpeckleClientUI/Properties/Settings.Designer.cs b/SpeckleClientUI/Properties/Settings.Designer.cs new file mode 100644 index 0000000..91d9f3c --- /dev/null +++ b/SpeckleClientUI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace SpeckleClientUI.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/SpeckleClientUI/Properties/Settings.settings b/SpeckleClientUI/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/SpeckleClientUI/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SpeckleClientUI/Receiver.xaml b/SpeckleClientUI/Receiver.xaml new file mode 100644 index 0000000..33d6e70 --- /dev/null +++ b/SpeckleClientUI/Receiver.xaml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SpeckleClientUI/Receiver.xaml.cs b/SpeckleClientUI/Receiver.xaml.cs new file mode 100644 index 0000000..0268389 --- /dev/null +++ b/SpeckleClientUI/Receiver.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 SpeckleClientUI +{ + /// + /// Interaction logic for Receiver.xaml + /// + public partial class Receiver : UserControl + { + public Receiver() + { + InitializeComponent(); + } + } +} diff --git a/SpeckleClientUI/ReceiverViewModel.cs b/SpeckleClientUI/ReceiverViewModel.cs new file mode 100644 index 0000000..de538b0 --- /dev/null +++ b/SpeckleClientUI/ReceiverViewModel.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SpeckleClientUI +{ + public class ReceiverViewModel : INotifyPropertyChanged + { + private string _authToken; + private string _restApi; + private string _email; + private string _server; + private string _streamId; + private string _streamName; + private bool _transmitting; + + internal string AuthToken { get => _authToken; set { _authToken = value; NotifyPropertyChanged("AuthToken"); } } + internal bool Expired = false; + + + public string RestApi { get => _restApi; set { _restApi = value; NotifyPropertyChanged("RestApi"); } } + public string Email { get => _email; set { _email = value; NotifyPropertyChanged("Email"); } } + public string Server { get => _server; set { _server = value; NotifyPropertyChanged("Server"); } } + public string StreamId { get => _streamId; set { _streamId = value; NotifyPropertyChanged("StreamId"); } } + public string StreamName { get => _streamName; set { _streamName = value; NotifyPropertyChanged("StreamName"); } } + public bool Transmitting { get => _transmitting; set { _transmitting = value; NotifyPropertyChanged("Transmitting"); } } + + + + public event PropertyChangedEventHandler PropertyChanged; + private void NotifyPropertyChanged(String info) + { + if (PropertyChanged != null) + { + PropertyChanged(this, new PropertyChangedEventArgs(info)); + } + } + } + + //only used for the DesignData xaml + public class Receivers : List + { + public Receivers() { } + } +} diff --git a/SpeckleClientUI/SampleReceiverData.xaml b/SpeckleClientUI/SampleReceiverData.xaml new file mode 100644 index 0000000..61ed1b2 --- /dev/null +++ b/SpeckleClientUI/SampleReceiverData.xaml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/SpeckleClientUI/SpeckleClientUI.csproj b/SpeckleClientUI/SpeckleClientUI.csproj new file mode 100644 index 0000000..973fc27 --- /dev/null +++ b/SpeckleClientUI/SpeckleClientUI.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04} + library + SpeckleClientUI + SpeckleClientUI + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll + + + ..\packages\MaterialDesignThemes.2.5.1-ci1219\lib\net45\MaterialDesignThemes.Wpf.dll + + + + + + + + + + + 4.0 + + + + + + + + + Receiver.xaml + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + \ No newline at end of file diff --git a/SpeckleClientUI/SpeckleExpander.cs b/SpeckleClientUI/SpeckleExpander.cs new file mode 100644 index 0000000..db6cc5b --- /dev/null +++ b/SpeckleClientUI/SpeckleExpander.cs @@ -0,0 +1,34 @@ +using System.Windows; +using System.Windows.Controls; + +namespace SpeckleClientUI +{ + public class SpeckleExpander : Expander + { + + public static DependencyProperty StreamIdProperty = + DependencyProperty.Register( + "StreamId", + typeof(string), + typeof(SpeckleExpander)); + + + + static SpeckleExpander() + { + DefaultStyleKeyProperty.OverrideMetadata( + typeof(SpeckleExpander), + new FrameworkPropertyMetadata(typeof(SpeckleExpander))); + } + + + public string StreamId + { + get { return (string)GetValue(StreamIdProperty); } + set { SetValue(StreamIdProperty, value); } + } + + + + } +} diff --git a/SpeckleClientUI/Themes/Generic.xaml b/SpeckleClientUI/Themes/Generic.xaml new file mode 100644 index 0000000..46a4d55 --- /dev/null +++ b/SpeckleClientUI/Themes/Generic.xaml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SpeckleClientUI/packages.config b/SpeckleClientUI/packages.config new file mode 100644 index 0000000..04eca74 --- /dev/null +++ b/SpeckleClientUI/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file From 8c593a982eb58f93026d7d5e5b945966625c89e6 Mon Sep 17 00:00:00 2001 From: "matteo.cominetti" Date: Wed, 31 Oct 2018 19:21:32 +0000 Subject: [PATCH 04/20] Finalized UI, added speckle popup, added specklecore integration --- Grevit.sln | 63 ++++ .../AccountsUserControl.xaml | 262 ++++++++++++++++ .../AccountsUserControl.xaml.cs | 296 ++++++++++++++++++ SpeckleAccountManager/App.config | 6 + SpeckleAccountManager/LICENSE | 21 ++ SpeckleAccountManager/MainWindow.xaml | 66 ++++ SpeckleAccountManager/MainWindow.xaml.cs | 83 +++++ .../Properties/AssemblyInfo.cs | 55 ++++ .../Properties/Resources.Designer.cs | 73 +++++ .../Properties/Resources.resx | 124 ++++++++ .../Properties/Settings.Designer.cs | 26 ++ .../Properties/Settings.settings | 7 + SpeckleAccountManager/README.md | 2 + .../Resources/2xfucklogos@2x.png | Bin 0 -> 10861 bytes SpeckleAccountManager/SpecklePopup.csproj | 171 ++++++++++ SpeckleClientUI.Test/MainWindow.xaml | 6 +- SpeckleClientUI.Test/MainWindow.xaml.cs | 17 +- SpeckleClientUI/CustomControl1.cs | 54 ---- SpeckleClientUI/Data/Commands.cs | 16 + SpeckleClientUI/Receiver.cs | 120 +++++++ SpeckleClientUI/Receiver.xaml | 55 ---- SpeckleClientUI/Receiver.xaml.cs | 28 -- SpeckleClientUI/ReceiverViewModel.cs | 48 --- SpeckleClientUI/ReceiversUi.xaml | 186 +++++++++++ SpeckleClientUI/ReceiversUi.xaml.cs | 87 +++++ SpeckleClientUI/SampleReceiverData.xaml | 34 +- SpeckleClientUI/SpeckleClientUI.csproj | 28 +- SpeckleClientUI/SpeckleExpander.cs | 34 -- SpeckleClientUI/Themes/Generic.xaml | 87 ++++- .../ValueConverters/BoolVisibConverter.cs | 33 ++ .../ValueConverters/InvertBoolConverter.cs | 33 ++ SpeckleCore | 2 +- 32 files changed, 1853 insertions(+), 270 deletions(-) create mode 100644 SpeckleAccountManager/AccountsUserControl.xaml create mode 100644 SpeckleAccountManager/AccountsUserControl.xaml.cs create mode 100644 SpeckleAccountManager/App.config create mode 100644 SpeckleAccountManager/LICENSE create mode 100644 SpeckleAccountManager/MainWindow.xaml create mode 100644 SpeckleAccountManager/MainWindow.xaml.cs create mode 100644 SpeckleAccountManager/Properties/AssemblyInfo.cs create mode 100644 SpeckleAccountManager/Properties/Resources.Designer.cs create mode 100644 SpeckleAccountManager/Properties/Resources.resx create mode 100644 SpeckleAccountManager/Properties/Settings.Designer.cs create mode 100644 SpeckleAccountManager/Properties/Settings.settings create mode 100644 SpeckleAccountManager/README.md create mode 100644 SpeckleAccountManager/Resources/2xfucklogos@2x.png create mode 100644 SpeckleAccountManager/SpecklePopup.csproj delete mode 100644 SpeckleClientUI/CustomControl1.cs create mode 100644 SpeckleClientUI/Data/Commands.cs create mode 100644 SpeckleClientUI/Receiver.cs delete mode 100644 SpeckleClientUI/Receiver.xaml delete mode 100644 SpeckleClientUI/Receiver.xaml.cs delete mode 100644 SpeckleClientUI/ReceiverViewModel.cs create mode 100644 SpeckleClientUI/ReceiversUi.xaml create mode 100644 SpeckleClientUI/ReceiversUi.xaml.cs delete mode 100644 SpeckleClientUI/SpeckleExpander.cs create mode 100644 SpeckleClientUI/ValueConverters/BoolVisibConverter.cs create mode 100644 SpeckleClientUI/ValueConverters/InvertBoolConverter.cs diff --git a/Grevit.sln b/Grevit.sln index d7034b1..ec1e17c 100644 --- a/Grevit.sln +++ b/Grevit.sln @@ -42,10 +42,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeckleClientUI", "SpeckleC EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeckleClientUI.Test", "SpeckleClientUI.Test\SpeckleClientUI.Test.csproj", "{B5511A1D-73EF-4B1B-AAFE-276B109188E8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpecklePopup", "SpeckleAccountManager\SpecklePopup.csproj", "{D65594C8-EA2E-46CA-A756-B1634EDC3AE3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 + DebugRevit|Any CPU = DebugRevit|Any CPU + DebugRevit|x64 = DebugRevit|x64 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection @@ -54,6 +58,10 @@ Global {4E16464A-4495-4A27-B810-A54F9CE3D191}.Debug|Any CPU.Build.0 = Debug|Any CPU {4E16464A-4495-4A27-B810-A54F9CE3D191}.Debug|x64.ActiveCfg = Debug|x64 {4E16464A-4495-4A27-B810-A54F9CE3D191}.Debug|x64.Build.0 = Debug|x64 + {4E16464A-4495-4A27-B810-A54F9CE3D191}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {4E16464A-4495-4A27-B810-A54F9CE3D191}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {4E16464A-4495-4A27-B810-A54F9CE3D191}.DebugRevit|x64.ActiveCfg = Debug|x64 + {4E16464A-4495-4A27-B810-A54F9CE3D191}.DebugRevit|x64.Build.0 = Debug|x64 {4E16464A-4495-4A27-B810-A54F9CE3D191}.Release|Any CPU.ActiveCfg = Debug|Any CPU {4E16464A-4495-4A27-B810-A54F9CE3D191}.Release|Any CPU.Build.0 = Debug|Any CPU {4E16464A-4495-4A27-B810-A54F9CE3D191}.Release|x64.ActiveCfg = Release|x64 @@ -62,6 +70,10 @@ Global {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.Debug|Any CPU.Build.0 = Debug|Any CPU {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.Debug|x64.ActiveCfg = Debug|x64 {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.Debug|x64.Build.0 = Debug|x64 + {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.DebugRevit|x64.ActiveCfg = Debug|x64 + {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.DebugRevit|x64.Build.0 = Debug|x64 {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.Release|Any CPU.ActiveCfg = Debug|Any CPU {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.Release|Any CPU.Build.0 = Debug|Any CPU {B34038F6-82A6-428C-9D1B-D8FA40527EF9}.Release|x64.ActiveCfg = Release|x64 @@ -70,6 +82,8 @@ Global {FC8F9BB5-5915-4EB9-B1B5-BBFE02058115}.Debug|Any CPU.Build.0 = Debug {FC8F9BB5-5915-4EB9-B1B5-BBFE02058115}.Debug|x64.ActiveCfg = Debug {FC8F9BB5-5915-4EB9-B1B5-BBFE02058115}.Debug|x64.Build.0 = Debug + {FC8F9BB5-5915-4EB9-B1B5-BBFE02058115}.DebugRevit|Any CPU.ActiveCfg = Debug + {FC8F9BB5-5915-4EB9-B1B5-BBFE02058115}.DebugRevit|x64.ActiveCfg = Debug {FC8F9BB5-5915-4EB9-B1B5-BBFE02058115}.Release|Any CPU.ActiveCfg = Debug {FC8F9BB5-5915-4EB9-B1B5-BBFE02058115}.Release|Any CPU.Build.0 = Debug {FC8F9BB5-5915-4EB9-B1B5-BBFE02058115}.Release|x64.ActiveCfg = Release @@ -77,6 +91,8 @@ Global {9E52B6AD-6F0E-4D36-8E81-4E0C76B5C5D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9E52B6AD-6F0E-4D36-8E81-4E0C76B5C5D3}.Debug|Any CPU.Build.0 = Debug|Any CPU {9E52B6AD-6F0E-4D36-8E81-4E0C76B5C5D3}.Debug|x64.ActiveCfg = Debug|Any CPU + {9E52B6AD-6F0E-4D36-8E81-4E0C76B5C5D3}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {9E52B6AD-6F0E-4D36-8E81-4E0C76B5C5D3}.DebugRevit|x64.ActiveCfg = Debug|Any CPU {9E52B6AD-6F0E-4D36-8E81-4E0C76B5C5D3}.Release|Any CPU.ActiveCfg = Release|Any CPU {9E52B6AD-6F0E-4D36-8E81-4E0C76B5C5D3}.Release|Any CPU.Build.0 = Release|Any CPU {9E52B6AD-6F0E-4D36-8E81-4E0C76B5C5D3}.Release|x64.ActiveCfg = Release|Any CPU @@ -84,6 +100,10 @@ Global {F696EC24-DE61-4BF2-AE01-A22994B220F5}.Debug|Any CPU.Build.0 = Debug|Any CPU {F696EC24-DE61-4BF2-AE01-A22994B220F5}.Debug|x64.ActiveCfg = Debug|x64 {F696EC24-DE61-4BF2-AE01-A22994B220F5}.Debug|x64.Build.0 = Debug|x64 + {F696EC24-DE61-4BF2-AE01-A22994B220F5}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {F696EC24-DE61-4BF2-AE01-A22994B220F5}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {F696EC24-DE61-4BF2-AE01-A22994B220F5}.DebugRevit|x64.ActiveCfg = Debug|x64 + {F696EC24-DE61-4BF2-AE01-A22994B220F5}.DebugRevit|x64.Build.0 = Debug|x64 {F696EC24-DE61-4BF2-AE01-A22994B220F5}.Release|Any CPU.ActiveCfg = Debug|Any CPU {F696EC24-DE61-4BF2-AE01-A22994B220F5}.Release|Any CPU.Build.0 = Debug|Any CPU {F696EC24-DE61-4BF2-AE01-A22994B220F5}.Release|x64.ActiveCfg = Release|x64 @@ -92,6 +112,10 @@ Global {BD218AED-E5BA-4F20-86D7-711F659A636B}.Debug|Any CPU.Build.0 = Debug|Any CPU {BD218AED-E5BA-4F20-86D7-711F659A636B}.Debug|x64.ActiveCfg = Debug|x64 {BD218AED-E5BA-4F20-86D7-711F659A636B}.Debug|x64.Build.0 = Debug|x64 + {BD218AED-E5BA-4F20-86D7-711F659A636B}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {BD218AED-E5BA-4F20-86D7-711F659A636B}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {BD218AED-E5BA-4F20-86D7-711F659A636B}.DebugRevit|x64.ActiveCfg = Debug|x64 + {BD218AED-E5BA-4F20-86D7-711F659A636B}.DebugRevit|x64.Build.0 = Debug|x64 {BD218AED-E5BA-4F20-86D7-711F659A636B}.Release|Any CPU.ActiveCfg = Debug|Any CPU {BD218AED-E5BA-4F20-86D7-711F659A636B}.Release|Any CPU.Build.0 = Debug|Any CPU {BD218AED-E5BA-4F20-86D7-711F659A636B}.Release|x64.ActiveCfg = Release|x64 @@ -100,6 +124,8 @@ Global {2891A8C7-84E9-414C-987A-B1ED73802203}.Debug|Any CPU.Build.0 = Debug|Any CPU {2891A8C7-84E9-414C-987A-B1ED73802203}.Debug|x64.ActiveCfg = Debug|x64 {2891A8C7-84E9-414C-987A-B1ED73802203}.Debug|x64.Build.0 = Debug|x64 + {2891A8C7-84E9-414C-987A-B1ED73802203}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {2891A8C7-84E9-414C-987A-B1ED73802203}.DebugRevit|x64.ActiveCfg = Debug|x64 {2891A8C7-84E9-414C-987A-B1ED73802203}.Release|Any CPU.ActiveCfg = Debug|Any CPU {2891A8C7-84E9-414C-987A-B1ED73802203}.Release|Any CPU.Build.0 = Debug|Any CPU {2891A8C7-84E9-414C-987A-B1ED73802203}.Release|x64.ActiveCfg = Release|x64 @@ -107,12 +133,18 @@ Global {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.Debug|Any CPU.Build.0 = Debug|Any CPU {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.Debug|x64.ActiveCfg = Debug|Any CPU + {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.DebugRevit|x64.ActiveCfg = Debug|Any CPU + {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.DebugRevit|x64.Build.0 = Debug|Any CPU {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.Release|Any CPU.ActiveCfg = Debug|Any CPU {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.Release|Any CPU.Build.0 = Debug|Any CPU {92BBF3EB-C3CC-4779-B172-CA87C78B0FA0}.Release|x64.ActiveCfg = Release|Any CPU {0997B88A-23F6-446D-BEC7-CB68AC05F820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0997B88A-23F6-446D-BEC7-CB68AC05F820}.Debug|Any CPU.Build.0 = Debug|Any CPU {0997B88A-23F6-446D-BEC7-CB68AC05F820}.Debug|x64.ActiveCfg = Debug|Any CPU + {0997B88A-23F6-446D-BEC7-CB68AC05F820}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {0997B88A-23F6-446D-BEC7-CB68AC05F820}.DebugRevit|x64.ActiveCfg = Debug|Any CPU {0997B88A-23F6-446D-BEC7-CB68AC05F820}.Release|Any CPU.ActiveCfg = Release|Any CPU {0997B88A-23F6-446D-BEC7-CB68AC05F820}.Release|Any CPU.Build.0 = Release|Any CPU {0997B88A-23F6-446D-BEC7-CB68AC05F820}.Release|x64.ActiveCfg = Release|Any CPU @@ -120,6 +152,8 @@ Global {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945}.Debug|Any CPU.Build.0 = Debug|Any CPU {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945}.Debug|x64.ActiveCfg = Debug|Any CPU {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945}.Debug|x64.Build.0 = Debug|Any CPU + {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945}.DebugRevit|x64.ActiveCfg = Debug|Any CPU {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945}.Release|Any CPU.ActiveCfg = Release|Any CPU {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945}.Release|Any CPU.Build.0 = Release|Any CPU {4DA1BFFF-AFC7-4012-A241-ED5F7CDF1945}.Release|x64.ActiveCfg = Release|Any CPU @@ -128,6 +162,10 @@ Global {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.Debug|Any CPU.Build.0 = Debug|Any CPU {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.Debug|x64.ActiveCfg = Debug|Any CPU {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.Debug|x64.Build.0 = Debug|Any CPU + {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.DebugRevit|x64.ActiveCfg = Debug|Any CPU + {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.DebugRevit|x64.Build.0 = Debug|Any CPU {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.Release|Any CPU.ActiveCfg = Debug|Any CPU {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.Release|Any CPU.Build.0 = Debug|Any CPU {09ABEC87-E1BF-4A05-9D6B-AB0F1A5428C8}.Release|x64.ActiveCfg = Release|Any CPU @@ -136,6 +174,10 @@ Global {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Debug|Any CPU.Build.0 = Debug|Any CPU {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Debug|x64.ActiveCfg = Debug|Any CPU {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Debug|x64.Build.0 = Debug|Any CPU + {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.DebugRevit|x64.ActiveCfg = Debug|Any CPU + {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.DebugRevit|x64.Build.0 = Debug|Any CPU {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Release|Any CPU.ActiveCfg = Release|Any CPU {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Release|Any CPU.Build.0 = Release|Any CPU {CFE27D3D-8A1A-43F9-9387-8FD9E119E174}.Release|x64.ActiveCfg = Release|Any CPU @@ -144,6 +186,10 @@ Global {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Debug|Any CPU.Build.0 = Debug|Any CPU {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Debug|x64.ActiveCfg = Debug|Any CPU {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Debug|x64.Build.0 = Debug|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.DebugRevit|x64.ActiveCfg = Debug|Any CPU + {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.DebugRevit|x64.Build.0 = Debug|Any CPU {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Release|Any CPU.ActiveCfg = Release|Any CPU {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Release|Any CPU.Build.0 = Release|Any CPU {5FFC275E-4DC5-4351-A12D-10985BFF4E04}.Release|x64.ActiveCfg = Release|Any CPU @@ -152,10 +198,26 @@ Global {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Debug|x64.ActiveCfg = Debug|Any CPU {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Debug|x64.Build.0 = Debug|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.DebugRevit|Any CPU.ActiveCfg = Debug|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.DebugRevit|Any CPU.Build.0 = Debug|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.DebugRevit|x64.ActiveCfg = Debug|Any CPU + {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.DebugRevit|x64.Build.0 = Debug|Any CPU {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Release|Any CPU.Build.0 = Release|Any CPU {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Release|x64.ActiveCfg = Release|Any CPU {B5511A1D-73EF-4B1B-AAFE-276B109188E8}.Release|x64.Build.0 = Release|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.Debug|x64.ActiveCfg = Debug|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.Debug|x64.Build.0 = Debug|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.DebugRevit|Any CPU.ActiveCfg = DebugRevit|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.DebugRevit|Any CPU.Build.0 = DebugRevit|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.DebugRevit|x64.ActiveCfg = DebugRevit|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.DebugRevit|x64.Build.0 = DebugRevit|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.Release|Any CPU.Build.0 = Release|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.Release|x64.ActiveCfg = Release|Any CPU + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -174,6 +236,7 @@ Global {CFE27D3D-8A1A-43F9-9387-8FD9E119E174} = {E2C92A33-0613-453A-BF85-C934E2099A6C} {5FFC275E-4DC5-4351-A12D-10985BFF4E04} = {B00ABF13-362D-4138-82DC-8AAF54CFBE95} {B5511A1D-73EF-4B1B-AAFE-276B109188E8} = {B00ABF13-362D-4138-82DC-8AAF54CFBE95} + {D65594C8-EA2E-46CA-A756-B1634EDC3AE3} = {B00ABF13-362D-4138-82DC-8AAF54CFBE95} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E692DC88-C969-4267-B377-87AEAFCA44A3} diff --git a/SpeckleAccountManager/AccountsUserControl.xaml b/SpeckleAccountManager/AccountsUserControl.xaml new file mode 100644 index 0000000..a12b085 --- /dev/null +++ b/SpeckleAccountManager/AccountsUserControl.xaml @@ -0,0 +1,262 @@ + + + + + +