internal void DownloadCompleted(MTModel model, object sender, AsyncCompletedEventArgs e) { model.InstallStatus = "Extracting"; this.modelManager.ExtractModel(model.ModelPath); model.InstallStatus = "Installed"; this.modelManager.GetLocalModels(); }
public TagEditWindow(MTModel selectedModel) { this.Model = selectedModel; this.DataContext = selectedModel; this.Title = $"Edit tags for {Model.Name}"; InitializeComponent(); this.TagList.ItemsSource = selectedModel.ModelConfig.ModelTags; }
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)); } }
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(); }
public ModelCustomizerWindow(MTModel selectedModel) { this.selectedModel = selectedModel; this.Title = $"Customize model {this.selectedModel.Name}"; InitializeComponent(); }