Ignore:
Timestamp:
Mar 25, 2010, 4:42:42 PM (12 years ago)
Author:
Matthäus Wander
Message:

AnotherEditor:

  • Editor called IPlugin.Dispose() during Save (expected non-standard behaviour of Dispose()) -> changed to not call Dispose, except when object is meant to be destroyed
  • renamed another editor-internal Dispose() method to PreSave() to better reflect the expected behaviour (PreSave() is called before serializing an object)

BooleanFunctionParser, TextInput and VigenereAnalyser were partly relying on the Dispose() call from editor during save --> changed, they use standard Dispose() behaviour now.

FileInput and FileOutput seem to rely on non-standard Dispose() as well --> can't fix, testing measures blocked by #139. Beware: FileInput/FileOutput may be broken currently.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/VigenereAnalyser/VigenereAnalyser.cs

    r725 r1258  
    392392
    393393            Presentation = vaPresentation;
    394             vaPresentation.textBoxInputText.TextChanged +=textBoxInputText_TextChanged;
    395394        }
    396395        void textBoxInputText_TextChanged(object sender, TextChangedEventArgs e)
    397396        {
    398             this.NotifyUpdate();
    399             settings.HasChanges = true;
    400            
    401         }
    402         public void NotifyUpdate()
    403         {
    404397            settings.Text = vaPresentation.textBoxInputText.Text;
    405398        }
     
    407400        {
    408401            if (vaPresentation.textBoxInputText != null)
     402            {
    409403                vaPresentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    410404                {
    411405                    vaPresentation.textBoxInputText.Text = settings.Text;
    412406                }, null);
     407            }
     408
     409            vaPresentation.textBoxInputText.TextChanged += textBoxInputText_TextChanged;
    413410        }
    414411        public void Dispose()
    415412        {
    416             settings.Text = (string)vaPresentation.textBoxInputText.Dispatcher.Invoke(
    417         DispatcherPriority.Normal, (DispatcherOperationCallback)delegate
    418         {
    419             return vaPresentation.textBoxInputText.Text;
    420         }, null);
    421         }
     413            vaPresentation.textBoxInputText.TextChanged -= textBoxInputText_TextChanged;
     414        }
     415
    422416        public void PreExecution()
    423417        {
Note: See TracChangeset for help on using the changeset viewer.