public BusinessFlowInfoPage(BusinessFlow businessFlow) { InitializeComponent(); mBusinessFlow = businessFlow; NameTextBox.BindControl(mBusinessFlow, nameof(BusinessFlow.Name)); DescriptionTextBox.BindControl(mBusinessFlow, nameof(BusinessFlow.Description)); TargetApplicationsListBox.ItemsSource = mBusinessFlow.TargetApplications; TargetApplicationsListBox.DisplayMemberPath = nameof(TargetApplication.AppName); }
public AddInteractionEditPage(GingerAction act) { InitializeComponent(); mAct = act; ActionParam AP1 = mAct.GetOrCreateParam("ProviderState"); ProviderStateTextBox.BindControl(AP1); ActionParam AP2 = mAct.GetOrCreateParam("Description"); DescriptionTextBox.BindControl(AP2); List <ComboBoxListItem> HTTPMethodList = new List <ComboBoxListItem>(); HTTPMethodList.Add(new ComboBoxListItem() { Text = "Get", Value = "Get" }); HTTPMethodList.Add(new ComboBoxListItem() { Text = "Head", Value = "Head" }); HTTPMethodList.Add(new ComboBoxListItem() { Text = "Not Set", Value = "NotSet" }); HTTPMethodList.Add(new ComboBoxListItem() { Text = "Patch", Value = "Patch" }); HTTPMethodList.Add(new ComboBoxListItem() { Text = "Post", Value = "Post" }); HTTPMethodList.Add(new ComboBoxListItem() { Text = "Put", Value = "Put" }); ActionParam AP3 = mAct.GetOrCreateParam("RequestTypeComboBox"); RequestMethodComboBox.BindControl(AP3, HTTPMethodList); ActionParam AP5 = mAct.GetOrCreateParam("Path"); PathTextBox.BindControl(AP5); List <ComboBoxListItem> StatusList = new List <ComboBoxListItem>(); StatusList.Add(new ComboBoxListItem() { Text = "OK", Value = "200" }); StatusList.Add(new ComboBoxListItem() { Text = "Created", Value = "201" }); StatusList.Add(new ComboBoxListItem() { Text = "No Content", Value = "204" }); StatusList.Add(new ComboBoxListItem() { Text = "Not Modified", Value = "304" }); StatusList.Add(new ComboBoxListItem() { Text = "Bad Request", Value = "400" }); StatusList.Add(new ComboBoxListItem() { Text = "Unauthorized", Value = "401" }); StatusList.Add(new ComboBoxListItem() { Text = "Forbidden", Value = "403" }); StatusList.Add(new ComboBoxListItem() { Text = "Not Found", Value = "404" }); StatusList.Add(new ComboBoxListItem() { Text = "Conflict", Value = "409" }); StatusList.Add(new ComboBoxListItem() { Text = "Internal Server Error", Value = "500" }); StatusList.Add(new ComboBoxListItem() { Text = "Service Unavailable", Value = "503" }); //TODO: after the above most common enable the user to see all available http code: http://www.restapitutorial.com/httpstatuscodes.html //TODO: fill the rest ActionParam AP4 = mAct.GetOrCreateParam("Status"); ResponseStatusComboBox.BindControl(AP4, StatusList); RequestHeadersGrid.ItemsSource = RequestHeaders; RepsonseHeadersGrid.ItemsSource = ResponseHeaders; }