public HeadersRequestVisualizer()
        {
            var apiHeadersGrid = new RxDataGrid<ApiHeaderModel>
            {
                AutoGenerateColumns = false,
                HeadersVisibility = DataGridHeadersVisibility.Column,
                CanUserAddRows = true,
                SelectionUnit = DataGridSelectionUnit.Cell
            };
            apiHeadersGrid.AddTextColumn("Name", x => x.Name).Width = new DataGridLength(1, DataGridLengthUnitType.Star);
            apiHeadersGrid.AddTextColumn("Value", x => x.Value).Width = new DataGridLength(2, DataGridLengthUnitType.Star);
            Children.Add(apiHeadersGrid);

            this.Bind(x => x.Headers).To(x => apiHeadersGrid.ItemsSource = x?.ToObservableCollection());
        }
Esempio n. 2
0
        public HeadersRequestVisualizer()
        {
            var apiHeadersGrid = new RxDataGrid <ApiHeaderModel>
            {
                AutoGenerateColumns = false,
                HeadersVisibility   = DataGridHeadersVisibility.Column,
                CanUserAddRows      = true,
                SelectionUnit       = DataGridSelectionUnit.Cell
            };

            apiHeadersGrid.AddTextColumn("Name", x => x.Name).Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            apiHeadersGrid.AddTextColumn("Value", x => x.Value).Width = new DataGridLength(2, DataGridLengthUnitType.Star);
            Children.Add(apiHeadersGrid);

            this.Bind(x => x.Headers).To(x => apiHeadersGrid.ItemsSource = x?.ToObservableCollection());
        }
        public HeadersResponseVisualizer()
        {
            var headersGrid = new RxDataGrid <ApiHeaderModel>()
            {
                AutoGenerateColumns = false,
                IsReadOnly          = true,
                HeadersVisibility   = DataGridHeadersVisibility.None,
                SelectionUnit       = DataGridSelectionUnit.Cell
            };

            headersGrid.AddTextColumn("Name", x => x.Name).Width   = new DataGridLength(1, DataGridLengthUnitType.Star);
            headersGrid.AddTextColumn("Value", x => x.Value).Width = new DataGridLength(2, DataGridLengthUnitType.Star);

            this.Add(headersGrid);

            this.Bind(x => x.Headers).To(x => headersGrid.ItemsSource = x);
        }
Esempio n. 4
0
        public InputsRequestVisualizer()
        {
            var apiInputsGrid = new RxDataGrid <ApiInputModel>
            {
                AutoGenerateColumns = false,
                HeadersVisibility   = DataGridHeadersVisibility.Column,
                CanUserAddRows      = false,
                CanUserDeleteRows   = false,
                SelectionUnit       = DataGridSelectionUnit.Cell
            };

            apiInputsGrid.AddTextColumn("Name", x => x.Name, new DataGridLength(1, DataGridLengthUnitType.Star), true);
            apiInputsGrid.AddTextColumn("Default Value", x => x.DefaultValue, new DataGridLength(2, DataGridLengthUnitType.Star));
            apiInputsGrid.AddTextColumn("Value", x => x.Value, new DataGridLength(2, DataGridLengthUnitType.Star));
            apiInputsGrid.AddTextColumn("Type", x => x.InputType, new DataGridLength(1, DataGridLengthUnitType.Star), true);
            Children.Add(apiInputsGrid);

            this.Bind(x => x.Inputs).To(x => apiInputsGrid.ItemsSource = x?.ToObservableCollection());
        }
Esempio n. 5
0
        public OutputsRequestVisualizer()
        {
            var apiOutputsGrid = new RxDataGrid <ApiOutputModel>
            {
                AutoGenerateColumns = false,
                HeadersVisibility   = DataGridHeadersVisibility.Column | DataGridHeadersVisibility.Row,
                CanUserAddRows      = true,
                CanUserDeleteRows   = true,
                SelectionUnit       = DataGridSelectionUnit.CellOrRowHeader
            };

            apiOutputsGrid.AddTextColumn("Name", x => x.Name, new DataGridLength(1, DataGridLengthUnitType.Star));
            apiOutputsGrid.AddTextColumn("Expression", x => x.Expression, new DataGridLength(2, DataGridLengthUnitType.Star));
            apiOutputsGrid.AddTextColumn("Value", x => x.ValueAsString, new DataGridLength(2, DataGridLengthUnitType.Star), true);
            var outputTypeColumn = apiOutputsGrid.AddComboBoxColumn("Type", x => x.Type, new DataGridLength(1, DataGridLengthUnitType.Star));

            Children.Add(apiOutputsGrid);

            this.Bind(x => x.Outputs).To(x => apiOutputsGrid.ItemsSource = x?.ToObservableCollection());
            this.Bind(x => x.MainWindow.OutputTypes).To(outputTypeColumn);
        }