예제 #1
0
        public void endAnimation()
        {
            dispatcherTimer.Stop();
            referenceElementsTimer.Stop();
            TransformsTimer.Stop();
            referencesTimer.Stop();
            referencesCounter = 0;
            status            = 0;
            referencesSteps   = 0;
            xPathArrayCounter = 0;
            transformSteps    = 0;
            transformsCounter = 0;
            if (!soap.CheckSecurityHeader())
            {
                soap.CreateSecurityHeaderAndSoapHeader();
            }
            if (!signed)
            {
                soap.SignElementsManual(this.elementsToSign);
            }

            presentation.animationRunning = false;
            animationRunning = false;
            soap.CreateInfoMessage("Animation end");
            soap.ShowSecuredSoap();
        }
예제 #2
0
        void TransformsTimer_Tick(object sender, EventArgs e)
        {
            switch (transformSteps)
            {
            case 0:
                if (transformsCounter > 1)
                {
                    presentation.AddTextToInformationBox("Create a XPath Transform Element");
                    //TreeViewItem test = addChildElement("ds:Transforms",actReferenceElement.FirstChild.ChildNodes[0],true);
                    addChildElement(actTransformsElementTVI, actReferenceElement.FirstChild.ChildNodes[0], true);
                    xPathHelper    = null;
                    transformSteps = 1;
                }
                else
                {
                    transformSteps = 4;
                }
                break;

            case 1:
                presentation.AddTextToInformationBox("Create XPath String");
                xPath          = "/" + actElementToReference.Name;
                xPathHelper    = actElementToReference;
                transformSteps = 2;
                presentation.AddTextToInformationBox("Actual XPath: " + xPath);
                break;

            case 2:

                xPathHelper = (XmlElement)xPathHelper.ParentNode;
                xPath       = "/" + xPathHelper.Name + xPath;

                animateElement(xPathHelper.Name);
                presentation.AddTextToInformationBox("Actual XPath: " + xPath);
                if (xPathHelper.Name.Equals("s:Envelope"))
                {
                    transformSteps = 3;
                }
                break;

            case 3:
                presentation.AddTextToInformationBox("Add XPath Value to Transform Element");
                createValue((TreeViewItem)actTransformsElementTVI.Items[0], xPath);
                transformSteps = 4;
                break;

            case 4:
                //Create C14N
                presentation.AddTextToInformationBox("Create Canonicalization Transform");
                if (soap.GetXPathTransForm())
                {
                    addChildElement(actTransformsElementTVI, actReferenceElement.FirstChild.ChildNodes[1], false);
                }
                else
                {
                    addChildElement(actTransformsElementTVI, actReferenceElement.FirstChild.ChildNodes[0], false);
                }
                TransformsTimer.Stop();
                referenceElementsTimer.Start();
                actTimer       = referencesTimer;
                transformSteps = 0;
                break;
            }
        }