public DesignSurfacePage(DesignServer server) { _server = server; Title = "Design Surface"; }
protected DesignWorkflow(DesignServer server) { Server = server; }
/// <summary> /// Instantiate a <see cref="DefaultDesignWorkflow"/>. /// </summary> /// <param name="messageFinder">Instantiates objects, using reflection.</param> /// <param name="server">When a message has been dispatched, the response is sent to the toolbox.</param> public DefaultDesignWorkflow(IXenMessageFinder messageFinder, DesignServer server) : base(server) { _messageFinder = messageFinder; }
public ConnectionPage(DesignServer server, IXamlLoader xamlLoader, ITypeFinder typeFinder, IGetDesignerVersion version) { _server = server; _xamlLoader = xamlLoader; _typeFinder = typeFinder; _version = version; _mainLayout = new StackLayout { Padding = new Thickness(10), Spacing = 5, Orientation = StackOrientation.Vertical }; _disconnectBtn = new Button { Text = "Disconnect", VerticalOptions = LayoutOptions.End, HorizontalOptions = LayoutOptions.Fill, }; _continueBtn = new Button { Text = "Design Surface", VerticalOptions = LayoutOptions.End, HorizontalOptions = LayoutOptions.Fill, }; _acceptingConnections = new Label { VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.Center, HorizontalTextAlignment = TextAlignment.Center, TextColor = Color.White, Text = $"Ready!\nNow accepting connections to:\n{_server.ListeningOn}", FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)) }; _status = new Label { VerticalOptions = LayoutOptions.EndAndExpand, HorizontalOptions = LayoutOptions.CenterAndExpand, Text = "Listening..." }; _toolboxConnected = new Label { VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.Center, HorizontalTextAlignment = TextAlignment.Center, Text = "A toolbox is connected.\nYou can close the connection or continue to the design surface.", FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)) }; _continueBtn.Clicked += async(s, e) => await ShowDesignSurfaceAsync(); _disconnectBtn.Clicked += (s, e) => OnDisconnect(); RegisterServerEventHandlers(); Content = _mainLayout; if (Device.OS == TargetPlatform.Android) { BackgroundImage = "background.png"; } else { BackgroundColor = Color.White; _acceptingConnections.TextColor = Color.Black; _status.TextColor = Color.Black; _toolboxConnected.TextColor = Color.Black; } StartAcceptingConnections(); }
private void GetDependencies() { _server = Kernel.Get <DesignServer>(); _workflow = Kernel.Get <DesignWorkflow>(); }