예제 #1
0
        public GeneralRequestVisualizer()
        {
            title = NameValuePanel.Create("Title", new TextBox());

            var url    = NameValuePanel.Create("URL", new TextBox());
            var method = new ComboBox
            {
                VerticalAlignment = VerticalAlignment.Bottom,
                Margin            = new Thickness(0, 0, 5, 0),
                SelectedIndex     = 0
            };

            var urlAndMethod = new Grid();

            urlAndMethod.AddColumn(1, GridUnitType.Star);
            urlAndMethod.AddColumn(100, GridUnitType.Pixel);
            urlAndMethod.AddRow(GridLength.Auto);
            urlAndMethod.Add(url, 0, 0);
            urlAndMethod.Add(method, 0, 1);

            var apiGeneralStackPanel = new StackPanel
            {
                Margin = new Thickness(0, 0, 0, 10)
            };

            apiGeneralStackPanel.Children.Add(title);
            apiGeneralStackPanel.Children.Add(urlAndMethod);
            Children.Add(apiGeneralStackPanel);

            this.Bind(x => x.Model.Title).Mate(title.Value);
            this.Bind(x => x.Model.Url).Mate(url.Value);
            this.Bind(x => x.Model.Method).Mate(method, x => x.MainWindow.Methods);
        }
예제 #2
0
        public ApiCollectionPanel()
        {
            var namePanel = NameValuePanel.Create("Title", new TextBox());

            this.AddRow(GridLength.Auto);
            this.Add(namePanel, 0, 0);

            this.Bind(x => x.Model.Title).Mate(namePanel.Value);
        }
예제 #3
0
        public SummaryResponseVisualizer()
        {
            var elapsedPanel = NameValuePanel.Create("Elapsed", new Label());

            Children.Add(elapsedPanel);

            var contentLengthPanel = NameValuePanel.Create("Content Length", new Label());

            Children.Add(contentLengthPanel);

            this.Bind(x => x.ContentLength).To(x => contentLengthPanel.Value.Content = x);
            this.Bind(x => x.Elapsed).To(x => elapsedPanel.Value.Content             = x);
        }