Exemplo n.º 1
0
        private void editBtn_Click(object sender, RoutedEventArgs e)
        {
            int indexOfSelectedItem = textTemplateDataGrid.SelectedIndex;

            if (indexOfSelectedItem > -1)
            {
                Guid textTemplateId = (textTemplateDataGrid.SelectedItem as TextTemplate).TextTemplateId;
                NewEditTextTemplateWindow editTextTemplateWindow = new NewEditTextTemplateWindow(textTemplateId);
                editTextTemplateWindow.ShowDialog();
                if (editTextTemplateWindow.DialogResult.HasValue && editTextTemplateWindow.DialogResult.Value)
                {
                    DoSearch();
                }
            }
        }
Exemplo n.º 2
0
        private void textTemplateDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            int indexOfSelectedItem = (sender as DataGrid).SelectedIndex;

            if (indexOfSelectedItem > -1)
            {
                Guid textTemplateId = (textTemplateDataGrid.SelectedItem as TextTemplate).TextTemplateId;
                NewEditTextTemplateWindow editTextTemplateWindow = new NewEditTextTemplateWindow(textTemplateId);
                editTextTemplateWindow.ShowDialog();
                if (editTextTemplateWindow.DialogResult.HasValue && editTextTemplateWindow.DialogResult.Value)
                {
                    DoSearch();
                }
            }
        }
Exemplo n.º 3
0
        private void newBtn_Click(object sender, RoutedEventArgs e)
        {
            NewEditTextTemplateWindow newEditTextTemplateWindow = new NewEditTextTemplateWindow();

            newEditTextTemplateWindow.ShowDialog();
        }