示例#1
0
 public void endAnimation()
 {
     dispatcherTimer.Stop();
     soap.ShowSecuredSoap();
     presentation.animationRunning = false;
     soap.CreateInfoMessage("Animation end");
 }
示例#2
0
 public void startstopAnimation()
 {
     if (animationRunning)
     {
         actTimer.Stop();
         soap.CreateInfoMessage("Stop signature animation");
         animationRunning = false;
     }
     else
     {
         actTimer.Start();
         animationRunning = true;
         soap.CreateInfoMessage("Restart signature animation");
     }
 }
示例#3
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");
                    }
                }
            }
        }