Ejemplo n.º 1
0
 private void CloseProject()
 {
     CurrentText = null;
     _texts.Clear();
     CurrentText   = new TextViewModel(_tokenizer);
     _sourceCorpus = null;
     _targetCorpus = null;
     if (_hybridEngine != null)
     {
         _hybridEngine.Dispose();
         _hybridEngine = null;
     }
     if (_smtModel != null)
     {
         _smtModel.Dispose();
         _smtModel = null;
     }
     _saveProjectCommand.UpdateCanExecute();
     RebuildTask.UpdateCanExecute();
 }
Ejemplo n.º 2
0
        private void Unload()
        {
            if (!_isLoaded)
            {
                return;
            }

            Save();

            _hybridEngine.Dispose();
            _hybridEngine = null;

            if (_ruleEngine != null)
            {
                _ruleEngine.Dispose();
                _ruleEngine = null;
            }

            _smtEngine.Dispose();
            _smtEngine = null;
            _smtModel.Dispose();
            _smtModel = null;
            _isLoaded = false;
        }