コード例 #1
0
 protected override void OnActiveDocumentChanged()
 {
     if (_viewPartController == null)
     {
         _viewPartController =
             SdlTradosStudio.Application.GetController <RegexMatchAutoSuggestProviderViewPartController>();
     }
     if (_viewPartController != null)
     {
         if (_regexPatternEntries == null)
         {
             _regexPatternEntries = _viewPartController.RegexPatternEntries;
         }
         if (_variables == null)
         {
             _variables = _viewPartController.Variables;
         }
         if (_listChangeNotifier == null)
         {
             _listChangeNotifier          = _viewPartController.ListChangeNotifier;
             _listChangeNotifier.Changed += _listChangeNotifier_Changed;
         }
         InitializeCandidates();
     }
 }
コード例 #2
0
        public RegexMatchAutoSuggestProvider()
        {
            _viewPartController =
                SdlTradosStudio.Application.GetController <RegexMatchAutoSuggestProviderViewPartController>();
            if (_viewPartController != null)
            {
                _regexPatternEntries = _viewPartController.RegexPatternEntries;
                _variables           = _viewPartController.Variables;

                _listChangeNotifier          = _viewPartController.ListChangeNotifier;
                _listChangeNotifier.Changed += _listChangeNotifier_Changed;
            }
        }