Exemple #1
0
 public void Bind()
 {
     URLUCValueExpression.Init(Context.GetAsContext(mAct.Context), mAct.URL, nameof(ActInputValue.Value));
     SoapActionUCValueExpression.Init(Context.GetAsContext(mAct.Context), mAct.SOAPAction, nameof(ActInputValue.Value));
     XMLFileNameUCValueExpression.Init(Context.GetAsContext(mAct.Context), mAct.XMLfileName, nameof(ActInputValue.Value));
     URLDomainUCValueExpression.Init(Context.GetAsContext(mAct.Context), mAct.URLDomain, nameof(ActInputValue.Value));
     URLPasswordUCValueExpression.Init(Context.GetAsContext(mAct.Context), mAct.URLPass, nameof(ActInputValue.Value));
     URLUserUCValueExpression.Init(Context.GetAsContext(mAct.Context), mAct.URLUser, nameof(ActInputValue.Value));
     SetDynamicGrid();
     DynamicXMLElementsGrid.btnAdd.AddHandler(Button.ClickEvent, new RoutedEventHandler(AddDynamicXMLelement));
 }
Exemple #2
0
        private void InitializeUIByActionType()
        {
            switch (mWebApiType)
            {
            case ApplicationAPIUtils.eWebApiType.REST:
                //binding
                //setting visibility :
                PanelSoap.Visibility           = Visibility.Collapsed;
                UseWSSecurityHeader.Visibility = Visibility.Collapsed;
                //Cookie Mode
                CookieMode.Init(mAct.GetOrCreateInputParam(ActWebAPIRest.Fields.CookieMode, ApplicationAPIUtils.eCookieMode.New.ToString()), typeof(ApplicationAPIUtils.eCookieMode), false, null);

                //Request Type
                RequestTypeComboBox.Init(mAct.GetOrCreateInputParam(ActWebAPIRest.Fields.RequestType, ApplicationAPIUtils.eRequestType.GET.ToString()), typeof(ApplicationAPIUtils.eRequestType), false, null);

                //HttpVersion content type
                HttpVersioncombobox.Init(mAct.GetOrCreateInputParam(ActWebAPIRest.Fields.ReqHttpVersion, ApplicationAPIUtils.eHttpVersion.HTTPV11.ToString()), typeof(ApplicationAPIUtils.eHttpVersion), false, null);

                //Request content type
                ContentTypeComboBox.Init(mAct.GetOrCreateInputParam(ActWebAPIRest.Fields.ContentType, ApplicationAPIUtils.eContentType.JSon.ToString()), typeof(ApplicationAPIUtils.eContentType), false, ContentTypeChange);

                //Response Content Type
                ResponseTypeComboBox.Init(mAct.GetOrCreateInputParam(ActWebAPIRest.Fields.ResponseContentType, ApplicationAPIUtils.eContentType.JSon.ToString()), typeof(ApplicationAPIUtils.eContentType), false, ResponseTypeComboBox_SelectionChanged);

                //Request Template file:
                TemplateFileNameFileBrowser.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActWebAPIBase.Fields.TemplateFileNameFileBrowser), true, true, UCValueExpression.eBrowserType.File, "txt; *.xml; *.json;", new RoutedEventHandler(BrowseTemplateFileButton_Click));
                break;

            case ApplicationAPIUtils.eWebApiType.SOAP:
                //binding visibility
                RequestContent.Visibility      = Visibility.Collapsed;
                RestHeader.Visibility          = Visibility.Collapsed;
                UseWSSecurityHeader.Visibility = Visibility.Visible;
                //binding
                //SOAP Action
                SoapActionUCValueExpression.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActWebAPISoap.Fields.SOAPAction), true, false, UCValueExpression.eBrowserType.Folder);

                //Request Template file:
                TemplateFileNameFileBrowser.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActWebAPIBase.Fields.TemplateFileNameFileBrowser), true, true, UCValueExpression.eBrowserType.File, "txt; *.xml;", new RoutedEventHandler(BrowseTemplateFileButton_Click));
                break;
            }
        }