public MainWindowViewModel() { NivelAcceso = LoginViewModel.NivelAcceso; NavCommand = new CommandBotones <string>(_ControlBotones); //Path p = new Path //{ // Data = Application.Current.Resources["PawIcon"] as Geometry, // Fill = Application.Current.Resources["CasiNegroBrush"] as SolidColorBrush, // Stretch = Stretch.Uniform, // Width = 300 //}; Visible1 = Visibility.Hidden; Visible2 = Visibility.Visible; RaisePropertyChanged("Visible1"); RaisePropertyChanged("Visible2"); //VistaContenida = p; }
public VerCitaViewModel() : base() { BotonesCommand = new CommandBotones <string>(ControlBotones); ObservableCollection <DatosBotones> datos = new ObservableCollection <DatosBotones> { // new CommandVM{ CommandDisplay="Insert", IconGeometry=Application.Current.Resources["InsertIcon"] as Geometry , Message=new CommandMessage{ Command =CommandType.Insert}}, // new CommandVM{ CommandDisplay="Edit", IconGeometry=Application.Current.Resources["EditIcon"] as Geometry , Message=new CommandMessage{ Command = CommandType.Edit}}, new DatosBotones { Nombre = "Guradar", Icono = Application.Current.Resources["SaveIcon"] as Geometry, Comando = BotonesCommand, CP = "Commit" }, new DatosBotones { Nombre = "Actualizar", Icono = Application.Current.Resources["RefreshIcon"] as Geometry, Comando = BotonesCommand, CP = "Refresh" } }; Datos = datos; RaisePropertyChanged("Datos"); }
public CobrarViewModel() : base() { BotonesCommand = new CommandBotones <string>(ControlBotones); ObservableCollection <DatosBotones> datos = new ObservableCollection <DatosBotones> { // new CommandVM{ CommandDisplay="Insert", IconGeometry=Application.Current.Resources["InsertIcon"] as Geometry , Message=new CommandMessage{ Command =CommandType.Insert}}, // new CommandVM{ CommandDisplay="Edit", IconGeometry=Application.Current.Resources["EditIcon"] as Geometry , Message=new CommandMessage{ Command = CommandType.Edit}}, new DatosBotones { Nombre = "Borrar", Icono = Application.Current.Resources["DeleteIcon"] as Geometry, Comando = BotonesCommand, CP = "Delete" }, new DatosBotones { Nombre = "Borrar todo", Icono = Application.Current.Resources["DeleteAllIcon"] as Geometry, Comando = BotonesCommand, CP = "DeleteAll" }, new DatosBotones { Nombre = "Cobrar", Icono = Application.Current.Resources["ConfirmIcon"] as Geometry, Comando = BotonesCommand, CP = "Commit" } }; Datos1 = datos; RaisePropertyChanged("Datos1"); datos = new ObservableCollection <DatosBotones> { // new CommandVM{ CommandDisplay="Insert", IconGeometry=Application.Current.Resources["InsertIcon"] as Geometry , Message=new CommandMessage{ Command =CommandType.Insert}}, // new CommandVM{ CommandDisplay="Edit", IconGeometry=Application.Current.Resources["EditIcon"] as Geometry , Message=new CommandMessage{ Command = CommandType.Edit}}, new DatosBotones { Nombre = "Añadir al ticket", Icono = Application.Current.Resources["AddIcon"] as Geometry, Comando = BotonesCommand, CP = "Add" }, new DatosBotones { Nombre = "Recargar", Icono = Application.Current.Resources["RefreshIcon"] as Geometry, Comando = BotonesCommand, CP = "Refresh" }, }; Datos2 = datos; RaisePropertyChanged("Datos2"); CargarClientes(); }
public LoginViewModel() { SalirCommand = new CommandCerrar(Salir); BotonesCommand = new CommandBotones <string>(ControlBotones); }