예제 #1
0
        private void AddUser_Click(object sender, RoutedEventArgs e)
        {
            //pass to child like this: ChildWindow child= new ChildWindow("abc","somevalue");
            UserWindow subWindow = new UserWindow("", "", "", "new");

            subWindow.Owner = this;

            subWindow.passUserDetailsToParent += returnedCredManager => AddToDgUser(returnedCredManager);
            subWindow.Show();
        }
예제 #2
0
        private void btnModifyUser_Click(object sender, RoutedEventArgs e)
        {
            var selectedItem = dgUsers.SelectedItem;

            if (selectedItem != null)
            {
                var currentItem = dgUsers.SelectedItem as CredentialManager;


                UserWindow subWindow = new UserWindow(currentItem.userName, currentItem.userDomain, "", "edit");
                subWindow.Owner = this;

                subWindow.passUserDetailsToParent += returnedCredManager => EditDgUser(returnedCredManager);
                subWindow.Show();
            }
        }