Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
        private void ImageMouseDownEventHandler(object sender, MouseButtonEventArgs e)
        {
            if (!animationRunning)
            {
                if (this._soap.GetSignatureAlgorithm() == null)
                {
                    this._soap.CreateErrorMessage("You have to select a signature algorithm before you can sign parts of the message");
                }
                else
                {
                    this._namespacesTable.Clear();
                    Image        signIcon = (Image)sender;
                    string[]     test     = signIcon.Name.Split(new char[] { '_' });
                    string       name     = test[0] + ":" + test[1];
                    XmlElement[] array    = new XmlElement[1];
                    array[0] = (XmlElement)this._soap.SecuredSoap.GetElementsByTagName(name)[0];
                    if (!this._soap.GetXPathTransForm())
                    {
                        this._soap.AddIdToElement(name);
                    }
                    if (!this._soap.GetShowSteps())
                    {
                        if (!this._soap.CheckSecurityHeader())
                        {
                            _soap.CreateSecurityHeaderAndSoapHeader();
                        }
                        this._soap.SignElementsManual(array);
                        this._soap.ShowSecuredSoap();
                    }
                    else
                    {
                        animationRunning = true;

                        _signatureAnimator = new SignatureAnimator(ref this.treeView, ref this._soap);
                        _signatureAnimator.startAnimation(array);
                        _soap.CreateInfoMessage("Signature animation started");
                    }
                }
            }
        }