Changeset 230


Ignore:
Timestamp:
Mar 4, 2009, 10:25:47 PM (13 years ago)
Author:
Thomas Schmid
Message:
  • prepared GUI update event
Location:
trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPluginBase/Enums.cs

    r4 r230  
    233233        TextBox,
    234234        ComboBox,
    235         /// <summary>
    236         /// not implemented yet
    237         /// </summary>
    238235        RadioButton,
    239236        CheckBox,
     
    284281      Normal, Disabled
    285282    }
     283
     284    public enum StatusChangedMode
     285    {
     286      ImageUpdate, Presentation, QuickWatchPresentation
     287    }
    286288}
  • trunk/CrypPluginBase/EventArgs.cs

    r4 r230  
    211211  {
    212212    public readonly int ImageIndex;
    213 
    214     public StatusEventArgs(int imageIndex)
     213    public readonly StatusChangedMode StatusChangedMode;
     214
     215    public StatusEventArgs(StatusChangedMode statusChangedMode, int imageIndex)
    215216    {
    216217      this.ImageIndex = imageIndex;
    217     }
    218   }
    219 
    220   //message, this, logLevel
     218      this.StatusChangedMode = statusChangedMode;
     219    }
     220
     221    public StatusEventArgs(StatusChangedMode statusChangedMode)
     222    {
     223      if (statusChangedMode == StatusChangedMode.ImageUpdate)
     224      {
     225        throw new ArgumentException("statusChangedMode");
     226      }
     227      this.StatusChangedMode = statusChangedMode;
     228    }
     229  }
     230 
    221231  public class GuiLogEventArgs : EventArgs
    222232  {
  • trunk/CrypPlugins/AES/AESSettings.cs

    r4 r230  
    347347        private void ChangePluginIcon(int Icon)
    348348        {
    349           if (OnPluginStatusChanged != null) OnPluginStatusChanged(null, new StatusEventArgs(Icon));
     349          if (OnPluginStatusChanged != null) OnPluginStatusChanged(null, new StatusEventArgs(StatusChangedMode.ImageUpdate, Icon));
    350350        }
    351351    }
  • trunk/CrypPlugins/Contains/Contains.cs

    r4 r230  
    358358        OnPropertyChanged("Result");
    359359        if (result)
    360           EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(1));
     360          EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(StatusChangedMode.ImageUpdate, 1));
    361361        else
    362           EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(2));
     362          EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(StatusChangedMode.ImageUpdate, 2));
    363363      }
    364364    }
  • trunk/CrypPlugins/DES/DESSettings.cs

    r4 r230  
    8080        private void ChangePluginIcon(int Icon)
    8181        {
    82             if (OnPluginStatusChanged != null) OnPluginStatusChanged(null, new StatusEventArgs(Icon));
     82            if (OnPluginStatusChanged != null) OnPluginStatusChanged(null, new StatusEventArgs(StatusChangedMode.ImageUpdate, Icon));
    8383        }
    8484
  • trunk/CrypPlugins/HIGHT/HIGHT.cs

    r147 r230  
    774774        private void StatusChanged(int imageIndex)
    775775        {
    776             EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(imageIndex));
     776            EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(StatusChangedMode.ImageUpdate, imageIndex));
    777777        }
    778778
  • trunk/CrypPlugins/IncDec/IncDec.cs

    r136 r230  
    233233        {
    234234          case IncDecSettings.Operator.Increment:
    235             EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(0));
     235            EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(StatusChangedMode.ImageUpdate, 0));
    236236            break;
    237237          case IncDecSettings.Operator.Decrement:
    238             EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(1));
     238            EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(StatusChangedMode.ImageUpdate, 1));
    239239            break;
    240240          default:
  • trunk/CrypPlugins/Internet_frame_generator/Internet_frame_generator/Internet_frame_generatorSettings.cs

    r124 r230  
    9999            if (OnPluginStatusChanged != null)
    100100            {
    101                 OnPluginStatusChanged(null, new StatusEventArgs(Icon));
     101                OnPluginStatusChanged(null, new StatusEventArgs(StatusChangedMode.ImageUpdate, Icon));
    102102            }
    103103        }
  • trunk/CrypPlugins/RC2/RC2Settings.cs

    r4 r230  
    283283        private void ChangePluginIcon(int Icon)
    284284        {
    285             if (OnPluginStatusChanged != null) OnPluginStatusChanged(null, new StatusEventArgs(Icon));
     285          if (OnPluginStatusChanged != null) OnPluginStatusChanged(null, new StatusEventArgs(StatusChangedMode.ImageUpdate, Icon));
    286286        }
    287287    }
  • trunk/CrypPlugins/SmartCard/SmartCard.cs

    r202 r230  
    3535      if (OnPluginStatusChanged != null)
    3636      {
    37         OnPluginStatusChanged(this, new StatusEventArgs(imageNumber));
     37        OnPluginStatusChanged(this, new StatusEventArgs(StatusChangedMode.ImageUpdate, imageNumber));
    3838      }
    3939    }
  • trunk/CrypPlugins/SmartInterpreter/SmartInterpreter.cs

    r204 r230  
    4040      if (OnPluginStatusChanged != null)
    4141      {
    42         OnPluginStatusChanged(this, new StatusEventArgs(imageNumber));
     42        OnPluginStatusChanged(this, new StatusEventArgs(StatusChangedMode.ImageUpdate, imageNumber));
    4343      }
    4444    }
  • trunk/CrypPlugins/StreamComparator/StreamComparator.cs

    r4 r230  
    477477    private void StatusChanged(int imageIndex)
    478478    {
    479       EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(imageIndex));
     479      EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(StatusChangedMode.ImageUpdate, imageIndex));
    480480    }
    481481    #endregion
  • trunk/CrypPlugins/TEA/TEA.cs

    r84 r230  
    463463        private void StatusChanged(int imageIndex)
    464464        {
    465             EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(imageIndex));
     465            EventsHelper.StatusChanged(OnPluginStatusChanged, this, new StatusEventArgs(StatusChangedMode.ImageUpdate, imageIndex));
    466466        }
    467467
  • trunk/CrypPlugins/TripleDES/TripleDESSettings.cs

    r4 r230  
    8080        private void ChangePluginIcon(int Icon)
    8181        {
    82             if (OnPluginStatusChanged != null) OnPluginStatusChanged(null, new StatusEventArgs(Icon));
     82            if (OnPluginStatusChanged != null) OnPluginStatusChanged(null, new StatusEventArgs(StatusChangedMode.ImageUpdate, Icon));
    8383        }
    8484    }
  • trunk/CrypPlugins/WEP/WEP/WEPSettings.cs

    r124 r230  
    7575            if (OnPluginStatusChanged != null)
    7676            {
    77                 OnPluginStatusChanged(null, new StatusEventArgs(Icon));
     77                OnPluginStatusChanged(null, new StatusEventArgs(StatusChangedMode.ImageUpdate, Icon));
    7878            }
    7979        }
  • trunk/CrypPlugins/WEPAttacks/WEPAttacks/WEPAttacksSettings.cs

    r218 r230  
    125125            if (OnPluginStatusChanged != null)
    126126            {
    127                 OnPluginStatusChanged(null, new StatusEventArgs(Icon));
     127                OnPluginStatusChanged(null, new StatusEventArgs(StatusChangedMode.ImageUpdate, Icon));
    128128            }
    129129        }
Note: See TracChangeset for help on using the changeset viewer.