Ignore:
Timestamp:
May 25, 2010, 9:05:32 PM (12 years ago)
Author:
Matthäus Wander
Message:

Soap + WebService:

  • migrated to VS2010
  • replaced Control properties with regular Data properties
Location:
trunk/CrypPlugins/Soap
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Soap/Resource1.Designer.cs

    r641 r1489  
    11//------------------------------------------------------------------------------
    22// <auto-generated>
    3 //     Dieser Code wurde von einem Tool generiert.
    4 //     Laufzeitversion:2.0.50727.3082
     3//     This code was generated by a tool.
     4//     Runtime Version:4.0.30319.1
    55//
    6 //     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
    7 //     der Code erneut generiert wird.
     6//     Changes to this file may cause incorrect behavior and will be lost if
     7//     the code is regenerated.
    88// </auto-generated>
    99//------------------------------------------------------------------------------
     
    1414   
    1515    /// <summary>
    16     ///   Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
     16    ///   A strongly-typed resource class, for looking up localized strings, etc.
    1717    /// </summary>
    18     // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
    19     // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
    20     // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
    21     // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
    22     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
     18    // This class was auto-generated by the StronglyTypedResourceBuilder
     19    // class via a tool like ResGen or Visual Studio.
     20    // To add or remove a member, edit your .ResX file then rerun ResGen
     21    // with the /str option, or rebuild your VS project.
     22    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    2323    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    2424    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     
    3434       
    3535        /// <summary>
    36         ///   Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
     36        ///   Returns the cached ResourceManager instance used by this class.
    3737        /// </summary>
    3838        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
     
    4848       
    4949        /// <summary>
    50         ///   Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
    51         ///   Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
     50        ///   Overrides the current thread's CurrentUICulture property for all
     51        ///   resource lookups using this strongly typed resource class.
    5252        /// </summary>
    5353        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
  • trunk/CrypPlugins/Soap/Soap.cs

    r1219 r1489  
    122122
    123123
    124      //   [PropertyInfo(Direction.ControlSlave, "WSDL Input", "WSDL to create the soap message",null, DisplayLevel.Beginner)]
    125         //public XmlDocument wsdl
    126         //{
    127         //    set
    128         //    {
    129         //         presentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    130         //            {
    131         //        string s = xmlToString(value);
    132         //        loadWSDL(s);
    133         //        wsdlLoaded = true;
    134                        
    135         //          OnPropertyChanged("wsdl");
    136         //          createInfoMessage("Received WSDL File");
    137         //          createInfoMessage("Created SOAP Message");
    138         //            }, null);
    139         //    }
    140         //    get
    141         //    {
    142         //        return null;
    143         //    }
    144         //}
    145         private ControlProxy control;
    146 [PropertyInfo(Direction.ControlSlave, "WSDL Input", "WSDL to create the soap message",null, DisplayLevel.Beginner)]
    147         public IControlWsdl Control
    148 {
    149  get
    150  {
    151  if (control == null)
    152     control = new ControlProxy (this);
    153   return control;
    154  }
    155 }
    156 
    157 private ControlPublicKeyProxy controlPublicKeyProxy;
    158         [PropertyInfo(Direction.ControlSlave, "Public-Key input", "Encryption Key",null, DisplayLevel.Beginner)]
    159         public IControlPublicKey publicKey
    160         {
     124        [PropertyInfo(Direction.InputData, "WSDL Input", "WSDL to create the soap message", null, DisplayLevel.Beginner)]
     125        public XmlDocument Wsdl
     126        {
     127            set
     128            {
     129                presentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
     130                   {
     131                       string s = xmlToString(value);
     132                       loadWSDL(s);
     133                       wsdlLoaded = true;
     134
     135                       OnPropertyChanged("wsdl");
     136                       createInfoMessage("Received WSDL File");
     137                       createInfoMessage("Created SOAP Message");
     138                   }, null);
     139            }
    161140            get
    162141            {
    163                 {
    164                     if (controlPublicKeyProxy == null)
    165                         controlPublicKeyProxy = new ControlPublicKeyProxy(this);
    166                     return controlPublicKeyProxy;
    167                 }
    168             }
    169         }
    170         private XmlDocument outputString;
     142                return null;
     143            }
     144        }
     145
     146        [PropertyInfo(Direction.InputData, "Public-Key input", "Encryption Key",null, DisplayLevel.Beginner)]
     147        public string PublicKey
     148        {
     149            get
     150            {
     151                return this.wsPublicKey;
     152            }
     153            set
     154            {
     155                Presentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
     156                {
     157                    {
     158                        WsPublicKey = value;
     159
     160                        WsRSACryptoProv.FromXmlString(wsPublicKey);
     161                        gotKey = true;
     162                        mySettings.gotkey = true;
     163                        mySettings.wsRSAcryptoProv = WsRSACryptoProv.ToXmlString(false);
     164                        OnPropertyChanged("publicKey");
     165                        createInfoMessage("Public Key Received");
     166                    }
     167                }, null);
     168            }
     169        }
     170
    171171       [PropertyInfo(Direction.OutputData, "SOAP output", "Send a SOAP Message", "",true, true, DisplayLevel.Beginner, QuickWatchFormat.Text, "XmlConverter")]
    172172        public XmlDocument OutputString                                                                                                 
     
    781781                case "wsdlloaded":
    782782                    this.wsdlLoaded = s.wsdlloaded ;
     783                    break;
     784                case "sendSoap":
     785                    if (!send)
     786                    {
     787                        OnPropertyChanged("OutputString");
     788                        send = true;
     789                    }
    783790                    break;
    784791                case "resetSoap":
     
    15501557        public void Execute()
    15511558        {
    1552             if (!send)
    1553             {
    1554                 OnPropertyChanged("OutputString");
    1555                 send = true;
    1556             }
    15571559        }
    15581560
     
    16161618        #endregion
    16171619    }
    1618     public class ControlProxy : IControlWsdl
    1619     {
    1620         private Soap plugin;
    1621 
    1622         // Konstruktor
    1623         public ControlProxy(Soap plugin)
    1624         {
    1625             this.plugin = plugin;
    1626         }
    1627         #region IControlWsdl Member
    1628 
    1629         public XmlDocument Wsdl
    1630         {
    1631             get
    1632             {
    1633                 return null;
    1634             }
    1635             set
    1636             {
    1637 
    1638             }
    1639         }
    1640 
    1641         public void setWsdl(XmlDocument wsdlDocument)
    1642         {
    1643            plugin.Presentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    1644             {
    1645                 string s = plugin.xmlToString(wsdlDocument);
    1646                 plugin.loadWSDL(s);
    1647                 plugin.wsdlLoaded = true;
    1648 
    1649                 plugin.OnPropertyChanged("wsdl");
    1650                plugin.createInfoMessage("Received WSDL File");
    1651                 plugin.createInfoMessage("Created SOAP Message");
    1652             }, null);
    1653         }
    1654 
    1655         #endregion
    1656 
    1657         #region IControl Member
    1658 
    1659         public event IControlStatusChangedEventHandler OnStatusChanged;
    1660 
    1661         #endregion
    1662     }
    1663     public class ControlPublicKeyProxy : IControlPublicKey
    1664     {
    1665         private Soap plugin;
    1666         public ControlPublicKeyProxy(Soap plugin)
    1667         {
    1668             this.plugin = plugin;
    1669         }
    1670 
    1671         #region IControlPublicKey Member
    1672      
    1673         public string publicKey
    1674         {
    1675             get
    1676             {
    1677                 return null;
    1678             }
    1679             set
    1680             {
    1681          
    1682             }
    1683         }
    1684 
    1685         public void setPublicKey(string publicKey)
    1686         {
    1687             try
    1688             {
    1689                 if (publicKey == null)
    1690                     return;
    1691                 plugin.Presentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    1692                 {
    1693 
    1694 
    1695                     {
    1696                         plugin.WsPublicKey = publicKey;
    1697 
    1698                         plugin.WsRSACryptoProv.FromXmlString(plugin.WsPublicKey);
    1699                         plugin.gotKey = true;
    1700                         plugin.mySettings.gotkey = true;
    1701                         plugin.mySettings.wsRSAcryptoProv = plugin.WsRSACryptoProv.ToXmlString(false);
    1702                         plugin.OnPropertyChanged("publicKey");
    1703                         plugin.createInfoMessage("Public Key Received");
    1704                     }
    1705                 }, null);
    1706             }
    1707             catch (Exception exc)
    1708             {
    1709             }
    1710         }
    1711 
    1712 
    1713         #endregion
    1714 
    1715         #region IControl Member
    1716 
    1717         public event IControlStatusChangedEventHandler OnStatusChanged;
    1718 
    1719         #endregion
    1720     }
    17211620
    17221621}
  • trunk/CrypPlugins/Soap/Soap.csproj

    r1487 r1489  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     2<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <PropertyGroup>
    44    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     
    1111    <RootNamespace>Soap</RootNamespace>
    1212    <AssemblyName>Soap</AssemblyName>
    13     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     13    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    1414    <FileAlignment>512</FileAlignment>
    15     <SignAssembly>true</SignAssembly>
    16     <AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
     15    <SignAssembly>false</SignAssembly>
     16    <AssemblyOriginatorKeyFile>
     17    </AssemblyOriginatorKeyFile>
     18    <FileUpgradeFlags>
     19    </FileUpgradeFlags>
     20    <OldToolsVersion>3.5</OldToolsVersion>
     21    <UpgradeBackupLocation />
     22    <PublishUrl>publish\</PublishUrl>
     23    <Install>true</Install>
     24    <InstallFrom>Disk</InstallFrom>
     25    <UpdateEnabled>false</UpdateEnabled>
     26    <UpdateMode>Foreground</UpdateMode>
     27    <UpdateInterval>7</UpdateInterval>
     28    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
     29    <UpdatePeriodically>false</UpdatePeriodically>
     30    <UpdateRequired>false</UpdateRequired>
     31    <MapFileExtensions>true</MapFileExtensions>
     32    <ApplicationRevision>0</ApplicationRevision>
     33    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     34    <IsWebBootstrapper>false</IsWebBootstrapper>
     35    <UseApplicationTrust>false</UseApplicationTrust>
     36    <BootstrapperEnabled>true</BootstrapperEnabled>
     37    <TargetFrameworkProfile />
    1738  </PropertyGroup>
    1839  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
     
    2445    <Optimize>true</Optimize>
    2546    <DefineConstants>TRACE</DefineConstants>
     47    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    2648  </PropertyGroup>
    2749  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
     
    3355    <Optimize>true</Optimize>
    3456    <DefineConstants>TRACE</DefineConstants>
     57    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    3558  </PropertyGroup>
    3659  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
     
    4366    <Optimize>false</Optimize>
    4467    <DefineConstants>DEBUG;TRACE</DefineConstants>
     68    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    4569  </PropertyGroup>
    4670  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     
    5377    <Optimize>false</Optimize>
    5478    <DefineConstants>DEBUG;TRACE</DefineConstants>
     79    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    5580  </PropertyGroup>
    5681  <ItemGroup Condition=" '$(Platform)' == 'x86' " />
     
    7196    <Reference Include="System.Security" />
    7297    <Reference Include="System.Web.Services" />
     98    <Reference Include="System.Xaml" />
    7399    <Reference Include="System.Xml.Linq">
    74100      <RequiredTargetFramework>3.5</RequiredTargetFramework>
     
    105131      <SubType>Designer</SubType>
    106132      <Generator>MSBuild:Compile</Generator>
     133      <Generator>MSBuild:Compile</Generator>
     134      <SubType>Designer</SubType>
    107135    </Page>
    108136  </ItemGroup>
     
    121149  <ItemGroup>
    122150    <Content Include="Key.bmp" />
    123     <None Include="key.snk" />
    124151    <None Include="Resources\EditIcon.PNG" />
    125152    <Resource Include="SOAPImage.PNG" />
     
    129156    <None Include="Resources\OpenLock.PNG" />
    130157    <None Include="Resources\webservice.png" />
     158  </ItemGroup>
     159  <ItemGroup>
     160    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
     161      <Visible>False</Visible>
     162      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
     163      <Install>false</Install>
     164    </BootstrapperPackage>
     165    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
     166      <Visible>False</Visible>
     167      <ProductName>.NET Framework 3.5 SP1</ProductName>
     168      <Install>true</Install>
     169    </BootstrapperPackage>
     170    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
     171      <Visible>False</Visible>
     172      <ProductName>Windows Installer 3.1</ProductName>
     173      <Install>true</Install>
     174    </BootstrapperPackage>
    131175  </ItemGroup>
    132176  <ItemGroup>
  • trunk/CrypPlugins/Soap/SoapSettings.cs

    r641 r1489  
    3232        }
    3333
    34         [TaskPane("Reset Soap", "Resets the Soap Message", null, 1, false, DisplayLevel.Beginner, ControlType.Button)]
     34        [TaskPane("Send Soap", "Sends the Soap Message", null, 1, true, DisplayLevel.Beginner, ControlType.Button)]
     35        public void sendSoap()
     36        {
     37            OnPropertyChanged("sendSoap");
     38        }
     39
     40        [TaskPane("Reset Soap", "Resets the Soap Message", null, 1, true, DisplayLevel.Beginner, ControlType.Button)]
    3541        public void resetSoap()
    3642        {
    3743            OnPropertyChanged("resetSoap");
    38             {
    39             }
    4044        }
    4145
    4246        private string signatureAlg = "1";
    43         [TaskPane("Signature Algorithm","Select the Signature Algorithm","Signature",3,false,DisplayLevel.Expert,ControlType.ComboBox,new string[] {"DSA-SHA1","RSA-SHA1"})]
     47        [TaskPane("Signature Algorithm", "Select the Signature Algorithm", "Signature", 3, true, DisplayLevel.Expert, ControlType.ComboBox, new string[] { "DSA-SHA1", "RSA-SHA1" })]
    4448        public string SignatureAlg
    4549        {
     
    5357
    5458        private bool sigXPathRef;
    55         [TaskPane("Use a XPath-Reference", "Use XPath References to reference the signed elements", "Signature", 4, false, DisplayLevel.Expert, ControlType.CheckBox)]
     59        [TaskPane("Use a XPath-Reference", "Use XPath References to reference the signed elements", "Signature", 4, true, DisplayLevel.Expert, ControlType.CheckBox)]
    5660        public bool SigXPathRef
    5761        {
     
    6569
    6670        private bool sigShowSteps;
    67         [TaskPane("Show Signature Steps", "Shows the single steps to create the signature", "Signature", 5, false, DisplayLevel.Expert, ControlType.CheckBox)]
     71        [TaskPane("Show Signature Steps", "Shows the single steps to create the signature", "Signature", 5, true, DisplayLevel.Expert, ControlType.CheckBox)]
    6872        public bool SigShowSteps
    6973        {
     
    7882
    7983        private int animationSpeed = 3;
    80         [TaskPane("Animationspeed", "Set the speed for animations", "Animation", 9, false, DisplayLevel.Beginner, ControlType.NumericUpDown, Cryptool.PluginBase.ValidationType.RangeInteger, 1, 5)]
     84        [TaskPane("Animationspeed", "Set the speed for animations", "Animation", 9, true, DisplayLevel.Beginner, ControlType.NumericUpDown, Cryptool.PluginBase.ValidationType.RangeInteger, 1, 5)]
    8185        public int AnimationSpeed
    8286        {
     
    9296        }
    9397
    94         [TaskPane("Pause Restart", "Starts or stops the animation","Animation", 7, false, DisplayLevel.Beginner, ControlType.Button)]
     98        [TaskPane("Pause Restart", "Starts or stops the animation", "Animation", 7, true, DisplayLevel.Beginner, ControlType.Button)]
    9599        public void playPause()
    96100        {
     
    100104        }
    101105
    102         [TaskPane("End Animation", "Stop the animation and shows the final result", "Animation", 8, false, DisplayLevel.Beginner, ControlType.Button)]
     106        [TaskPane("End Animation", "Stop the animation and shows the final result", "Animation", 8, true, DisplayLevel.Beginner, ControlType.Button)]
    103107        public void endAnimation()
    104108        {
     
    114118
    115119    //    [ContextMenu("Encryption Mode", "Choose wether to encrypt the XML-Element or the content of the XML-Element", 6, DisplayLevel.Beginner, ContextMenuControlType.ComboBox, null, new string[] { "XML-Element", "Content of XML-Element" })]
    116         [TaskPane("Encryption Mode", "Choose wether to encrypt the XML-Element or the content of the XML-Element", "Encryption", 6, false, DisplayLevel.Expert, ControlType.RadioButton, new string[] { "XML-Element", "Content of XML-Element" })]
     120        [TaskPane("Encryption Mode", "Choose wether to encrypt the XML-Element or the content of the XML-Element", "Encryption", 6, true, DisplayLevel.Expert, ControlType.RadioButton, new string[] { "XML-Element", "Content of XML-Element" })]
    117121        public int EncContentRadio
    118122        {
     
    130134
    131135        private bool encShowSteps;
    132         [TaskPane("Show Encryption Steps", "Shows the single steps to encrypt this element", "Encryption", 12, false, DisplayLevel.Expert, ControlType.CheckBox)]
     136        [TaskPane("Show Encryption Steps", "Shows the single steps to encrypt this element", "Encryption", 12, true, DisplayLevel.Expert, ControlType.CheckBox)]
    133137        public bool EncShowSteps
    134138        {
Note: See TracChangeset for help on using the changeset viewer.