private void BuildUI() { _loadSettingsButton = new TextButton(); _loadSettingsButton.Text = "Load Settings"; _loadSettingsButton.Id = "_loadSettingsButton"; _saveSettingsButton = new TextButton(); _saveSettingsButton.Text = "Save Settings"; _saveSettingsButton.GridColumn = 1; _saveSettingsButton.Id = "_saveSettingsButton"; _editSettingsButton = new TextButton(); _editSettingsButton.Text = "Edit Settings"; _editSettingsButton.GridRow = 1; _editSettingsButton.Id = "_editSettingsButton"; _saveExperimentLabel = new Label(); _saveExperimentLabel.Text = "Statistics Output:"; _saveExperimentLabel.GridRow = 2; _saveExperimentLabel.Id = "_saveExperimentLabel"; _settingsDestinationComboBox = new ComboBox(); _settingsDestinationComboBox.GridColumn = 1; _settingsDestinationComboBox.GridRow = 2; _settingsDestinationComboBox.Id = "_settingsDestinationComboBox"; _browseFileButton = new TextButton(); _browseFileButton.Text = "Browse File"; _browseFileButton.GridRow = 3; _browseFileButton.Id = "_browseFileButton"; _currentFilePathLabel = new Label(); _currentFilePathLabel.GridColumn = 1; _currentFilePathLabel.GridRow = 3; _currentFilePathLabel.Id = "_currentFilePathLabel"; _beginButton = new TextButton(); _beginButton.Text = "Start Experiment"; _beginButton.GridColumn = 1; _beginButton.GridRow = 4; _beginButton.Id = "_beginButton"; _backButton = new TextButton(); _backButton.Text = "Back"; _backButton.GridRow = 4; _backButton.Id = "_backButton"; var grid1 = new Grid(); grid1.ShowGridLines = true; grid1.ColumnSpacing = 8; grid1.RowSpacing = 8; grid1.ColumnsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); grid1.ColumnsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); grid1.RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); grid1.RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); grid1.HorizontalAlignment = Myra.Graphics2D.UI.HorizontalAlignment.Center; grid1.VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center; grid1.Widgets.Add(_loadSettingsButton); grid1.Widgets.Add(_saveSettingsButton); grid1.Widgets.Add(_editSettingsButton); grid1.Widgets.Add(_saveExperimentLabel); grid1.Widgets.Add(_settingsDestinationComboBox); grid1.Widgets.Add(_browseFileButton); grid1.Widgets.Add(_currentFilePathLabel); grid1.Widgets.Add(_beginButton); grid1.Widgets.Add(_backButton); ColumnSpacing = 8; RowSpacing = 8; HorizontalAlignment = Myra.Graphics2D.UI.HorizontalAlignment.Center; VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center; Widgets.Add(grid1); }
private void BuildUI() { var label1 = new Label(); label1.Text = "Inputs"; var label2 = new Label(); label2.Text = "Outputs"; label2.GridColumn = 1; _inputList = new ListBox(); _inputList.Id = "_inputList"; var scrollViewer1 = new ScrollViewer(); scrollViewer1.MaxHeight = 150; scrollViewer1.GridRow = 1; scrollViewer1.Content = _inputList; _outputList = new ListBox(); _outputList.Id = "_outputList"; var scrollViewer2 = new ScrollViewer(); scrollViewer2.MaxHeight = 150; scrollViewer2.GridColumn = 1; scrollViewer2.GridRow = 1; scrollViewer2.Content = _outputList; _removeSelectedInput = new TextButton(); _removeSelectedInput.Text = "Remove Selected"; _removeSelectedInput.GridRow = 2; _removeSelectedInput.Id = "_removeSelectedInput"; _removeSelectedOutput = new TextButton(); _removeSelectedOutput.Text = "Remove Selected"; _removeSelectedOutput.GridColumn = 1; _removeSelectedOutput.GridRow = 2; _removeSelectedOutput.Id = "_removeSelectedOutput"; _addInputButton = new TextButton(); _addInputButton.Text = "Add Input"; _addInputButton.GridRow = 3; _addInputButton.Id = "_addInputButton"; _addOutputButton = new TextButton(); _addOutputButton.Text = "Add Output"; _addOutputButton.GridColumn = 1; _addOutputButton.GridRow = 3; _addOutputButton.Id = "_addOutputButton"; ShowGridLines = true; ColumnSpacing = 8; RowSpacing = 8; ColumnsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); ColumnsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); Widgets.Add(label1); Widgets.Add(label2); Widgets.Add(scrollViewer1); Widgets.Add(scrollViewer2); Widgets.Add(_removeSelectedInput); Widgets.Add(_removeSelectedOutput); Widgets.Add(_addInputButton); Widgets.Add(_addOutputButton); }
private void BuildUI() { _ipLabel = new Label(); _ipLabel.Text = "IP Address:"; _ipLabel.Id = "_ipLabel"; _ipAddressInput = new TextBox(); _ipAddressInput.Text = "localhost"; _ipAddressInput.MinWidth = 150; _ipAddressInput.GridColumn = 1; _ipAddressInput.Id = "_ipAddressInput"; _portLabel = new Label(); _portLabel.Text = "Port:"; _portLabel.GridRow = 1; _portLabel.Id = "_portLabel"; _portInput = new TextBox(); _portInput.Text = "27017"; _portInput.MinWidth = 150; _portInput.GridColumn = 1; _portInput.GridRow = 1; _portInput.Id = "_portInput"; _usernameLabel = new Label(); _usernameLabel.Text = "Username:"******"_usernameLabel"; _usernameInput = new TextBox(); _usernameInput.Text = "username"; _usernameInput.MinWidth = 150; _usernameInput.GridColumn = 1; _usernameInput.GridRow = 2; _usernameInput.Id = "_usernameInput"; _passwordLabel = new Label(); _passwordLabel.Text = "Password:"******"_passwordLabel"; _passwordInput = new TextBox(); _passwordInput.PasswordField = true; _passwordInput.MinWidth = 150; _passwordInput.GridColumn = 1; _passwordInput.GridRow = 3; _passwordInput.Id = "_passwordInput"; _connectButton = new TextButton(); _connectButton.Text = "Connect"; _connectButton.GridRow = 4; _connectButton.Id = "_connectButton"; _statusLabel = new Label(); _statusLabel.Text = "Status:"; _statusLabel.MinWidth = 150; _statusLabel.GridColumn = 1; _statusLabel.GridRow = 4; _statusLabel.Id = "_statusLabel"; _backButton = new TextButton(); _backButton.Text = "Back"; _backButton.GridRow = 5; _backButton.Id = "_backButton"; ShowGridLines = true; ColumnSpacing = 8; RowSpacing = 8; ColumnsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); ColumnsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); HorizontalAlignment = Myra.Graphics2D.UI.HorizontalAlignment.Center; VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center; Widgets.Add(_ipLabel); Widgets.Add(_ipAddressInput); Widgets.Add(_portLabel); Widgets.Add(_portInput); Widgets.Add(_usernameLabel); Widgets.Add(_usernameInput); Widgets.Add(_passwordLabel); Widgets.Add(_passwordInput); Widgets.Add(_connectButton); Widgets.Add(_statusLabel); Widgets.Add(_backButton); }
private void BuildUI() { _tagTextBox = new TextBox(); _tagTextBox.HorizontalAlignment = Myra.Graphics2D.UI.HorizontalAlignment.Center; _tagTextBox.MinWidth = 150; _tagTextBox.Id = "_tagTextBox"; _setTagButton = new TextButton(); _setTagButton.Text = "Set Tag"; _setTagButton.GridColumn = 1; _setTagButton.Id = "_setTagButton"; _addComponentButton = new TextButton(); _addComponentButton.Text = "Add Component..."; _addComponentButton.GridRow = 1; _addComponentButton.Id = "_addComponentButton"; _removeComponentButton = new TextButton(); _removeComponentButton.Text = "Remove Component..."; _removeComponentButton.GridColumn = 1; _removeComponentButton.GridRow = 1; _removeComponentButton.Id = "_removeComponentButton"; _deleteEntityButton = new TextButton(); _deleteEntityButton.Text = "Delete Entity"; _deleteEntityButton.GridRow = 2; _deleteEntityButton.Id = "_deleteEntityButton"; _addChildButton = new TextButton(); _addChildButton.Text = "Add Child"; _addChildButton.GridColumn = 1; _addChildButton.GridRow = 2; _addChildButton.Id = "_addChildButton"; ColumnSpacing = 8; RowSpacing = 8; ColumnsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); ColumnsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); RowsProportions.Add(new Proportion { Type = Myra.Graphics2D.UI.ProportionType.Auto, }); BorderThickness = new Thickness(8); Widgets.Add(_tagTextBox); Widgets.Add(_setTagButton); Widgets.Add(_addComponentButton); Widgets.Add(_removeComponentButton); Widgets.Add(_deleteEntityButton); Widgets.Add(_addChildButton); }