コード例 #1
0
        public static List <string> GetDataGridSelection(String instructionText, String instructionTextBoxText, String title, List <BasicDeviceInfo> inputData)
        {
            DataGridInput inputWindow = new DataGridInput();

            inputWindow.instructionTextBlock.Text = instructionText;
            inputWindow.radioGrid.ItemsSource     = inputData;
            inputWindow.inputTextBox.Text         = instructionTextBoxText;
            inputWindow.Title = title;
            inputWindow.ShowDialog();
            string inputTextBoxData = inputWindow.inputTextBox.Text;

            return(inputWindow.inputTextBox.Text.Split('|').ToList());
        }
コード例 #2
0
        /// <summary>
        /// Gets a DataGrid input. When the user clicks on a row in the DataGrid, you get that row, back as a List<string>.
        /// </summary>
        /// <param name="instructionText">The header text at the top of the window.</param>
        /// <param name="instructionTextBoxText">The text that will go in the optional manual input box.</param>
        /// <param name="title">The window title.</param>
        /// <param name="inputData">An object containing data for the DataTable.</param>
        /// <returns></returns>
        public static List <string> GetDataGridSelection(String instructionText, String instructionTextBoxText, String title, List <OrgUnit> inputData)
        {
            DataGridInput inputWindow = new DataGridInput();

            inputWindow.instructionTextBlock.Text = instructionText;
            inputWindow.radioGrid.ItemsSource     = inputData;
            inputWindow.inputTextBox.Text         = instructionTextBoxText;
            inputWindow.Title = title;
            inputWindow.Owner = Application.Current.MainWindow;
            inputWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            inputWindow.ShowDialog();
            string inputTextBoxData = inputWindow.inputTextBox.Text;

            return(inputWindow.inputTextBox.Text.Split('|').ToList());
        }