Exemple #1
0
        protected void GenerateLine(Adjacent frame)
        {
            // At some point I'm going to change this so column visibility is checked only once
            // And not for every row in a datagrid

            foreach (int columnIndex in selectedColumns)
            {
                if (dataGrid.Columns[columnIndex].HeaderText != "Flip Sequence" &&
                    dataGrid.Columns[columnIndex].HeaderText != "Seed")
                {
                    sb.AppendFormat("{0:" + dataGrid.Columns[columnIndex].DefaultCellStyle.Format + "}",
                                    frame.GetType().GetProperty(dataGrid.Columns[columnIndex].DataPropertyName).GetValue
                                        (frame, null));
                    sb.Append("\t");
                }
                else
                {
                    sb.AppendFormat("{0:" + dataGrid.Columns[columnIndex].DefaultCellStyle.Format + "}",
                                    frame.GetType().GetProperty(dataGrid.Columns[columnIndex].DataPropertyName).GetValue
                                        (frame, null));
                    sb.Append("\t");
                }
            }

            sb.Append(Environment.NewLine);
        }
Exemple #2
0
        protected void GenerateLine(Adjacent frame)
        {
            // At some point I'm going to change this so column visibility is checked only once
            // And not for every row in a datagrid

            foreach (int columnIndex in selectedColumns)
            {
                if (dataGrid.Columns[columnIndex].HeaderText != "Flip Sequence" &&
                    dataGrid.Columns[columnIndex].HeaderText != "Seed")
                {
                    sb.AppendFormat("{0:" + dataGrid.Columns[columnIndex].DefaultCellStyle.Format + "}",
                                    frame.GetType().GetProperty(dataGrid.Columns[columnIndex].DataPropertyName).GetValue
                                        (frame, null));
                    sb.Append("\t");
                }
                else
                {
                    sb.AppendFormat("{0:" + dataGrid.Columns[columnIndex].DefaultCellStyle.Format + "}",
                                    frame.GetType().GetProperty(dataGrid.Columns[columnIndex].DataPropertyName).GetValue
                                        (frame, null));
                    sb.Append("\t");
                }
            }

            sb.Append(Environment.NewLine);
        }