Ejemplo n.º 1
0
        private async void ContextMod_OnClick(object sender, RoutedEventArgs e)
        {
            var menuItem = (MenuItem)e.Source;
            var menu = (ContextMenu)menuItem.Parent;
            var list = (ListBox)menu.PlacementTarget;
            if (list?.SelectedValue == null) return;

            var wind = new AddPompe((Guid)list.SelectedValue) { Owner = Window.GetWindow(this) };
            wind.ShowDialog();
            await Refresh();
        }
Ejemplo n.º 2
0
 private async void AddButon_Click(object sender, RoutedEventArgs e)
 {            
     var wind = new AddPompe(Guid.Empty) { Owner = Window.GetWindow(this) };
     wind.ShowDialog();
     await Refresh();
 }