Changeset 224


Ignore:
Timestamp:
Feb 15, 2009, 7:59:43 PM (13 years ago)
Author:
Thomas Schmid
Message:
  • Editor: connections can now be switched by dragging the source point
  • TextInput / TextOutput now use radio buttons to display settings
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPluginBase/PluginExtension.cs

    r210 r224  
    356356          try
    357357          {
    358             string icon = type.GetPluginInfoAttribute().Icons[index];
     358            string icon = type.GetPluginInfoAttribute().Icons[index];           
    359359            int sIndex = icon.IndexOf('/');
    360360            Image img = new Image();
     
    377377          {
    378378            string description = plugin.GetPluginInfoAttribute().DescriptionUrl;
    379             int sIndex = description.IndexOf('/');
    380             XamlReader xaml = new XamlReader();
    381             return (FlowDocument)xaml.LoadAsync(Application.GetResourceStream(new Uri(string.Format("pack://application:,,,/{0};component/{1}", description.Substring(0, sIndex), description.Substring(sIndex + 1)))).Stream);
     379            if (description != null && description != string.Empty && description != "")
     380            {
     381              int sIndex = description.IndexOf('/');
     382              if (sIndex == -1) return null;
     383              XamlReader xaml = new XamlReader();
     384              return (FlowDocument)xaml.LoadAsync(Application.GetResourceStream(new Uri(string.Format("pack://application:,,,/{0};component/{1}", description.Substring(0, sIndex), description.Substring(sIndex + 1)))).Stream);
     385            }
     386            return null;
    382387          }
    383388          catch (Exception exception)
  • trunk/CrypPlugins/Caesar/CaesarSettings.cs

    r162 r224  
    212212        }
    213213
     214        [SettingsFormat(0, "Normal")]
     215        [PropertySaveOrder(9)]
     216        [TaskPane("Alphabet", "This is the used alphabet.", null, 6, false, DisplayLevel.Expert, ControlType.TextBox, "")]
     217        public string AlphabetSymbols
     218        {
     219          get { return this.alphabet; }
     220          set
     221          {
     222            string a = removeEqualChars(value);
     223            if (a.Length == 0) // cannot accept empty alphabets
     224            {
     225              LogMessage("Ignoring empty alphabet from user! Using previous alphabet: \"" + alphabet + "\" (" + alphabet.Length.ToString() + " Symbols)", NotificationLevel.Info);
     226            }
     227            else if (!alphabet.Equals(a))
     228            {
     229              HasChanges = true;
     230              this.alphabet = a;
     231              setKeyByValue(shiftValue); //re-evaluate if the shiftvalue is still within the range
     232              LogMessage("Accepted new alphabet from user: \"" + alphabet + "\" (" + alphabet.Length.ToString() + " Symbols)", NotificationLevel.Info);
     233              OnPropertyChanged("AlphabetSymbols");
     234            }
     235          }
     236        }
     237
    214238        /// <summary>
    215239        /// Visible setting how to deal with alphabet case. 0 = case insentive, 1 = case sensitive
     
    261285        }
    262286
    263         [SettingsFormat(0, "Bold")]
    264         [PropertySaveOrder(9)]
    265         [TaskPane("Alphabet", "This is the used alphabet.", null, 6, false, DisplayLevel.Expert, ControlType.TextBox, "")]
    266         public string AlphabetSymbols
    267         {
    268             get { return this.alphabet; }
    269             set
    270             {
    271                 string a = removeEqualChars(value);
    272                 if (a.Length == 0) // cannot accept empty alphabets
    273                 {
    274                     LogMessage("Ignoring empty alphabet from user! Using previous alphabet: \"" + alphabet + "\" (" + alphabet.Length.ToString() + " Symbols)", NotificationLevel.Info);
    275                 }
    276                 else if (!alphabet.Equals(a))
    277                 {
    278                     HasChanges = true;
    279                     this.alphabet = a;
    280                     setKeyByValue(shiftValue); //re-evaluate if the shiftvalue is still within the range
    281                     LogMessage("Accepted new alphabet from user: \"" + alphabet + "\" (" + alphabet.Length.ToString() + " Symbols)", NotificationLevel.Info);
    282                     OnPropertyChanged("AlphabetSymbols");
    283                 }
    284                 //else if (a != value)
    285                 //{
    286                 //  // chars were removed -> force GUI update
    287                 //  OnPropertyChanged("AlphabetSymbols");
    288                 //}
    289             }
    290         }
    291 
    292287        #endregion
    293288
  • trunk/CrypPlugins/DES/DES.csproj

    r211 r224  
    5252    <Reference Include="System.Data" />
    5353    <Reference Include="System.Xml" />
     54    <Reference Include="UIAutomationProvider">
     55      <RequiredTargetFramework>3.0</RequiredTargetFramework>
     56    </Reference>
    5457    <Reference Include="WindowsBase">
    5558      <RequiredTargetFramework>3.0</RequiredTargetFramework>
  • trunk/CrypPlugins/DES/DetailedDescription/Description.xaml

    r213 r224  
    11<FlowDocument PagePadding="5,0,5,0" AllowDrop="True" NumberSubstitution.CultureSource="User"
    22              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3                                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4                                 xmlns:misc="clr-namespace:Cryptool.PluginBase.Miscellaneous;assembly=CrypPluginBase"
    5                                 Background="White">
     3                          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     4                          xmlns:misc="clr-namespace:Cryptool.PluginBase.Miscellaneous;assembly=CrypPluginBase"
     5                          Background="White" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
    66   
    77    <Paragraph Margin="0,0,0,0" TextAlignment="Left" FontFamily="Times New Roman" FontSize="16">
     
    99            <Span.TextDecorations>
    1010                <TextDecoration Location="Underline" />
    11             </Span.TextDecorations> Data Encryption Standard
     11            </Span.TextDecorations>Data Encryption Standard
    1212        </Span>
    1313    </Paragraph>
  • trunk/CrypPlugins/Playfair/PlayfairSettings.cs

    r28 r224  
    293293
    294294        [PropertySaveOrder(4)]
    295         [TaskPane("Alphabet cipher","This is the used alphabet cipher to encrypt/decrypt.",null,3,false,DisplayLevel.Expert,ControlType.TextBox,"")]
     295        [TaskPane("Alphabet", "This is the used alphabet cipher to encrypt/decrypt.", null, 3, false, DisplayLevel.Expert, ControlType.TextBox, "")]
    296296        public string AlphabetMatrix
    297297        {
  • trunk/CrypPlugins/TextInput/TextInputSettings.cs

    r52 r224  
    260260    /// </summary>
    261261    [ContextMenu("Stream encoding", "Choose the expected encoding of the byte array and stream.", 1, DisplayLevel.Experienced, ContextMenuControlType.ComboBox, null, new string[] { "Default system encoding", "Unicode", "UTF-7", "UTF-8", "UTF-32", "ASCII", "Big endian unicode" })]
    262     [TaskPane("Stream encoding", "Choose the expected encoding of the byte array and stream.", "", 1, false, DisplayLevel.Experienced, ControlType.ComboBox, new string[] { "Default system encoding", "Unicode", "UTF-7", "UTF-8", "UTF-32", "ASCII", "Big endian unicode" })]
     262    [TaskPane("Stream encoding", "Choose the expected encoding of the byte array and stream.", "", 1, false, DisplayLevel.Experienced, ControlType.RadioButton, new string[] { "Default system encoding", "Unicode", "UTF-7", "UTF-8", "UTF-32", "ASCII", "Big endian unicode" })]
    263263    public int EncodingSetting
    264264    {
  • trunk/CrypPlugins/TextOutput/TextOutputSettings.cs

    r206 r224  
    267267    /// </summary>
    268268    [ContextMenu("Input encoding", "Choose the expected encoding of the input.", 1, DisplayLevel.Experienced, ContextMenuControlType.ComboBox, null, new string[] { "Default system encoding", "Unicode", "UTF-7", "UTF-8", "UTF-32", "ASCII", "Big endian unicode" })]
    269     [TaskPane("Input encoding", "Choose the expected encoding of the input. (The input will be interpreted as set here, no matter what the bytes really mean)", null, 1, false, DisplayLevel.Experienced, ControlType.ComboBox, new string[] { "Default system encoding", "Unicode", "UTF-7", "UTF-8", "UTF-32", "ASCII", "Big endian unicode" })]
     269    [TaskPane("Input encoding", "Choose the expected encoding of the input. (The input will be interpreted as set here, no matter what the bytes really mean)", null, 1, false, DisplayLevel.Experienced, ControlType.RadioButton, new string[] { "Default system encoding", "Unicode", "UTF-7", "UTF-8", "UTF-32", "ASCII", "Big endian unicode" })]
    270270    public int EncodingSetting
    271271    {
     
    288288    /// <value>The presentation format setting.</value>
    289289    [ContextMenu("Presentation format", "Choose the format that will be used te present the input data.", 2, DisplayLevel.Experienced, ContextMenuControlType.ComboBox, null, new string[] { "Text", "Hex", "Base64" })]
    290     [TaskPane("Presentation format", "Choose the format that will be used te present the input data.", null, 2, false, DisplayLevel.Experienced, ControlType.ComboBox, new string[] { "Text", "Hex", "Base64" })]
     290    [TaskPane("Presentation format", "Choose the format that will be used te present the input data.", null, 2, false, DisplayLevel.Experienced, ControlType.RadioButton, new string[] { "Text", "Hex", "Base64" })]
    291291    public int PresentationFormatSetting
    292292    {
  • trunk/CrypWin/bin/Debug/CrypPlugins/AnotherEditor.XML

    r179 r224  
    35383538            <param name="dpo">The dpo.</param>
    35393539        </member>
    3540         <member name="M:DragDrop.Interfaces.IWorkspaceManager.SwitchDockPoint(DragDrop.Interfaces.IConnector,DragDrop.Interfaces.IConnector)">
     3540        <member name="M:DragDrop.Interfaces.IWorkspaceManager.SwitchDockPoint(DragDrop.Interfaces.IConnector,DragDrop.Interfaces.IConnector,AnotherEditor.DragDrop.Connectors.Connection)">
    35413541            <summary>
    35423542            Switches the dock point.
     
    39013901            </summary>
    39023902        </member>
    3903         <member name="M:DragDrop.WorkspaceManager.SwitchDockPoint(DragDrop.Interfaces.IConnector,DragDrop.Interfaces.IConnector)">
     3903        <member name="M:DragDrop.WorkspaceManager.SwitchDockPoint(DragDrop.Interfaces.IConnector,DragDrop.Interfaces.IConnector,AnotherEditor.DragDrop.Connectors.Connection)">
    39043904            <summary>
    39053905            Changes existing connection
     
    60106010            </summary>
    60116011        </member>
    6012         <member name="M:DragDrop.Commands.SwitchDockPointsCommand.#ctor(DragDrop.Interfaces.IWorkspaceManager,DragDrop.Interfaces.IConnector,DragDrop.Interfaces.IConnector)">
     6012        <member name="M:DragDrop.Commands.SwitchDockPointsCommand.#ctor(DragDrop.Interfaces.IWorkspaceManager,DragDrop.Interfaces.IConnector,DragDrop.Interfaces.IConnector,AnotherEditor.DragDrop.Connectors.Connection)">
    60136013            <summary>
    60146014            Initializes a new instance of the <see cref="T:DragDrop.Commands.SwitchDockPointsCommand"/> class.
Note: See TracChangeset for help on using the changeset viewer.