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

            subWindow.Owner = this;

            subWindow.passDomainDetailsToParent += returnedDomain => AddToDgDomain(returnedDomain);
            subWindow.Show();
        }
Beispiel #2
0
        private void btnModifyDomain_Click(object sender, RoutedEventArgs e)
        {
            var selectedItem = dgDomains.SelectedItem;

            if (selectedItem != null)
            {
                var currentItem = dgDomains.SelectedItem as domainObject;

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

                subWindow.passDomainDetailsToParent += returneddomain => EditDgDomain(returneddomain);
                subWindow.Show();
            }
        }