Example #1
0
 private void Format()
 {
     try
     {
         DataTable dataTable = new TableFormatter().Format(this.InputTextBox.Text, this.FormatOptions, this.TableOptions);
         //DataTable dataTable = new DataTable();
         foreach (DataColumn dataColumn in dataTable.Columns)
         {
             DataColumn expr_3D = dataColumn;
             expr_3D.ColumnName += string.Format("{0}({1})", Environment.NewLine, dataColumn.DataType);
         }
         this.OutputDataTable.ItemsSource = dataTable.AsDataView();
     }
     catch (Exception ex)
     {
         Window window = Window.GetWindow(this);
         if (window != null)
         {
             SharedObject.Instance.Output(SharedObject.enOutputType.Error, "", ex);
         }
         else
         {
             SharedObject.Instance.Output(SharedObject.enOutputType.Error, "", ex);
         }
         Trace.TraceError(ex.Message);
     }
 }