Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
adds optional url override for app loading
Browse files Browse the repository at this point in the history
  • Loading branch information
didimitrie committed Aug 15, 2019
1 parent 34338a4 commit 5358666
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions SpeckleUiBase/SpeckleUiWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ namespace SpeckleUiBase
/// </summary>
public partial class SpeckleUiWindow : Window
{
public SpeckleUiWindow( SpeckleUIBindings baseBindings )
/// <summary>
/// Instantiates the ui.
/// </summary>
/// <param name="baseBindings">Your implementation of the SpeckleUiBindings class.</param>
/// <param name="address">Defaults to the master branch release of the web ui app. Change it to where you're running your local server when debugging!</param>
public SpeckleUiWindow( SpeckleUIBindings baseBindings, string address = "https://appui.speckle.systems/#/" )
{
InitializeComponent();

Expand All @@ -32,12 +37,7 @@ public SpeckleUiWindow( SpeckleUIBindings baseBindings )

Browser.RegisterAsyncJsObject( "UiBindings", baseBindings );

#if DEBUG
Browser.Address = @"http://10.211.55.2:8080"; // YMMV: change this to where your node app resides
#else
Browser.Address = @"https://appui.speckle.systems/#/";
#endif

Browser.Address = address;
}

// Note: Dynamo ships with cefsharp too, so we need to be careful around initialising cefsharp.
Expand All @@ -52,7 +52,7 @@ private void InitializeCef( )
var pathSubprocess = System.IO.Path.Combine( assemblyPath, "CefSharp.BrowserSubprocess.exe" );
var settings = new CefSettings
{
BrowserSubprocessPath = pathSubprocess
BrowserSubprocessPath = pathSubprocess,
};

Cef.Initialize( settings );
Expand Down

0 comments on commit 5358666

Please sign in to comment.