Esempio n. 1
0
        private void manageUsersClicked(object sender, RoutedEventArgs e)
        {
            MenuItem menuItem = e.Source as MenuItem;

            if (menuItem == null)
            {
                return;
            }
            GroupModel group = menuItem.DataContext as GroupModel;

            if (group == null)
            {
                return;
            }
            ManageUsersDialog dialog = new ManageUsersDialog();

            dialog.Owner = this;
            var serviceLocator = this.FindResource <ModelServiceLocator>("serviceLocator");

            model.ShareConnection(serviceLocator.AddUserModel);
            dialog.SetGroup(group);
            dialog.ShowDialog();
        }
 private void manageUsersClicked(object sender, RoutedEventArgs e)
 {
     MenuItem menuItem = e.Source as MenuItem;
     if (menuItem == null)
     {
         return;
     }
     GroupModel group = menuItem.DataContext as GroupModel;
     if (group == null)
     {
         return;
     }
     ManageUsersDialog dialog = new ManageUsersDialog();
     dialog.Owner = this;
     var serviceLocator = this.FindResource<ModelServiceLocator>("serviceLocator");
     model.ShareConnection(serviceLocator.AddUserModel);
     dialog.SetGroup(group);
     dialog.ShowDialog();
 }