internal void ShowShapewaysLogin(Shapeways client)
        {
            context.Send((_) =>
            {
                var window = new BrowserWindow(new Uri(client.LoginUrl))
                {
                    Title = "Shapeways",
                    Owner = parent,
                    WindowStartupLocation = WindowStartupLocation.CenterOwner,
                    Height = 500,
                    Width  = 1000
                };

                window.Browser.LoadCompleted += (sender, args) =>
                {
                    if (args.Uri.AbsolutePath == "/callbackDynamoShapeways")
                    {
                        client.SetToken(args.Uri.PathAndQuery);
                        window.Close();
                    }
                };

                window.Browser.Loaded += (sender, args) =>
                {
                    HideScriptErrors(window.Browser, true);
                };

                window.ShowDialog();
            }, null);
        }
Example #2
0
        internal void ShowShapewaysLogin(Shapeways client) 
        {
            context.Send((_) =>
            {

                var window = new BrowserWindow(new Uri(client.LoginUrl))
                {
                    Title = "Shapeways",
                    Owner = parent,
                    WindowStartupLocation = WindowStartupLocation.CenterOwner,
                    Height = 500,
                    Width = 1000
                };

                window.Browser.LoadCompleted += (sender, args) => 
                {
                    if (args.Uri.AbsolutePath == "/callbackDynamoShapeways") 
                    {
                        client.SetToken(args.Uri.PathAndQuery);
                        window.Close();
                    }
                };

                window.Browser.Loaded += (sender, args) =>
                {
                    HideScriptErrors(window.Browser, true);
                };

                window.ShowDialog();

            }, null);
        }