Esempio n. 1
0
 internal void DownloadCompleted(MTModel model, object sender, AsyncCompletedEventArgs e)
 {
     model.InstallStatus = "Extracting";
     this.modelManager.ExtractModel(model.ModelPath);
     model.InstallStatus = "Installed";
     this.modelManager.GetLocalModels();
 }
Esempio n. 2
0
 public TagEditWindow(MTModel selectedModel)
 {
     this.Model       = selectedModel;
     this.DataContext = selectedModel;
     this.Title       = $"Edit tags for {Model.Name}";
     InitializeComponent();
     this.TagList.ItemsSource = selectedModel.ModelConfig.ModelTags;
 }
Esempio n. 3
0
 private void btnInstall_Click(object sender, RoutedEventArgs e)
 {
     foreach (object selected in this.ModelListView.SelectedItems)
     {
         MTModel selectedModel = (MTModel)selected;
         selectedModel.InstallStatus = "Downloading";
         this.modelManager.DownloadModel(
             selectedModel.ModelPath,
             selectedModel.DownloadProgressChanged,
             (x, y) => DownloadCompleted(selectedModel, x, y));
     }
 }
Esempio n. 4
0
 public MarianCustomizer(
     MTModel model,
     FileInfo customSource,
     FileInfo customTarget,
     FileInfo validationSource,
     FileInfo validationTarget,
     string customLabel,
     bool includePlaceholderTags,
     bool includeTagPairs,
     DirectoryInfo customDir)
 {
     this.modelDir               = new DirectoryInfo(model.InstallDir);
     this.customDir              = customDir;
     this.customSource           = customSource;
     this.customTarget           = customTarget;
     this.customLabel            = customLabel;
     this.includePlaceholderTags = includePlaceholderTags;
     this.includeTagPairs        = includeTagPairs;
     this.validationSource       = validationSource;
     this.validationTarget       = validationTarget;
     this.sourceCode             = model.SourceLanguageString;
     this.targetCode             = model.TargetLanguageString;
 }
 public TranslateWindow(MTModel selectedModel)
 {
     this.Model = selectedModel;
     this.Title = $"Translating with model {Model.Name}";
     InitializeComponent();
 }
Esempio n. 6
0
 public ModelCustomizerWindow(MTModel selectedModel)
 {
     this.selectedModel = selectedModel;
     this.Title         = $"Customize model {this.selectedModel.Name}";
     InitializeComponent();
 }