Пример #1
0
        private void onAddButtonClick(object sender, RoutedEventArgs e)
        {
            var dialog = new CompaniesEditor();

            ModalDialog    = dialog;
            dialog.Closed += onEditDialogClosed;
            dialog.Show();
        }
Пример #2
0
        private void onEditButtonClick(object sender, RoutedEventArgs e)
        {
            if (CompaniesListView.SelectedItem == null)
            {
                return;
            }
            var dialog = new CompaniesEditor((Company)CompaniesListView.SelectedItem);

            ModalDialog    = dialog;
            dialog.Closed += onEditDialogClosed;
            dialog.Show();
        }
Пример #3
0
        private void onCompaniesListMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (CompaniesListView.SelectedItem == null || e.ChangedButton != MouseButton.Left)
            {
                return;
            }

            var dialog = new CompaniesEditor((Company)CompaniesListView.SelectedItem);

            ModalDialog    = dialog;
            dialog.Closed += onEditDialogClosed;
            dialog.Show();
        }