public void init(Main window,MainViewModel viewModel,PuntoMedicionModel model ) { this.parent = window; this.vm = viewModel; pmViewModel.LoadPuntoMedicion(model); this.DataContext = pmViewModel; EnRoll(); }
public void init(Main window,CategoriasViewModel model) { this.parent = window; this.categoriaViewModel = model; pmViewModel.LoadPuntoMedicion(model.SelectedItem); this.DataContext = pmViewModel; EnRoll(); }
void vm_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { try { if (e.PropertyName == "Usuario") { LoginViewModel login = (LoginViewModel)sender; if (login.Usuario != null) { Main view = new Main(login.Usuario); view.Show(); this.Close(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void init(Main mw, MainViewModel viewModel) { this.vm = viewModel; this.parent = mw; EnRoll(); }