/// <summary> /// Inicializa el ViewModel /// </summary> private void InitViewModel() { // Combo de formato de los archivos ComboFormat = new ComboViewModel(this); ComboFormat.AddItem((int)Application.SolutionManager.FormatType.Parquet, "Parquet"); ComboFormat.AddItem((int)Application.SolutionManager.FormatType.Csv, "CSV"); ComboFormat.SelectedItem = ComboFormat.Items[0]; // Asigna las propiedades ValidateFiles = true; MountPathVariable = "MountPath"; MountPathContent = "/mnt/c/Test"; DataBaseComputeVariable = "DbCompute"; DataBaseValidateVariable = "DbValidate"; PathValidate = "Validate"; TablePrefixes = "SRC_;EXT_;TRN_"; GenerateQvs = true; OutputPath = string.Empty; CompareString = true; DateFormat = "d/M/yyyy"; DecimalSeparator = ","; DecimalType = "decimal(10, 2)"; CompareOnlyAlphaAndDigits = true; // Carga el árbol de conexiones TreeConnection.LoadConnection(ComboConnections.GetSelectedConnection()); // Indica que no ha habido modificaciones IsUpdated = false; }
public CreateValidationScriptsViewModel(DbStudioViewModel solutionViewModel) { // Inicializa las propiedades SolutionViewModel = solutionViewModel; ComboConnections = new Connections.ComboConnectionsViewModel(SolutionViewModel, string.Empty); ComboConnections.Connections.PropertyChanged += (sender, args) => { if (args.PropertyName.Equals(nameof(ComboConnections.Connections.SelectedItem))) { TreeConnection.LoadConnection(ComboConnections.GetSelectedConnection()); } }; TreeConnection = new Explorers.Connections.TreeConnectionTablesViewModel(SolutionViewModel); // Inicializa el viewModel InitViewModel(); }