Ignore:
Timestamp:
Jun 21, 2009, 3:32:11 PM (13 years ago)
Author:
Thomas Schmid
Message:
  • new public setup
  • added TaskPaneAttributeChanged sample to Caesar plugin
  • moved TaskPaneAttributeChanged from IPlugin to ISettings
  • updated project samples
Location:
trunk/CrypPlugins/Caesar
Files:
2 edited

Legend:

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

    r363 r364  
    122122            {
    123123              settings.ShiftKey = value;
     124              // Execute();
    124125            }
    125126          }
     
    165166          set { settings.HasChanges = value; }
    166167        }
    167 
    168         public event TaskPaneAttributeChangedHandler TaskPaneAttributeChanged;
    169168
    170169        /// <summary>
     
    353352                    break;
    354353            }
    355             if (this.TaskPaneAttributeChanged != null)
    356             {
    357               TaskPaneAttributeChanged(this, new TaskPaneAttributeChangedEventArgs("Action", System.Windows.Visibility.Collapsed));
    358             }
    359354        }
    360355
  • trunk/CrypPlugins/Caesar/CaesarSettings.cs

    r344 r364  
    7979        private UnknownSymbolHandlingMode unknownSymbolHandling = UnknownSymbolHandlingMode.Ignore;
    8080        private int caseSensitiveAlphabet = 0; // 0 = case insensitve, 1 = case sensitive
     81        private bool sensitivityEnabled = true;
    8182        #endregion
    8283
     
    303304        #endregion
    304305
    305 
     306        #region TaskPaneAttributeChanged-Sample
     307        /// <summary>
     308        /// This event is just used here for sample reasons
     309        /// </summary>
     310        public event TaskPaneAttributeChangedHandler TaskPaneAttributeChanged;
     311
     312        [TaskPane("Enable/Disable sensitivity", "This setting is just a sample and shows how to enable / disable a setting.", "AttributeChangedSample", 8, false, DisplayLevel.Beginner, ControlType.Button)]
     313        public void EnableDisableSesitivity()
     314        {
     315          if (TaskPaneAttributeChanged!= null)
     316          {
     317            sensitivityEnabled = !sensitivityEnabled;
     318            if (sensitivityEnabled)
     319            {
     320              TaskPaneAttributeChanged(this, new TaskPaneAttributeChangedEventArgs("AlphabetCase", Visibility.Visible));
     321            }
     322            else
     323            {
     324              TaskPaneAttributeChanged(this, new TaskPaneAttributeChangedEventArgs("AlphabetCase", Visibility.Collapsed));
     325            }
     326          }
     327        }
     328        #endregion TaskPaneAttributeChanged-Sample
    306329    }
    307330}
Note: See TracChangeset for help on using the changeset viewer.