Changeset 2521


Ignore:
Timestamp:
Jan 28, 2011, 10:24:34 PM (10 years ago)
Author:
sauer
Message:

Wizard: added other input types (ComboBoxes, CheckBoxes)

Location:
trunk/CrypPlugins/Wizard
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Wizard/Config/Analysis/wizard.config.analysis.xml

    r2346 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Age Selection</headline>
     8  <headline lang="en" >Age Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select classic or modern encryption.</desc>
     11  <desc lang="en" >Select classic or modern encryption.</desc>
    1212
    1313  <!-- Classic Encryption Category -->
    1414  <category id ="ClassicEn" image="Classic">
    15     <name lang="en-US" >Classic Encryption</name>
    16     <description lang="en-US" >
     15    <name lang="en" >Classic Encryption</name>
     16    <description lang="en" >
    1717      Select a classic encryption to analyze.
    1818    </description>
     
    2222  <!-- Modern Encryption Category -->
    2323  <category id ="ModernEn" image="Modern">
    24     <name lang="en-US" >Modern Encryption</name>
    25     <description lang="en-US" >
     24    <name lang="en" >Modern Encryption</name>
     25    <description lang="en" >
    2626      Select a modern encryption to analyze.
    2727    </description>
  • trunk/CrypPlugins/Wizard/Config/Analysis/wizard.config.classicEn.xml

    r2496 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Algorithm Selection</headline>
     8  <headline lang="en" >Algorithm Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select a classic encryption algorithm.</desc>
     11  <desc lang="en" >Select a classic encryption algorithm.</desc>
    1212
    1313  <!-- Caesar input -->
    1414  <input id ="CaesarEn" image="Caesar">
    15     <name lang="en-US" >Caesar</name>
    16     <description lang="en-US" >
     15    <name lang="en" >Caesar</name>
     16    <description lang="en" >
    1717      Caesar is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    1818    </description>
     
    2121  <!-- Vigenère input -->
    2222  <input id ="VigenereEn" image="Vigenere">
    23     <name lang="en-US" >Vigenère</name>
    24     <description lang="en-US" >
     23    <name lang="en" >Vigenère</name>
     24    <description lang="en" >
    2525      Vigenère is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    2626    </description>
     
    2929  <!-- Substitution input -->
    3030  <input id ="SubstitutionEn" image="Substitution">
    31     <name lang="en-US" >Substitution</name>
    32     <description lang="en-US" >
     31    <name lang="en" >Substitution</name>
     32    <description lang="en" >
    3333      Substitution is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    3434    </description>
     
    3737  <!-- Enigma input -->
    3838  <input id ="EnigmaEn" image="Enigma">
    39     <name lang="en-US" >Enigma</name>
    40     <description lang="en-US" >
     39    <name lang="en" >Enigma</name>
     40    <description lang="en" >
    4141      Enigma is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    4242    </description>
     
    4545  <!-- Playfair input -->
    4646  <input id ="PlayfairEn" image="Playfair">
    47     <name lang="en-US" >Playfair</name>
    48     <description lang="en-US" >
     47    <name lang="en" >Playfair</name>
     48    <description lang="en" >
    4949      Playfair is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    5050    </description>
     
    5353  <!-- ADFGVX input -->
    5454  <input id ="ADFGVXEn" image="ADFGVX">
    55     <name lang="en-US" >ADFGVX</name>
    56     <description lang="en-US" >
     55    <name lang="en" >ADFGVX</name>
     56    <description lang="en" >
    5757      ADFGVX is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    5858    </description>
     
    6161  <!-- XOR input -->
    6262  <input id ="XOREn" image="XOR">
    63     <name lang="en-US" >XOR</name>
    64     <description lang="en-US" >
     63    <name lang="en" >XOR</name>
     64    <description lang="en" >
    6565      XOR is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    6666    </description>
     
    6969  <!-- Vernam input -->
    7070  <input id ="VernamEn" image="Vernam">
    71     <name lang="en-US" >Vernam</name>
    72     <description lang="en-US" >
     71    <name lang="en" >Vernam</name>
     72    <description lang="en" >
    7373      Vernam is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    7474    </description>
     
    7777  <!-- Transposition input -->
    7878  <input id ="TranspositionEn" image="Transposition">
    79     <name lang="en-US" >Transposition</name>
    80     <description lang="en-US" >
     79    <name lang="en" >Transposition</name>
     80    <description lang="en" >
    8181      Transposition is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    8282    </description>
     
    8585  <!-- Scytale input -->
    8686  <input id ="ScytaleEn" image="Scytale">
    87     <name lang="en-US" >Scytale</name>
    88     <description lang="en-US" >
     87    <name lang="en" >Scytale</name>
     88    <description lang="en" >
    8989      Scytale is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    9090    </description>
  • trunk/CrypPlugins/Wizard/Config/Analysis/wizard.config.modernEn.xml

    r2424 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Key Type Selection</headline>
     8  <headline lang="en" >Key Type Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select symmetric or asymmetric encryption.</desc>
     11  <desc lang="en" >Select symmetric or asymmetric encryption.</desc>
    1212
    1313  <!-- Symmetric Encryption Category -->
    1414  <category id ="SymAn" image="Sym">
    15     <name lang="en-US" >Symmetric Encryption</name>
    16     <description lang="en-US" >
     15    <name lang="en" >Symmetric Encryption</name>
     16    <description lang="en" >
    1717      Select a symmetric modern algorithm to analyze.
    1818    </description>
     
    2222  <!-- Asymmetric Encryption Category -->
    2323  <category id ="AsymAn" image="Asym">
    24     <name lang="en-US" >Asymmetric Encryption</name>
    25     <description lang="en-US" >
     24    <name lang="en" >Asymmetric Encryption</name>
     25    <description lang="en" >
    2626      Select an asymmetric modern algorithm to analyze.
    2727    </description>
    2828
    2929    <!-- This is the step's headline. It should be short, but precise. -->
    30     <headline lang="en-US" >Algorithm Selection</headline>
     30    <headline lang="en" >Algorithm Selection</headline>
    3131
    3232    <!-- This is the step's description. -->
    33     <desc lang="en-US" >Select an asymmetric encryption/decryption algorithm.</desc>
     33    <desc lang="en" >Select an asymmetric encryption/decryption algorithm.</desc>
    3434   
    3535    <!-- RSA input -->
    3636    <input id="RSAEn" image="RSA" >
    37       <name lang="en-US" >RSA</name>
    38       <description lang="en-US" >
     37      <name lang="en" >RSA</name>
     38      <description lang="en" >
    3939        RSA is an asymmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    4040      </description>
  • trunk/CrypPlugins/Wizard/Config/Analysis/wizard.config.modernSymEn.xml

    r2496 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Algorithm Selection</headline>
     8  <headline lang="en" >Algorithm Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select a modern symmetric encryption algorithm.</desc>
     11  <desc lang="en" >Select a modern symmetric encryption algorithm.</desc>
    1212
    1313  <!-- AES input -->
    1414  <input id="AESEn" image="AES" >
    15     <name lang="en-US" >AES</name>
    16     <description lang="en-US" >
     15    <name lang="en" >AES</name>
     16    <description lang="en" >
    1717      AES is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    1818    </description>
    1919    <inputBox plugin="TextInput1" property="Text" defaultValue="Input your Message here!">
    20       <description lang="en-US">
     20      <description lang="en">
    2121        Message to encrypt
    2222      </description>
     
    2424
    2525    <input id ="CaesarEnKey">
    26       <headline lang="en-US" >Key Input</headline>
    27       <desc lang="en-US" >Input the key information.</desc>
     26      <headline lang="en" >Key Input</headline>
     27      <desc lang="en" >Input the key information.</desc>
    2828      <inputBox defaultValue="00 00 00">
    29         <description lang="en-US">
     29        <description lang="en">
    3030          Key
    3131        </description>
    3232      </inputBox>
    3333      <inputBox defaultValue="00 00 00">
    34         <description lang="en-US">
     34        <description lang="en">
    3535          Initialization Vector
    3636        </description>
     
    4343  <!-- DES input -->
    4444  <input id="DESEn" image="DES" >
    45     <name lang="en-US" >DES</name>
    46     <description lang="en-US" >
     45    <name lang="en" >DES</name>
     46    <description lang="en" >
    4747      DES is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    4848    </description>
     
    5151  <!-- SDES input -->
    5252  <input id="SDESEn" image="SDES" >
    53     <name lang="en-US" >SDES</name>
    54     <description lang="en-US" >
     53    <name lang="en" >SDES</name>
     54    <description lang="en" >
    5555      SDES is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    5656    </description>
     
    5959  <!-- Twofish input -->
    6060  <input id="TwoEn" image="Twofish" >
    61     <name lang="en-US" >Twofish</name>
    62     <description lang="en-US" >
     61    <name lang="en" >Twofish</name>
     62    <description lang="en" >
    6363      Twofish is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    6464    </description>
     
    6767  <!-- Trivium input -->
    6868  <input id="TriEn" image="Trivium" >
    69     <name lang="en-US" >Trivium</name>
    70     <description lang="en-US" >
     69    <name lang="en" >Trivium</name>
     70    <description lang="en" >
    7171      Trivium is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    7272    </description>
     
    7575  <!-- TEA input -->
    7676  <input id="TEAEn" image="TEA" >
    77     <name lang="en-US" >TEA</name>
    78     <description lang="en-US" >
     77    <name lang="en" >TEA</name>
     78    <description lang="en" >
    7979      TEA is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    8080    </description>
  • trunk/CrypPlugins/Wizard/Config/EnDeCrypt/wizard.config.classicEnDe.xml

    r2496 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Algorithm Selection</headline>
     8  <headline lang="en" >Algorithm Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select a classic encryption/decryption algorithm.</desc>
     11  <desc lang="en" >Select a classic encryption/decryption algorithm.</desc>
    1212
    1313  <!-- Caesar input -->
    1414  <input id ="Caesar" image="Caesar">
    15     <name lang="en-US" >Caesar</name>
    16     <description lang="en-US" >
     15    <name lang="en" >Caesar</name>
     16    <description lang="en" >
    1717      This encryption algorithm already used by the Roman general and dictator Caesar substitutes single letters: The substitution rule is that the letters of the cleartext alphabet are shifted by a special value (key).
    1818    </description>
    1919
    20     <headline lang="en-US" >Message Input</headline>
    21     <desc lang="en-US" >Here, you can enter the message to encrypt.</desc>
     20    <headline lang="en" >Message Input</headline>
     21    <desc lang="en" >Here, you can enter the message to encrypt and select input format and encodings.</desc>
     22   
    2223    <inputBox plugin="TextInput1" property="Text" defaultValue="Input your Message here!">
    23       <description lang="en-US">
     24      <description lang="en">
    2425        Message to encrypt:
    2526      </description>
    2627    </inputBox>
     28   
     29    <comboBox plugin="TextInput1" property="EncodingSetting" defaultValue="0">
     30      <description lang="en">
     31        Character Encoding type:
     32      </description>
     33      <item content="Default system encoding" lang="en"/>
     34      <item content="Unicode" lang="en"/>
     35      <item content="UTF-7" lang="en"/>
     36      <item content="UTF-8" lang="en"/>
     37      <item content="UTF-32" lang="en"/>
     38      <item content="ASCII" lang="en"/>
     39      <item content="Big endian unicode" lang="en"/>
     40    </comboBox>
     41   
     42    <comboBox plugin="TextInput1" property="InputFormatSetting" defaultValue="0">
     43      <description lang="en">
     44        Input Format:
     45      </description>
     46      <item content="Plain text" lang="en"/>
     47      <item content="Hex" lang="en"/>
     48      <item content="Base64" lang="en"/>
     49    </comboBox>
     50   
    2751    <loadSample file="WorkspaceManagerSamples\Caesar_Sample.cwm" title="W_Caesar_Sample"/>
    2852   
     
    3155  <!-- Vigenère input -->
    3256  <input id ="Vigenere" image="Vigenere">
    33     <name lang="en-US" >Vigenère</name>
    34     <description lang="en-US" >
     57    <name lang="en" >Vigenère</name>
     58    <description lang="en" >
    3559      Vigenère is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    3660    </description>
     
    3963  <!-- Substitution input -->
    4064  <input id ="Substitution" image="Substitution">
    41     <name lang="en-US" >Substitution</name>
    42     <description lang="en-US" >
     65    <name lang="en" >Substitution</name>
     66    <description lang="en" >
    4367      Substitution is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    4468    </description>
     
    4771  <!-- Enigma input -->
    4872  <input id ="Enigma" image="Enigma">
    49     <name lang="en-US" >Enigma</name>
    50     <description lang="en-US" >
     73    <name lang="en" >Enigma</name>
     74    <description lang="en" >
    5175      Enigma is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    5276    </description>
     
    5579  <!-- Playfair input -->
    5680  <input id ="Playfair" image="Playfair">
    57     <name lang="en-US" >Playfair</name>
    58     <description lang="en-US" >
     81    <name lang="en" >Playfair</name>
     82    <description lang="en" >
    5983      Playfair is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    6084    </description>
     
    6387  <!-- ADFGVX input -->
    6488  <input id ="ADFGVX" image="ADFGVX">
    65     <name lang="en-US" >ADFGVX</name>
    66     <description lang="en-US" >
     89    <name lang="en" >ADFGVX</name>
     90    <description lang="en" >
    6791      ADFGVX is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    6892    </description>
     
    7195  <!-- XOR input -->
    7296  <input id ="XOR" image="XOR">
    73     <name lang="en-US" >XOR</name>
    74     <description lang="en-US" >
     97    <name lang="en" >XOR</name>
     98    <description lang="en" >
    7599      XOR is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    76100    </description>
     
    79103  <!-- Vernam input -->
    80104  <input id ="Vernam" image="Vernam">
    81     <name lang="en-US" >Vernam</name>
    82     <description lang="en-US" >
     105    <name lang="en" >Vernam</name>
     106    <description lang="en" >
    83107      Vernam is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    84108    </description>
     
    87111  <!-- Transposition input -->
    88112  <input id ="Transposition" image="Transposition">
    89     <name lang="en-US" >Transposition</name>
    90     <description lang="en-US" >
     113    <name lang="en" >Transposition</name>
     114    <description lang="en" >
    91115      Transposition is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    92116    </description>
     
    95119  <!-- Scytale input -->
    96120  <input id ="Scytale" image="Scytale">
    97     <name lang="en-US" >Scytale</name>
    98     <description lang="en-US" >
     121    <name lang="en" >Scytale</name>
     122    <description lang="en" >
    99123      Scytale is a classic algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    100124    </description>
  • trunk/CrypPlugins/Wizard/Config/EnDeCrypt/wizard.config.enDe.xml

    r2346 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Age Selection</headline>
     8  <headline lang="en" >Age Selection</headline>
    99  <headline lang="de-DE" >Epochenauswahl</headline>
    1010
    1111  <!-- This is the step's description. -->
    12   <desc lang="en-US" >Select classic or modern encryption/decryption.</desc>
     12  <desc lang="en" >Select classic or modern encryption/decryption.</desc>
    1313  <desc lang="de-DE" >Wählen Sie zwischen klassischer oder moderner Verschlüsselung/Entschlüsselung.</desc>
    1414
    1515  <!-- Classic Encryption/Decryption Category -->
    1616  <category id ="Classic" image="Classic">
    17     <name lang="en-US" >Classic Encryption/Decryption</name>
     17    <name lang="en" >Classic Encryption/Decryption</name>
    1818    <name lang="de-DE" >Klassische Verschlüsselung/Entschlüsselung</name>
    19     <description lang="en-US" >
     19    <description lang="en" >
    2020      Select a classic algorithm to encrypt plaintext or to decrypt ciphertext.
    2121    </description>
     
    2828  <!-- Modern Encryption/Decryption Category -->
    2929  <category id ="Modern" image="Modern">
    30     <name lang="en-US" >Modern Encryption/Decryption</name>
    31     <description lang="en-US" >
     30    <name lang="en" >Modern Encryption/Decryption</name>
     31    <description lang="en" >
    3232      Select a modern algorithm to encrypt plaintext or to decrypt ciphertext.
    3333    </description>
  • trunk/CrypPlugins/Wizard/Config/EnDeCrypt/wizard.config.modernEnDe.xml

    r2424 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Key Type Selection</headline>
     8  <headline lang="en" >Key Type Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select symmetric or asymmetric encryption/decryption.</desc>
     11  <desc lang="en" >Select symmetric or asymmetric encryption/decryption.</desc>
    1212
    1313  <!-- Symmetric Encryption/Decryption Category -->
    1414  <category id ="Sym" image="Sym">
    15     <name lang="en-US" >Symmetric Encryption/Decryption</name>
    16     <description lang="en-US" >
     15    <name lang="en" >Symmetric Encryption/Decryption</name>
     16    <description lang="en" >
    1717      Select a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext.
    1818    </description>
     
    2222  <!-- Asymmetric Encryption/Decryption Category -->
    2323  <category id ="Asym" image="Asym">
    24     <name lang="en-US" >Asymmetric Encryption/Decryption</name>
    25     <description lang="en-US" >
     24    <name lang="en" >Asymmetric Encryption/Decryption</name>
     25    <description lang="en" >
    2626      Select an asymmetric modern algorithm to encrypt plaintext or to decrypt ciphertext.
    2727    </description>
    2828
    2929    <!-- This is the step's headline. It should be short, but precise. -->
    30     <headline lang="en-US" >Algorithm Selection</headline>
     30    <headline lang="en" >Algorithm Selection</headline>
    3131
    3232    <!-- This is the step's description. -->
    33     <desc lang="en-US" >Select an asymmetric encryption/decryption algorithm.</desc>
     33    <desc lang="en" >Select an asymmetric encryption/decryption algorithm.</desc>
    3434   
    3535    <!-- RSA input -->
    3636    <input id="RSA" image="RSA" >
    37       <name lang="en-US" >RSA</name>
    38       <description lang="en-US" >
     37      <name lang="en" >RSA</name>
     38      <description lang="en" >
    3939        RSA is an asymmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    4040      </description>
  • trunk/CrypPlugins/Wizard/Config/EnDeCrypt/wizard.config.modernSymEnDe.xml

    r2424 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Algorithm Selection</headline>
     8  <headline lang="en" >Algorithm Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select a modern symmetric encryption/decryption algorithm.</desc>
     11  <desc lang="en" >Select a modern symmetric encryption/decryption algorithm.</desc>
    1212
    1313  <!-- AES input -->
    1414  <input id="AESEnDe" image="AES" >
    15     <name lang="en-US" >AES</name>
    16     <description lang="en-US" >
     15    <name lang="en" >AES</name>
     16    <description lang="en" >
    1717      AES is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    1818    </description>
     
    2121  <!-- DES input -->
    2222  <input id="DESEnDe" image="DES" >
    23     <name lang="en-US" >DES</name>
    24     <description lang="en-US" >
     23    <name lang="en" >DES</name>
     24    <description lang="en" >
    2525      DES is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    2626    </description>
     
    2929  <!-- SDES input -->
    3030  <input id="SDESEnDe" image="SDES" >
    31     <name lang="en-US" >SDES</name>
    32     <description lang="en-US" >
     31    <name lang="en" >SDES</name>
     32    <description lang="en" >
    3333      SDES is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    3434    </description>
     
    3737  <!-- Twofish input -->
    3838  <input id="Two" image="Twofish" >
    39     <name lang="en-US" >Twofish</name>
    40     <description lang="en-US" >
     39    <name lang="en" >Twofish</name>
     40    <description lang="en" >
    4141      Twofish is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    4242    </description>
     
    4545  <!-- Trivium input -->
    4646  <input id="Tri" image="Trivium" >
    47     <name lang="en-US" >Trivium</name>
    48     <description lang="en-US" >
     47    <name lang="en" >Trivium</name>
     48    <description lang="en" >
    4949      Trivium is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    5050    </description>
     
    5353  <!-- TEA input -->
    5454  <input id="TEA" image="TEA" >
    55     <name lang="en-US" >TEA</name>
    56     <description lang="en-US" >
     55    <name lang="en" >TEA</name>
     56    <description lang="en" >
    5757      TEA is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    5858    </description>
     
    6161  <!-- RC2 input -->
    6262  <input id="RC2" image="RC2" >
    63     <name lang="en-US" >RC2</name>
    64     <description lang="en-US" >
     63    <name lang="en" >RC2</name>
     64    <description lang="en" >
    6565      RC2 is a symmetric modern algorithm to encrypt plaintext or to decrypt ciphertext... (add instead some really helpful text).
    6666    </description>
  • trunk/CrypPlugins/Wizard/Config/Indiv/wizard.config.hash.xml

    r2424 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Hash Function Selection</headline>
     8  <headline lang="en" >Hash Function Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select a hash function.</desc>
     11  <desc lang="en" >Select a hash function.</desc>
    1212
    1313  <!-- MD5 input -->
    1414  <input id="MD5" image="MD5" >
    15     <name lang="en-US" >MD5</name>
    16     <description lang="en-US" >
     15    <name lang="en" >MD5</name>
     16    <description lang="en" >
    1717      MD5 is a hash function... (add instead some really helpful text).
    1818    </description>
     
    2121  <!-- SHA input -->
    2222  <input id="SHA" image="SHA" >
    23     <name lang="en-US" >SHA</name>
    24     <description lang="en-US" >
     23    <name lang="en" >SHA</name>
     24    <description lang="en" >
    2525      SHA is a hash function... (add instead some really helpful text).
    2626    </description>
     
    2929  <!-- RIPEMD160 input -->
    3030  <input id="RIPEMD160" image="RIPEMD160" >
    31     <name lang="en-US" >RIPEMD160</name>
    32     <description lang="en-US" >
     31    <name lang="en" >RIPEMD160</name>
     32    <description lang="en" >
    3333      RIPEMD160 is a hash function... (add instead some really helpful text).
    3434    </description>
     
    3737  <!-- Tiger input -->
    3838  <input id="Tiger" image="Tiger" >
    39     <name lang="en-US" >Tiger</name>
    40     <description lang="en-US" >
     39    <name lang="en" >Tiger</name>
     40    <description lang="en" >
    4141      Tiger is a hash function... (add instead some really helpful text).
    4242    </description>
     
    4545  <!-- Whirlpool input -->
    4646  <input id="Whirlpool" image="Whirlpool" >
    47     <name lang="en-US" >Whirlpool</name>
    48     <description lang="en-US" >
     47    <name lang="en" >Whirlpool</name>
     48    <description lang="en" >
    4949      Whirlpool is a hash function... (add instead some really helpful text).
    5050    </description>
  • trunk/CrypPlugins/Wizard/Config/Indiv/wizard.config.indiv.xml

    r2424 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Individual Procedure Selection</headline>
     8  <headline lang="en" >Individual Procedure Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select an individual procedure.</desc>
     11  <desc lang="en" >Select an individual procedure.</desc>
    1212
    1313  <!-- Hash Functions Category -->
    1414  <category id ="Hash" image="Hash">
    15     <name lang="en-US" >Hash Functions</name>
    16     <description lang="en-US" >
     15    <name lang="en" >Hash Functions</name>
     16    <description lang="en" >
    1717      Select hash functions to work with.
    1818    </description>
     
    2222  <!-- Prime Number Operations Category -->
    2323  <category id ="Prime" image="Primes">
    24     <name lang="en-US" >Prime Number Operations</name>
    25     <description lang="en-US" >
     24    <name lang="en" >Prime Number Operations</name>
     25    <description lang="en" >
    2626      Select a prime numer operation to work with.
    2727    </description>
     
    3131  <!-- Key Exchange Category -->
    3232  <category id ="Key" image="Key">
    33     <name lang="en-US" >Key Exchange</name>
    34     <description lang="en-US" >
     33    <name lang="en" >Key Exchange</name>
     34    <description lang="en" >
    3535      Select a key exchange algorithm to work with.
    3636    </description>
    3737
    3838    <!-- This is the step's headline. It should be short, but precise. -->
    39     <headline lang="en-US" >Key Exchange Algorithm Selection</headline>
     39    <headline lang="en" >Key Exchange Algorithm Selection</headline>
    4040
    4141    <!-- This is the step's description. -->
    42     <desc lang="en-US" >Select a key exchange algorithm.</desc>
     42    <desc lang="en" >Select a key exchange algorithm.</desc>
    4343
    4444    <!-- Diffie Hellman input -->
    4545    <input id="Diffie" image="Key" >
    46       <name lang="en-US" >Diffie Hellman</name>
    47       <description lang="en-US" >
     46      <name lang="en" >Diffie Hellman</name>
     47      <description lang="en" >
    4848        Diffie Hellman is a key exchange algorithm... (add instead some really helpful text).
    4949      </description>
  • trunk/CrypPlugins/Wizard/Config/Indiv/wizard.config.prime.xml

    r2424 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Prime Number Operation Selection</headline>
     8  <headline lang="en" >Prime Number Operation Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select a prime number operation.</desc>
     11  <desc lang="en" >Select a prime number operation.</desc>
    1212
    1313  <!-- Factorization input -->
    1414  <input id="Factorization" image="Primes" >
    15     <name lang="en-US" >Prime Number Factorization</name>
    16     <description lang="en-US" >
     15    <name lang="en" >Prime Number Factorization</name>
     16    <description lang="en" >
    1717      Select to factorize prime numbers.
    1818    </description>
     
    2121  <!-- Generation input -->
    2222  <input id="Generation" image="Primes" >
    23     <name lang="en-US" >Prime Number Generation</name>
    24     <description lang="en-US" >
     23    <name lang="en" >Prime Number Generation</name>
     24    <description lang="en" >
    2525      Select to generate prime numbers.
    2626    </description>
     
    2929  <!-- Test input -->
    3030  <input id="Test" image="Primes" >
    31     <name lang="en-US" >Prime Number Test</name>
    32     <description lang="en-US" >
     31    <name lang="en" >Prime Number Test</name>
     32    <description lang="en" >
    3333      Select to test numbers for being prime.
    3434    </description>
  • trunk/CrypPlugins/Wizard/Config/wizard.config.start.xml

    r2424 r2521  
    66
    77  <!-- This is the step's headline. It should be short, but precise. -->
    8   <headline lang="en-US" >Task Selection</headline>
     8  <headline lang="en" >Task Selection</headline>
    99
    1010  <!-- This is the step's description. -->
    11   <desc lang="en-US" >Select a task.</desc>
     11  <desc lang="en" >Select a task.</desc>
    1212 
    1313  <!-- Encryption/Decryption Category -->
    1414  <category id ="EnDeCrypt" image="EnDeCrypt">
    15     <name lang="en-US" >Encryption/Decryption</name>
     15    <name lang="en" >Encryption/Decryption</name>
    1616    <name lang="de-DE" >Verschlüsselung/Entschlüsselung</name>
    1717    <description lang="de-DE" >
    1818      Wählen Sie einen Algorithmus, um Klartext zu verschlüsseln oder chiffrierten Text zu entschlüsseln.
    1919    </description>
    20     <description lang="en-US" >
     20    <description lang="en" >
    2121      Select an algorithm to encrypt plaintext or to decrypt ciphertext.
    2222    </description>
     
    2626  <!-- Cryptanalysis Category -->
    2727  <category id ="Analysis" image="Analyse">
    28     <name lang="en-US" >Cryptanalysis</name>
    29     <description lang="en-US" >
     28    <name lang="en" >Cryptanalysis</name>
     29    <description lang="en" >
    3030      Select a specific algorithm to analyze.
    3131    </description>
     
    3535  <!-- Individual Procedures Category -->
    3636  <category id ="Indiv" image="Indiv">
    37     <name lang="en-US" >Individual Procedures</name>
    38     <description lang="en-US" >
     37    <name lang="en" >Individual Procedures</name>
     38    <description lang="en" >
    3939      Select from individual procedures like hash functions, prime number operations, or key exchange.
    4040    </description>
  • trunk/CrypPlugins/Wizard/WizardControl.xaml.cs

    r2496 r2521  
    3535        private SolidColorBrush selectionBrush = new SolidColorBrush();
    3636        private const string configXMLPath = "Wizard.Config.wizard.config.start.xml";
    37         private const string defaultLang = "en-US";
     37        private const string defaultLang = "en";
    3838        private XElement wizardConfigXML;
    3939        private Dictionary<string, PluginPropertyValue> propertyValueDict = new Dictionary<string, PluginPropertyValue>();
     
    133133
    134134            //set headline
    135             XElement headline = FindElementInElement(element, "headline");
     135            XElement headline = FindElementsInElement(element, "headline").First();
    136136            if (headline != null)
    137137                taskHeader.Content = headline.Value;
    138138
    139139            //set description label
    140             XElement desc = FindElementInElement(element, "desc");
     140            XElement desc = FindElementsInElement(element, "desc").First();
    141141            if (desc != null)
    142142                descHeader.Content = desc.Value;
     
    148148                inputPanel.Visibility = Visibility.Visible;
    149149
    150                 var inputBoxes = element.Elements("inputBox");
     150                var inputs = element.Elements("inputBox");
     151                inputs = inputs.Union(element.Elements("comboBox"));
     152                inputs = inputs.Union(element.Elements("checkBox"));
    151153                inputStack.Children.Clear();
    152154               
    153                 foreach (var box in inputBoxes)
     155                foreach (var input in inputs)
    154156                {
    155157                    var description = new Label();
    156                     description.Content = FindElementInElement(box, "description").Value;
     158                    description.Content = FindElementsInElement(input, "description").First().Value;
    157159                    inputStack.Children.Add(description);
    158160
    159                     var textBox = new TextBox();
    160                     textBox.Tag = box;
    161                     textBox.MinLines = 4;
    162                     inputStack.Children.Add(textBox);
    163                     if (propertyValueDict.ContainsKey(GetElementID(box)))
    164                         textBox.Text = propertyValueDict[GetElementID(box)].Value;
    165                     else if (box.Attribute("defaultValue") != null)
    166                         textBox.Text = box.Attribute("defaultValue").Value;
     161                    if (input.Name == "inputBox")
     162                    {
     163                        var textBox = new TextBox();
     164                        textBox.Tag = input;
     165                        textBox.MinLines = 4;
     166                        inputStack.Children.Add(textBox);
     167                        if (propertyValueDict.ContainsKey(GetElementID(input)))
     168                            textBox.Text = (string)propertyValueDict[GetElementID(input)].Value;
     169                        else if (input.Attribute("defaultValue") != null)
     170                            textBox.Text = input.Attribute("defaultValue").Value;
     171                    }
     172                    else if (input.Name == "comboBox")
     173                    {
     174                        ComboBox cb = new ComboBox();
     175                        cb.Tag = input;
     176
     177                        var items = FindElementsInElement(input, "item");
     178                        foreach (var item in items)
     179                        {
     180                            ComboBoxItem cbi = new ComboBoxItem();
     181                            if (item.Attribute("content") != null)
     182                                cbi.Content = item.Attribute("content").Value;
     183                            cb.Items.Add(cbi);
     184                        }
     185
     186                       
     187                        if (propertyValueDict.ContainsKey(GetElementID(input)))
     188                        {
     189                            if (propertyValueDict[GetElementID(input)].Value is int)
     190                            {
     191                                ComboBoxItem cbi = (ComboBoxItem)cb.Items.GetItemAt((int)propertyValueDict[GetElementID(input)].Value);
     192                                cbi.IsSelected = true;
     193                            }
     194                        }
     195                        else if (input.Attribute("defaultValue") != null)
     196                        {
     197                            int i = 0;
     198                            if (Int32.TryParse(input.Attribute("defaultValue").Value, out i))
     199                            {
     200                                ComboBoxItem cbi = (ComboBoxItem)cb.Items.GetItemAt(i);
     201                                cbi.IsSelected = true;
     202                            }
     203                        }
     204
     205                        inputStack.Children.Add(cb);
     206                    }
     207                    else if (input.Name == "checkBox")
     208                    {
     209                        CheckBox cb = new CheckBox();
     210                        cb.Tag = input;
     211
     212                        if (input.Attribute("content") != null)
     213                            cb.Content = input.Attribute("content").Value;
     214                        if (propertyValueDict.ContainsKey(GetElementID(input)))
     215                        {
     216                            string value = (string)propertyValueDict[GetElementID(input)].Value;
     217                            if (value.ToLower() == "true")
     218                                cb.IsChecked = true;
     219                            else
     220                                cb.IsChecked = false;
     221                        }
     222                        else if (input.Attribute("defaultValue") != null)
     223                        {
     224                            string value = input.Attribute("defaultValue").Value;
     225                            if (value.ToLower() == "true")
     226                                cb.IsChecked = true;
     227                            else
     228                                cb.IsChecked = false;
     229                        }
     230
     231                        inputStack.Children.Add(cb);
     232                    }
    167233                }
    168234
     
    220286                        l.Height = 30;
    221287                        l.HorizontalAlignment = HorizontalAlignment.Stretch;
    222                         XElement label = FindElementInElement(ele, "name");
     288                        XElement label = FindElementsInElement(ele, "name").First();
    223289                        if (label != null)
    224290                            l.Content = label.Value;
     
    295361                    var settings = plugin.Settings;
    296362                    var property = settings.GetType().GetProperty(ppv.PropertyName);
    297                     property.SetValue(settings, ppv.Value, null);
     363                    if (ppv.Value is string)
     364                        property.SetValue(settings, (string)ppv.Value, null);
     365                    else if (ppv.Value is int)
     366                        property.SetValue(settings, (int)ppv.Value, null);
     367                    else if (ppv.Value is bool)
     368                        property.SetValue(settings, (bool)ppv.Value, null);
    298369                }
    299370                catch (Exception)
     
    317388            c.Background = selectionBrush;
    318389            XElement ele = (XElement)b.Tag;
    319             XElement desc = FindElementInElement(ele, "description");
     390            XElement desc = FindElementsInElement(ele, "description").First();
    320391            if (desc != null)
    321392                description.Text = desc.Value;
     
    336407
    337408        //finds elements according to the current language
    338         private XElement FindElementInElement(XElement element, string xname)
     409        private IEnumerable<XElement> FindElementsInElement(XElement element, string xname)
    339410        {
    340411            CultureInfo currentLang = System.Globalization.CultureInfo.CurrentCulture;
    341             XElement foundElement = null;
    342 
    343             IEnumerable<XElement> descriptions = element.Elements(xname);
    344             if (descriptions.Any())
    345             {
    346                 var description = from descln in descriptions where descln.Attribute("lang").Value == currentLang.TextInfo.CultureName select descln;
    347                 if (!description.Any())
    348                 {
    349                     description = from descln in descriptions where descln.Attribute("lang").Value == currentLang.TwoLetterISOLanguageName select descln;
    350                     if (description.Any())
    351                         foundElement = description.First();
    352                     else
    353                     {
    354                         description = from descln in descriptions where descln.Attribute("lang").Value == defaultLang select descln;
    355                         if (description.Any())
    356                             foundElement = description.First();
    357                     }
    358                 }
    359                 else
    360                     foundElement = description.First();
    361             }
    362 
    363             return foundElement;
     412
     413            IEnumerable<XElement> allElements = element.Elements(xname);
     414            IEnumerable<XElement> foundElements = null;
     415
     416            if (allElements.Any())
     417            {
     418                foundElements = from descln in allElements where descln.Attribute("lang").Value == currentLang.TextInfo.CultureName select descln;
     419                if (!foundElements.Any())
     420                {
     421                    foundElements = from descln in allElements where descln.Attribute("lang").Value == currentLang.TwoLetterISOLanguageName select descln;
     422                    if (!foundElements.Any())
     423                        foundElements = from descln in allElements where descln.Attribute("lang").Value == defaultLang select descln;
     424                }
     425            }
     426
     427            if (foundElements == null || !foundElements.Any() || !allElements.Any())
     428            {
     429                List<XElement> fe = new List<XElement>();
     430                fe.Add(new XElement("dummy"));
     431                return fe;
     432            }
     433
     434            return foundElements;
    364435        }
    365436
     
    405476                foreach (var child in inputStack.Children)
    406477                {
    407                     if (child is TextBox)
    408                     {
    409                         SaveTextboxContent((TextBox)child);
    410                     }
     478                    SaveControlContent(child);
    411479                }
    412480                var nextElement = (XElement) inputPanel.Tag;
     
    419487        }
    420488
    421         private void SaveTextboxContent(TextBox textBox)
    422         {
    423             XElement ele = (XElement) textBox.Tag;
    424             if (ele.Attribute("plugin") != null && ele.Attribute("property") != null)
    425             {
     489        private void SaveControlContent(object o)
     490        {
     491            if (o is TextBox || o is ComboBox || o is CheckBox)
     492            {
     493                Control c = (Control)o;
     494                XElement ele = (XElement)c.Tag;
    426495                var id = GetElementID(ele);
    427                 var newEntry = new PluginPropertyValue()
     496                PluginPropertyValue newEntry = new PluginPropertyValue();
     497                if (ele.Attribute("plugin") != null && ele.Attribute("property") != null)
     498                {
     499                    if (o is TextBox)
     500                    {
     501                        TextBox textBox = (TextBox)o;
     502                        newEntry = new PluginPropertyValue()
    428503                                   {
    429504                                       PluginName = ele.Attribute("plugin").Value,
     
    431506                                       Value = textBox.Text
    432507                                   };
    433 
    434                 if (!propertyValueDict.ContainsKey(id))
    435                     propertyValueDict.Add(id, newEntry);
    436                 else
    437                     propertyValueDict[id] = newEntry;
    438             }
    439         }
    440 
    441         private void DeleteTextboxContent(TextBox textBox)
    442         {
    443             XElement ele = (XElement)textBox.Tag;
    444             var id = GetElementID(ele);
    445 
    446             if (propertyValueDict.ContainsKey(id))
    447                 propertyValueDict.Remove(id);
     508                    }
     509                    else if (o is ComboBox)
     510                    {
     511                        ComboBox comboBox = (ComboBox)o;
     512                        newEntry = new PluginPropertyValue()
     513                        {
     514                            PluginName = ele.Attribute("plugin").Value,
     515                            PropertyName = ele.Attribute("property").Value,
     516                            Value = comboBox.SelectedIndex
     517                        };
     518                    }
     519                    else if (o is CheckBox)
     520                    {
     521                        CheckBox checkBox = (CheckBox)o;
     522                        if (checkBox.IsChecked != null)
     523                        {
     524                            newEntry = new PluginPropertyValue()
     525                            {
     526                                PluginName = ele.Attribute("plugin").Value,
     527                                PropertyName = ele.Attribute("property").Value,
     528                                Value = (bool)checkBox.IsChecked
     529                            };
     530                        }
     531                    }
     532
     533                    if (!propertyValueDict.ContainsKey(id))
     534                        propertyValueDict.Add(id, newEntry);
     535                    else
     536                        propertyValueDict[id] = newEntry;
     537                }
     538            }
     539        }
     540
     541        private void DeleteControlContent(object o)
     542        {
     543            if (o is TextBox || o is ComboBox || o is CheckBox)
     544            {
     545                Control control = (Control)o;
     546                XElement ele = (XElement)control.Tag;
     547                var id = GetElementID(ele);
     548
     549                if (propertyValueDict.ContainsKey(id))
     550                    propertyValueDict.Remove(id);
     551            }
    448552        }
    449553
     
    461565                foreach (var child in inputStack.Children)
    462566                {
    463                     if (child is TextBox)
    464                     {
    465                         DeleteTextboxContent((TextBox)child);
    466                     }
     567                    DeleteControlContent(child);
    467568                }
    468569
     
    494595        public string PluginName;
    495596        public string PropertyName;
    496         public string Value;
     597        public object Value;
    497598    }
    498599}
Note: See TracChangeset for help on using the changeset viewer.