private void EditSpawnButton_Click(object sender, RoutedEventArgs e) { if (RoamAreaViewModel.SelectedArea != null) { var window = new PropertyEditorWindow(RoamAreaViewModel.SelectedArea); window.ShowDialog(); RoamAreaViewModel.SelectedArea = RoamAreaViewModel.SelectedArea; } }
public GridsRibbonTabViewModel([Dependency("GridsDataService")] GridsDataService service) : base(service) { EditMultipleCommand = new DelegateCommand( x => { var window = new PropertyEditorWindow(SelectedWaypoints); window.ShowDialog(); }, x => { return SelectedWaypoints != null && SelectedWaypoints.Count() > 1; }); }
private void EditGroundSpawnButton_Click(object sender, RoutedEventArgs e) { if (GroundSpawnsViewModel.SelectedGroundSpawn != null) { var selSpawn = GroundSpawnsViewModel.SelectedGroundSpawn; if (GroundSpawnsViewModel.SelectedGroundSpawns != null) { List<EQEmu.GroundSpawns.GroundSpawn> spawns = new List<EQEmu.GroundSpawns.GroundSpawn>(); spawns.Add(selSpawn); foreach (var sp in GroundSpawnsViewModel.SelectedGroundSpawns.Where(x => { return x != selSpawn; })) { spawns.Add(sp); } var window = new PropertyEditorWindow(spawns); window.ShowDialog(); } else { var window = new PropertyEditorWindow(GroundSpawnsViewModel.GroundSpawnsService.SelectedGroundSpawn); window.ShowDialog(); } } }
private void Button_Click(object sender, RoutedEventArgs e) { if( NPCDataGrid.SelectedItems.Count > 1 ) { var window = new PropertyEditorWindow(NPCDataGrid.SelectedItems.Cast<EQEmu.Spawns.Npc>()); window.ShowDialog(); NPCDataGrid.Items.Refresh(); } }
private void EditSpawnButton_Click(object sender, RoutedEventArgs e) { //TODO use commanding if (SpawnsViewModel.SelectedSpawn != null) { if (SpawnsViewModel.SelectedSpawns != null) { var window = new PropertyEditorWindow(SpawnsViewModel.SelectedSpawns); window.ShowDialog(); //TODO fix - hack to update display SpawnsViewModel.SelectedSpawns = SpawnsViewModel.SelectedSpawns; } else { var window = new PropertyEditorWindow(SpawnsViewModel.SelectedSpawn); window.ShowDialog(); } //TODO fix - this is a hack to update the display SpawnsViewModel.SelectedSpawn = SpawnsViewModel.SelectedSpawn; } }
private void EditGridButton_Click(object sender, RoutedEventArgs e) { var window = new PropertyEditorWindow(GridsViewModel.SelectedGrid); window.ShowDialog(); //TODO hack to update display var waypoint = GridsViewModel.SelectedWaypoint; var grid = GridsViewModel.SelectedGrid; this.GridsViewModel.SelectedGrid = grid; this.GridsViewModel.SelectedWaypoint = waypoint; }
private void EditWaypointButton_Click(object sender, RoutedEventArgs e) { PropertyEditorWindow window = null; if (GridsViewModel.SelectedWaypoints != null) { window = new PropertyEditorWindow(GridsViewModel.SelectedWaypoints); } else { window = new PropertyEditorWindow(GridsViewModel.SelectedWaypoint); } window.ShowDialog(); //TODO hack to update display... probably need to add an event for when dirtied var waypoint = GridsViewModel.SelectedWaypoint; var grid = GridsViewModel.SelectedGrid; this.GridsViewModel.SelectedGrid = grid; this.GridsViewModel.SelectedWaypoint = waypoint; GridsViewModel.SelectedWaypoints = GridsViewModel.SelectedWaypoints; }