Changeset 430 for trunk/CrypPlugins/CLK


Ignore:
Timestamp:
Aug 11, 2009, 6:37:24 PM (12 years ago)
Author:
Sören Rinne
Message:
  • BFP now can change number of inputs dynamically. do not use this at the moment.
  • minor changes in CLK and LFSR
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/CLK/CLKSettings.cs

    r304 r430  
    66using Cryptool.PluginBase.Miscellaneous;
    77using System.ComponentModel;
     8// for Visibility
     9using System.Windows;
    810
    911namespace Cryptool.Plugins.CLK
     
    8082            OnPropertyChanged("UseEvent");
    8183            HasChanges = true;
     84            if (this.useEvent)
     85                SettingChanged("CLKTimeout", Visibility.Collapsed);
     86            else
     87                SettingChanged("CLKTimeout", Visibility.Visible);
    8288        }
    8389
     
    106112    public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
    107113
    108     protected void OnPropertyChanged(string name)
     114    // this event is for disabling stuff in the settings pane
     115    public event TaskPaneAttributeChangedHandler TaskPaneAttributeChanged;
     116
     117    public void OnPropertyChanged(string name)
    109118    {
    110       EventsHelper.PropertyChanged(PropertyChanged, this, new PropertyChangedEventArgs(name));
     119        if (PropertyChanged != null)
     120        {
     121            EventsHelper.PropertyChanged(PropertyChanged, this, new PropertyChangedEventArgs(name));
     122        }
     123    }
     124
     125    /* SettingChanged(MEM_USAGE_PROPERTY, Visibility.Visible);
     126    SettingChanged(BUTTON_MEM_USAGE_PROPERTY, Visibility.Visible, new TaskPaneAttribute(Properties.Visuals.settingMemUsageOff,
     127        Properties.Visuals.settingMemUsageOff_ToolTip, Properties.Visuals.settingGroupMisc, 5, false, DisplayLevel.Beginner, ControlType.Button));
     128     */
     129
     130    // these 2 functions are for disabling stuff in the settings pane
     131    private void SettingChanged(string setting, Visibility vis)
     132    {
     133        if (TaskPaneAttributeChanged != null)
     134        {
     135            TaskPaneAttributeChanged(this, new TaskPaneAttributeChangedEventArgs(new TaskPaneAttribteContainer(setting, vis)));
     136        }
     137    }
     138
     139    private void SettingChanged(string setting, Visibility vis, TaskPaneAttribute tpa)
     140    {
     141        if (TaskPaneAttributeChanged != null)
     142        {
     143            TaskPaneAttributeChanged(this, new TaskPaneAttributeChangedEventArgs(new TaskPaneAttribteContainer(setting, vis, tpa)));
     144        }
    111145    }
    112146
Note: See TracChangeset for help on using the changeset viewer.