Print preview works. Working on the damn Credits box.

Signed-off-by: Melissa Avery-Weir <melissa.avery@wellsfargo.com>
This commit is contained in:
Melissa Avery-Weir
2011-09-23 16:29:56 -04:00
parent afdd8d0b17
commit ddd0ae85a9
49 changed files with 2484 additions and 278 deletions

Binary file not shown.

View File

@@ -0,0 +1,270 @@
using System;
using System.Linq;
using System.Windows.Forms;
using System.Drawing;
namespace Printing.DataGridViewPrint
{
/// <author>Blaise Braye</author>
/// <summary>
/// usefull extentions to DataGridView components
/// </summary>
public static class DataGridViewExtentions
{
/// <returns>affected Font to the cell</returns>
public static Font Font(this DataGridViewCell cell)
{
return (cell.HasStyle && cell.Style.Font != null) ?
cell.Style.Font : cell.InheritedStyle.Font;
}
/// <summary>
/// Multiply the cell font with scale
/// </summary>
/// <param name="cell"></param>
/// <param name="scale">percentage of font size</param>
/// <returns>Scaled Font</returns>
public static Font Font(this DataGridViewCell cell, float scale)
{
Font font = Font(cell);
if (scale != 1)
font = new Font(font.FontFamily,font.Size * scale);
return font;
}
/// <summary>
/// Get the forecolor of the cell
/// </summary>
/// <param name="cell"></param>
/// <returns>ForeColor of the cell</returns>
public static Color ForeColor(this DataGridViewCell cell)
{
if (cell.HasStyle && cell.Style.ForeColor != Color.Empty) return cell.Style.ForeColor;
else return cell.InheritedStyle.ForeColor;
}
/// <summary>
/// Get the BackColor of the cell
/// </summary>
/// <param name="cell"></param>
/// <returns>BackColor of the cell</returns>
public static Color BackColor(this DataGridViewCell cell)
{
if (cell.HasStyle && cell.Style.BackColor != Color.Empty) return cell.Style.BackColor;
else return cell.InheritedStyle.BackColor;
}
/// <summary>
/// Get the BackColor of the column headers of the gridview
/// </summary>
/// <param name="gridView"></param>
/// <returns>BackColor of the cell</returns>
public static Color ColumnsHeaderBackColor(this DataGridView gridView){
return (!gridView.ColumnHeadersDefaultCellStyle.BackColor.IsEmpty)
? gridView.ColumnHeadersDefaultCellStyle.BackColor : gridView.DefaultCellStyle.BackColor;
}
/// <summary>
/// Get the forecolor of the row
/// </summary>
/// <param name="row"></param>
/// <returns>ForeColor of the row</returns>
public static Color ForeColor(this DataGridViewRow row)
{
if (row.HasDefaultCellStyle && row.DefaultCellStyle.ForeColor != Color.Empty)
return row.DefaultCellStyle.ForeColor;
else return row.InheritedStyle.ForeColor;
}
/// <summary>
/// Get the BackColor of the row
/// </summary>
/// <param name="row"></param>
/// <returns>BackColor of the row</returns>
public static Color BackColor(this DataGridViewRow row)
{
if (row.Index % 2 == 0 || row.DataGridView.AlternatingRowsDefaultCellStyle.BackColor.IsEmpty)
{
if (row.HasDefaultCellStyle && row.DefaultCellStyle.BackColor != Color.Empty)
return row.DefaultCellStyle.BackColor;
else return row.InheritedStyle.BackColor;
}
else
{
return row.DataGridView.AlternatingRowsDefaultCellStyle.BackColor;
}
}
/// <summary>
/// Get text horizontal alignement in given cell
/// </summary>
/// <param name="cell"></param>
/// <returns>text horizontal alignement in given cell</returns>
public static StringAlignment HorizontalAlignement(this DataGridViewCell cell)
{
DataGridViewContentAlignment alignement = DataGridViewContentAlignment.TopLeft;
if (cell.HasStyle && cell.Style.Alignment != DataGridViewContentAlignment.NotSet)
alignement = cell.Style.Alignment;
else alignement = cell.InheritedStyle.Alignment;
// Check the CurrentCell alignment and apply it to the CellFormat
if (alignement.ToString().Contains("Right"))
return StringAlignment.Far;
else if (alignement.ToString().Contains("Center"))
return StringAlignment.Center;
else
return StringAlignment.Near;
}
/// <summary>
/// Calculate the height of a DataGridViewRow in a drawing surface,
/// it doesn't make calculation with hidden cells
/// </summary>
/// <param name="row"></param>
/// <param name="g"></param>
/// <returns>row height</returns>
public static float RowHeight(this DataGridViewRow row, Graphics g)
{
return (from cell in row.Cells.OfType<DataGridViewCell>()
where cell.Visible
select g.MeasureString(
cell.EditedFormattedValue.ToString(),
cell.Font(),
cell.Size.Width).Height).Max();
}
/// <summary>
/// Multiply row height with scale value
/// </summary>
/// <param name="row"></param>
/// <param name="g"></param>
/// <param name="scale"></param>
/// <returns>Scaled height</returns>
public static float RowHeight(this DataGridViewRow row, Graphics g, float scale)
{
return RowHeight(row, g) * scale;
}
/// <summary>
/// Calculate the height of a cell in a drawing surface
/// </summary>
/// <param name="cell"></param>
/// <param name="g"></param>
/// <returns>cell row height</returns>
public static float RowHeight(this DataGridViewCell cell, Graphics g)
{
return cell.OwningRow.RowHeight(g);
}
/// <summary>
/// Multiply cell height with scale value
/// </summary>
/// <param name="cell"></param>
/// <param name="g"></param>
/// <param name="scale"></param>
/// <returns>Scaled cell height</returns>
public static float RowHeight(this DataGridViewCell cell, Graphics g, float scale)
{
return RowHeight(cell, g) * scale;
}
/// <summary>
/// Calculate the header height of a DataGridView in a drawing surface,
/// it takes care only about visible columns
/// </summary>
/// <param name="dgv"></param>
/// <param name="g"></param>
/// <returns>DataGridView Columns Header Height</returns>
public static float HeaderHeight(this DataGridView dgv, Graphics g)
{
return (from column in dgv.Columns.OfType<DataGridViewColumn>()
where column.Visible
select g.MeasureString(
column.HeaderCell.EditedFormattedValue.ToString(),
column.HeaderCell.Font(),
column.HeaderCell.Size.Width).Height).Max();
}
/// <summary>
/// Multiply DataGridView Columns Header Height with scale value
/// </summary>
/// <param name="dgv"></param>
/// <param name="g"></param>
/// <param name="scale"></param>
/// <returns>Scaled DataGridView Columns Header Height</returns>
public static float HeaderHeight(this DataGridView dgv, Graphics g, float scale)
{
return HeaderHeight(dgv, g) * scale;
}
/// <summary>
/// Calculate the width of a column in a drawing surface,
/// it doesn't make calculation with hidden cells
/// </summary>
/// <param name="column"></param>
/// <param name="g"></param>
/// <returns>Column width</returns>
public static float Width(this DataGridViewColumn column, Graphics g)
{
var maxCellsWidth =
(from row in column.DataGridView.Rows.OfType<DataGridViewRow>()
where row.Visible
select g.MeasureString(
row.Cells[column.Index].EditedFormattedValue.ToString(),
row.Cells[column.Index].Font(),
row.Cells[column.Index].Size.Width).Width
).Max();
return Math.Max(
maxCellsWidth,
g.MeasureString(
column.HeaderText,
column.HeaderCell.Font(),
column.HeaderCell.Size.Width).Width);
}
/// <summary>
/// Multiply column width with scale value
/// </summary>
/// <param name="column"></param>
/// <param name="g"></param>
/// <param name="scale"></param>
/// <returns>Scaled column width</returns>
public static float Width(this DataGridViewColumn column, Graphics g, float scale)
{
return Width(column, g) * scale;
}
/// <summary>
/// Calculate the width of a DataGridViewCell in a drawing surface
/// </summary>
/// <param name="cell"></param>
/// <param name="g"></param>
/// <returns>Cell width</returns>
public static float ColumnWidth(this DataGridViewCell cell, Graphics g)
{
return cell.OwningColumn.Width(g);
}
/// <summary>
/// Multiply cell width with scale value
/// </summary>
/// <param name="cell"></param>
/// <param name="g"></param>
/// <param name="scale"></param>
/// <returns>Scaled cell width</returns>
public static float ColumnWidth(this DataGridViewCell cell, Graphics g, float scale)
{
return ColumnWidth(cell, g) * scale;
}
}
}

View File

@@ -0,0 +1,85 @@
using System.Drawing.Printing;
namespace Printing.DataGridViewPrint
{
/// <author>Blaise Braye</author>
/// <summary>
/// Usefull to keep the printable coordinates of a document
/// </summary>
public class DocumentMetrics
{
/// <summary>
/// The width of the document.
/// </summary>
public int Width { get; set; }
/// <summary>
/// The height of the document.
/// </summary>
public int Height { get; set; }
/// <summary>
/// The left margin of the document.
/// </summary>
public int LeftMargin { get; set; }
/// <summary>
/// The right margin of the document.
/// </summary>
public int RightMargin { get; set; }
/// <summary>
/// The top margin of the document.
/// </summary>
public int TopMargin { get; set; }
/// <summary>
/// The bottom margin of the document.
/// </summary>
public int BottomMargin { get; set; }
/// <summary>
/// substract the margins from the document width
/// </summary>
public int PrintAbleWidth
{
get
{
return Width - LeftMargin - RightMargin;
}
}
/// <summary>
/// substract the margins from the document height
/// </summary>
public int PrintAbleHeight
{
get
{
return Height - TopMargin - BottomMargin;
}
}
/// <summary>
/// DocumentMetrics factory, take information in given PrintDocument object
/// </summary>
/// <param name="printDocument"></param>
/// <returns>printable coordinates</returns>
public static DocumentMetrics FromPrintDocument(PrintDocument printDocument)
{
PageSettings pageSettings = printDocument.DefaultPageSettings;
return new DocumentMetrics()
{
Width =
(pageSettings.Landscape)
?pageSettings.PaperSize.Height:pageSettings.PaperSize.Width,
Height =
(pageSettings.Landscape)
?pageSettings.PaperSize.Width:pageSettings.PaperSize.Height,
LeftMargin = pageSettings.Margins.Left,
TopMargin = pageSettings.Margins.Top,
RightMargin = pageSettings.Margins.Right,
BottomMargin = pageSettings.Margins.Bottom
};
}
}
}

View File

@@ -0,0 +1,625 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Drawing;
namespace Printing.DataGridViewPrint
{
/// <summary>
/// These are keys in the dictionary of printed page information.
/// </summary>
public enum CodeEnum
{
/// <summary>
/// Current sheet number.
/// </summary>
SheetNumber,
/// <summary>
/// Total sheet count.
/// </summary>
SheetsCount,
/// <summary>
/// Current date.
/// </summary>
Date,
/// <summary>
/// Current time.
/// </summary>
Time
}
/// <author>Blaise Braye</author>
/// <summary>
/// GridDraw is a DataGridView Printing tool which try to help developper to print quickly and efficiently datas from grids
/// </summary>
public class GridDrawer
{
#region Fields
static readonly Exception NotSynException = new Exception("Drawer is not synchronised with datagridview");
private DataGridView _GridView;
DocumentMetrics metrics;
float scale;
float columnHeaderHeight;
float[] rowsHeights;
float[] columnWidths;
int[] firstRows;
int[] firstColumns;
Func<DataGridViewRow, bool> rowSelector;
Func<DataGridViewColumn, bool> colSelector;
Dictionary<int, IEnumerable<Partition>> levels;
Dictionary<CodeEnum, string> codes;
#endregion
#region Properties
/// <summary>
/// This is the grid that the Drawer will print
/// </summary>
public DataGridView GridView
{
get { return _GridView; }
set
{
if (value == null)
throw new Exception("GridView must not be null");
IsInitialized = false;
this._GridView = value;
}
}
/// <summary>
/// used by Drawer to know if it has been initialized
/// </summary>
bool IsInitialized { get; set; }
/// <summary>
/// Define if you want to center grid on sheet?
/// </summary>
public bool MustCenterPartition { get; set; }
/// <summary>
/// Define if you want to ensure that grid won't be larger than printed sheet
/// </summary>
public bool MustFitColumnsToPage { get; set; }
/// <summary>
/// Define if you want to print level by level or not (partions columns by partitions columns)
/// Default value: true
/// </summary>
public bool MustPrintLevelByLevel { get; set; }
/// <summary>
/// Define if you want to print selected columns only
/// </summary>
public bool MustPrintSelectedColumns { get; set; }
/// <summary>
/// Define if you want to print selected rows only
/// </summary>
public bool MustPrintSelectedRows { get; set; }
/// <summary>
/// Define a title block which appears on first sheet only, above the grid
/// </summary>
public PrintBlock TitlePrintBlock { get; set; }
/// <summary>
/// Define a footer which appears on each sheet
/// </summary>
public PrintBlock SheetFooter { get; set; }
/// <summary>
/// Define a header which appears on each sheet
/// </summary>
public PrintBlock SheetHeader { get; set; }
/// <summary>
/// /// Once Drawer has been initialized, return the number of levels to print
/// </summary>
public int LevelsCount
{
get { return firstRows.Length; }
}
/// <summary>
/// /// Once Drawer has been initialized, return the number of partitions of one level
/// </summary>
public int PartitionsCount
{
get { return firstRows.Length; }
}
/// <summary>
/// Once Drawer has been initialized, return the number of page to print
/// </summary>
public int SheetsCount
{
get { return LevelsCount * firstColumns.Length; }
}
#endregion
#region Constructors
/// <param name="dgv">GridView to manage</param>
public GridDrawer(DataGridView dgv)
{
this.GridView = dgv;
MustPrintLevelByLevel = true;
}
/// <param name="dgv">GridView to manage</param>
/// <param name="mustCenterPartition">Do you want to center grid on sheet?</param>
public GridDrawer(DataGridView dgv, bool mustCenterPartition)
: this(dgv)
{
this.MustCenterPartition = mustCenterPartition;
}
/// <param name="dgv">GridView to manage</param>
/// <param name="mustCenterPartition">Do you want to center grid on sheet?</param>
/// <param name="mustFitColumnsToPage">Do you want to ensure that grid won't be larger than printed sheet</param>
public GridDrawer(DataGridView dgv, bool mustCenterPartition, bool mustFitColumnsToPage)
: this(dgv, mustCenterPartition)
{
this.MustFitColumnsToPage = mustFitColumnsToPage;
}
#endregion
/// <summary>
/// Make first calculations to know exactly what we can print on each sheet
/// </summary>
/// <param name="g"></param>
/// <param name="metrics"></param>
public void Initialize(Graphics g, DocumentMetrics metrics)
{
this.metrics = metrics;
#region Take care of set blocks
if (SheetHeader != null)
{
float headerHeight = SheetHeader.GetSize(g, metrics).Height;
SheetHeader.Rectangle =
new RectangleF(metrics.LeftMargin, metrics.TopMargin, metrics.PrintAbleWidth, headerHeight);
metrics.TopMargin += (int)Math.Ceiling(headerHeight);
}
if (TitlePrintBlock != null)
{
float titleHeight = TitlePrintBlock.GetSize(g, metrics).Height;
TitlePrintBlock.Rectangle =
new RectangleF(metrics.LeftMargin, metrics.TopMargin, metrics.PrintAbleWidth, titleHeight);
}
if (SheetFooter != null)
{
float footerHeight = SheetFooter.GetSize(g, metrics).Height;
metrics.BottomMargin += (int)Math.Ceiling(footerHeight);
float footerY = metrics.TopMargin + metrics.PrintAbleHeight;
SheetFooter.Rectangle =
new RectangleF(metrics.LeftMargin, footerY, metrics.PrintAbleWidth, footerHeight);
}
#endregion
columnWidths = new float[GridView.Columns.Count];
colSelector =
new Func<DataGridViewColumn, bool>(column =>
(MustPrintSelectedColumns && column.DataGridView.SelectedColumns.Count > 0)
? column.Selected
: column.Visible);
float gridWidth = 0;
// calculate the grid width to know the difference with a sheet width,
// it's usefull to determinate a scale
foreach (var column in GridView.Columns.OfType<DataGridViewColumn>()
.Where(colSelector))
{
if (column.AutoSizeMode == DataGridViewAutoSizeColumnMode.Fill && column == GridView.Columns.OfType<DataGridViewColumn>()
.Where(colSelector).Last()) {
columnWidths[column.Index] = metrics.PrintAbleWidth - gridWidth;
} else {
columnWidths[column.Index] = column.Width(g);
}
gridWidth += columnWidths[column.Index];
}
// we fix the scale to 1 if user doesn't need to zoom out the grid or if
// the gridwidth is lower thant sheet width
scale = (!MustFitColumnsToPage || gridWidth < metrics.PrintAbleWidth)
? 1 : metrics.PrintAbleWidth / gridWidth;
columnHeaderHeight = GridView.HeaderHeight(g,scale);
// let's go to set the partition splits
List<int> firstColumnsOnPartition = new List<int>();
float tmpWidth = 0;
foreach (var column in GridView.Columns.OfType<DataGridViewColumn>()
.Where(colSelector))
{
columnWidths[column.Index] *= scale;
tmpWidth += columnWidths[column.Index];
if (tmpWidth > metrics.PrintAbleWidth || column.Index == 0)
{
firstColumnsOnPartition.Insert(0, column.Index);
tmpWidth = columnWidths[column.Index];
}
}
firstColumnsOnPartition.Reverse();
// let's go to set the level splits
rowSelector =
new Func<DataGridViewRow, bool>(row =>
(MustPrintSelectedRows && row.DataGridView.SelectedRows.Count>0)
? row.Selected
: row.Visible);
rowsHeights = new float[GridView.Rows.Count];
List<int> firstRowsOnPartition = new List<int>();
// we have to set the first visible row outside of the loop
// cause we want to take care about the possible set Title block
int firstVisibleRowIndex = GridView.Rows.OfType<DataGridViewRow>()
.Where(rowSelector).First().Index;
firstRowsOnPartition.Insert(0, firstVisibleRowIndex);
rowsHeights[firstVisibleRowIndex] = GridView.Rows[firstVisibleRowIndex].RowHeight(g);
float tmpHeight = rowsHeights[firstVisibleRowIndex];
if (TitlePrintBlock != null)
tmpHeight += TitlePrintBlock.Rectangle.Height;
// skip the first visible row cause it is already in firstrows (see above)
foreach (var row in GridView.Rows.OfType<DataGridViewRow>()
.Where(rowSelector).Skip(1))
{
rowsHeights[row.Index] = row.RowHeight(g,scale);
tmpHeight += rowsHeights[row.Index];
// warn to take care about the column headers
if (tmpHeight >= metrics.PrintAbleHeight - columnHeaderHeight)
{
firstRowsOnPartition.Insert(0, row.Index);
tmpHeight = rowsHeights[row.Index];
}
}
firstRowsOnPartition.Reverse();
// now that it is calculated, we can fix definitely firstRows and firstColumns in arrays
firstRows = firstRowsOnPartition.ToArray();
firstColumns = firstColumnsOnPartition.ToArray();
levels = new Dictionary<int, IEnumerable<Partition>>(firstRows.Length);
codes = new Dictionary<CodeEnum, string>();
codes[CodeEnum.SheetsCount] = SheetsCount.ToString();
codes[CodeEnum.Date] = DateTime.Now.ToShortDateString();
codes[CodeEnum.Time] = DateTime.Now.ToShortTimeString();
IsInitialized = true;
}
/// <summary>
/// Get each partitions to print, take care of the MustPrintLevelByLevel property value
/// </summary>
/// <returns></returns>
public IEnumerable<Partition> Partitions()
{
for (int levelIndex = 1; levelIndex <= firstRows.Length; levelIndex++)
foreach (var partition in (MustPrintLevelByLevel)?PartitionsByLevel(levelIndex):PartitionsByColumn(levelIndex))
yield return partition;
}
/// <summary>
/// Get partitions of one printable level
/// </summary>
/// <param name="indexLevel">level from which user needs partitions</param>
/// <returns></returns>
public IEnumerable<Partition> PartitionsByLevel(int indexLevel)
{
if (!IsInitialized) throw NotSynException;
int firstRow = firstRows[indexLevel - 1];
int lastRow = (indexLevel >= firstRows.Length) ?
rowsHeights.Length - 1 // last dgv row index
: firstRows[indexLevel] - 1;
float height = rowsHeights.Skip(firstRow).Take(lastRow + 1 - firstRow).Sum();
// initialization of each partition of the current level [indexLevel]
for (int partitionLevel = 0; partitionLevel < firstColumns.Length; partitionLevel++)
{
int firstColumn = firstColumns[partitionLevel];
int lastColumn = (partitionLevel + 1 == firstColumns.Length) ?
columnWidths.Length - 1 // last dgv column index
: firstColumns[partitionLevel + 1] - 1; // next first column - 1
float width = columnWidths.Skip(firstColumn).Take(lastColumn + 1 - firstColumn).Sum();
int pageNumber = ((indexLevel - 1) * PartitionsCount + partitionLevel) + 1;
yield return CreatePartition(
indexLevel, partitionLevel, pageNumber,
firstRow, lastRow, firstColumn, lastColumn,
metrics.LeftMargin, metrics.TopMargin, width, height);
}
}
/// <summary>
/// Get [partitionLevel]th partitions of each levels
/// </summary>
/// <param name="partitionLevel">[partitionLevel]th partitions of each levels</param>
/// <returns></returns>
public IEnumerable<Partition> PartitionsByColumn(int partitionLevel)
{
if (!IsInitialized) throw NotSynException;
int firstColumn = firstColumns[partitionLevel-1];
int lastColumn = (partitionLevel == firstColumns.Length) ?
columnWidths.Length - 1 // last dgv column index
: firstColumns[partitionLevel] - 1; // next first column - 1
float width = columnWidths.Skip(firstColumn).Take(lastColumn + 1 - firstColumn).Sum();
for (int indexLevel = 0; indexLevel < firstRows.Length; indexLevel++)
{
int firstRow = firstRows[indexLevel];
int lastRow = (indexLevel + 1 == firstRows.Length) ?
rowsHeights.Length - 1 // last dgv row index
: firstRows[indexLevel + 1] - 1;
float height = rowsHeights.Skip(firstRow).Take(lastRow + 1 - firstRow).Sum();
int pageNumber = ((partitionLevel - 1) * LevelsCount + indexLevel) + 1;
yield return CreatePartition(
indexLevel, partitionLevel, pageNumber,
firstRow, lastRow, firstColumn, lastColumn,
metrics.LeftMargin, metrics.TopMargin, width, height);
}
}
Partition CreatePartition(
int indexLevel, int partitionLevel, int pageNumber,
int firstRow, int lastRow, int firstColumn, int lastColumn,
float startx, float starty, float width, float height)
{
if (MustCenterPartition)
startx += (metrics.PrintAbleWidth - width) / 2.0F;
PartitionBounds bounds = new PartitionBounds()
{
ColSelector = colSelector,
RowSelector = rowSelector,
StartRowIndex = firstRow,
EndRowIndex = lastRow,
StartColumnIndex = firstColumn,
EndColumnIndex = lastColumn,
StartX = startx,
StartY = starty,
Width = width,
Height = height
};
if (indexLevel == 1 && TitlePrintBlock != null)
bounds.StartY += TitlePrintBlock.Rectangle.Height;
return new Partition(
GridView,
pageNumber,
bounds);
}
/// <summary>
/// Print a sheet containing the given partition
/// </summary>
/// <param name="g"></param>
/// <param name="partition"></param>
public void DrawSheet(Graphics g, Partition partition)
{
codes[CodeEnum.SheetNumber] = partition.SheetNumber.ToString();
if (SheetHeader != null) // print header if it has been set
SheetHeader.Draw(g, codes);
// print report title on first page if a title block has been set
if (partition.SheetNumber == 1 && TitlePrintBlock != null)
TitlePrintBlock.Draw(g, codes);
float currentY = DrawColumnHeaders(g, partition);
DrawRows(g, partition, currentY);
if (SheetFooter != null) // print footer if it has been set
SheetFooter.Draw(g, codes);
}
/// <summary>
/// Draw Grid column headers from partition
/// </summary>
/// <param name="g"></param>
/// <param name="partition">Partition to print</param>
/// <returns></returns>
private float DrawColumnHeaders(Graphics g, Partition partition)
{
PartitionBounds bounds = partition.Bounds;
float currentY = bounds.StartY;
float currentX = bounds.StartX;
// Setting the LinePen that will be used to draw lines and rectangles (derived from the GridColor property of the DataGridView control)
Pen linePen = new Pen(GridView.GridColor, 1);
// Calculating and drawing the HeaderBounds
RectangleF HeaderBounds = new RectangleF(currentX, currentY, bounds.Width, columnHeaderHeight);
g.FillRectangle(
new SolidBrush(GridView.ColumnsHeaderBackColor()),
HeaderBounds);
// Setting the format that will be used to print each cell of the header row
StringFormat CellFormat = new StringFormat();
CellFormat.Trimming = StringTrimming.Word;
CellFormat.FormatFlags = StringFormatFlags.LineLimit | StringFormatFlags.NoClip;
// Printing each visible cell of the header row
foreach (var column in partition.GetColumns())
{
DataGridViewHeaderCell cell = column.HeaderCell;
CellFormat.Alignment = cell.HorizontalAlignement();
RectangleF CellBounds = new RectangleF(currentX, currentY, columnWidths[column.Index], columnHeaderHeight);
// Printing the cell text
g.DrawString(column.HeaderText,
cell.Font(scale),
new SolidBrush(cell.ForeColor()),
CellBounds,
CellFormat);
// Drawing the cell bounds
if (GridView.RowHeadersBorderStyle != DataGridViewHeaderBorderStyle.None) // Draw the cell border only if the HeaderBorderStyle is not None
g.DrawRectangle(linePen, currentX, currentY, columnWidths[column.Index], columnHeaderHeight);
currentX += columnWidths[column.Index];
}
return currentY + columnHeaderHeight;
}
/// <summary>
/// Draw Grid rows from given partition
/// </summary>
/// <param name="g"></param>
/// <param name="partition">Partition to print</param>
/// <param name="currentY">Starting Y coordinate</param>
private void DrawRows(Graphics g, Partition partition, float currentY)
{
PartitionBounds bounds = partition.Bounds;
// Setting the LinePen that will be used to draw lines and rectangles
Pen linePen = new Pen(GridView.GridColor, 1);
// Setting the format that will be used to print each cell
StringFormat CellFormat = new StringFormat();
CellFormat.Trimming = StringTrimming.Word;
CellFormat.FormatFlags = StringFormatFlags.LineLimit;
foreach (var row in partition.GetRows())
{
float rowHeight = rowsHeights[row.Index];
// Setting the RowFore style
SolidBrush RowForeBrush = new SolidBrush(row.ForeColor());
// Calculating the starting x coordinate that the printing process will start from
float currentX = bounds.StartX;
// Calculating the entire CurrentRow bounds
RectangleF RowBounds = new RectangleF(currentX, currentY, bounds.Width, rowHeight);
g.FillRectangle(new SolidBrush(row.BackColor()), RowBounds);
foreach (var column in partition.GetColumns())
{
var cell = row.Cells[column.Index];
CellFormat.Alignment = cell.HorizontalAlignement();
RectangleF CellBounds = new RectangleF(currentX, currentY, columnWidths[column.Index], rowHeight);
// Printing the cell text
g.DrawString(
cell.EditedFormattedValue.ToString(),
cell.Font(scale),
new SolidBrush(row.ForeColor()),
CellBounds,
CellFormat);
// Drawing the cell bounds
if (GridView.CellBorderStyle != DataGridViewCellBorderStyle.None) // Draw the cell border only if the CellBorderStyle is not None
g.DrawRectangle(linePen, currentX, currentY, columnWidths[column.Index], rowHeight);
currentX += columnWidths[column.Index];
}
currentY += rowHeight;
}
}
}
}

View File

@@ -0,0 +1,87 @@
License: Eclipse Public License (EPL)
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

View File

@@ -0,0 +1,84 @@
using System.Collections.Generic;
using System.Windows.Forms;
namespace Printing.DataGridViewPrint
{
/// <author>Blaise Braye</author>
/// <summary>
/// Represent a portion of a DataGridView which can be printed on one sheet
/// </summary>
public class Partition
{
DataGridView GridView { get; set; }
PartitionBounds _Bounds;
/// <summary>
/// The bounds of this partition.
/// </summary>
public PartitionBounds Bounds { get { return _Bounds; } }
int _SheetNumber;
/// <summary>
/// Which sheet this partition represents.
/// </summary>
public int SheetNumber { get { return _SheetNumber; } }
/// <summary>
/// Default constructor for a partition.
/// </summary>
/// <param name="dgv">The DataGridView being partitioned.</param>
/// <param name="sheetNumber">The page number we're currently on.</param>
/// <param name="bounds">The bounds of the partition.</param>
public Partition(DataGridView dgv, int sheetNumber, PartitionBounds bounds)
{
this.GridView = dgv;
_SheetNumber = sheetNumber;
_Bounds = bounds;
}
/// <summary>
/// Get the indexed column from zero to the last one to display on the partition
/// </summary>
/// <param name="i"></param>
/// <returns></returns>
public DataGridViewColumn GetColumn(int i)
{
return GridView.Columns[Bounds.StartColumnIndex + i];
}
/// <summary>
/// Get every visible columns of the partition
/// </summary>
/// <returns></returns>
public IEnumerable<DataGridViewColumn> GetColumns()
{
for (int i = 0; i < Bounds.ColumnCount; i++)
if (this.Bounds.ColSelector(GetColumn(i))) yield return GetColumn(i);
}
/// <summary>
/// Get the indexed row from zero to the last one to display on the partition
/// </summary>
/// <param name="i"></param>
/// <returns></returns>
public DataGridViewRow GetRow(int i)
{
return GridView.Rows[Bounds.StartRowIndex + i];
}
/// <summary>
/// Get every visible rows of the partition
/// </summary>
/// <returns></returns>
public IEnumerable<DataGridViewRow> GetRows()
{
for (int i = 0; i < Bounds.RowsCount; i++)
if (this.Bounds.RowSelector(GetRow(i))) yield return GetRow(i);
}
}
}

View File

@@ -0,0 +1,74 @@

using System;
using System.Windows.Forms;
namespace Printing.DataGridViewPrint
{
/// <author>Blaise Braye</author>
/// <summary>
/// Bounds of a partition, it covers mostly included rows and columns
/// but also cordinates information about it (size,..)
/// </summary>
public class PartitionBounds
{
/// <summary>
/// The index of the first row being printed.
/// </summary>
public int StartRowIndex { get; set; }
/// <summary>
/// The index of the last row being printed.
/// </summary>
public int EndRowIndex { get; set; }
/// <summary>
/// The index of the first column being printed.
/// </summary>
public int StartColumnIndex { get; set; }
/// <summary>
/// The index of the last column being printed.
/// </summary>
public int EndColumnIndex { get; set; }
/// <summary>
/// The beginning horizontal position in the partition's Rectangle.
/// </summary>
public float StartX { get; set; }
/// <summary>
/// The beginning vertical position in the partition's Rectangle.
/// </summary>
public float StartY { get; set; }
/// <summary>
/// The width of the partition.
/// </summary>
public float Width { get; set; }
/// <summary>
/// The height of the partition.
/// </summary>
public float Height { get; set; }
/// <summary>
/// Filters rows.
/// </summary>
public Func<DataGridViewRow, bool> RowSelector { get; set; }
/// <summary>
/// Filters columns.
/// </summary>
public Func<DataGridViewColumn, bool> ColSelector{ get; set; }
/// <summary>
/// The total number of columns to be printed in this partition.
/// </summary>
public int ColumnCount
{
get { return 1 + EndColumnIndex - StartColumnIndex; }
}
/// <summary>
/// The total number of rows to be printed in this partition.
/// </summary>
public int RowsCount
{
get { return 1 + EndRowIndex - StartRowIndex; }
}
}
}

View File

@@ -0,0 +1,37 @@
using System.Collections.Generic;
using System.Drawing;
namespace Printing.DataGridViewPrint
{
/// <author>Blaise Braye</author>
/// <summary>
/// GridDrawer is able to draw object inherited from this class,
/// a common use case for GridDraw is to call GetSize method first,
/// then setting a Rectangle in which the Draw method will be allowed to print.
/// It's usefull for everyone because it allows to defines some blocks to be printed
/// without modifying library core
/// </summary>
public abstract class PrintBlock
{
/// <summary>
/// The area the PrintBlock will fill.
/// </summary>
public virtual RectangleF Rectangle { get; set; }
/// <summary>
/// Returns the size of the block to be printed.
/// </summary>
/// <param name="g">The Graphics object that will ultimately contain the block's contents.</param>
/// <param name="metrics"></param>
/// <returns></returns>
public abstract SizeF GetSize(Graphics g, DocumentMetrics metrics);
/// <summary>
/// Draws the block's contents onto the Graphic g.
/// </summary>
/// <param name="g">The Graphic to contain the block.</param>
/// <param name="codes">The various job-related meta data.</param>
public abstract void Draw(Graphics g, Dictionary<CodeEnum, string> codes);
}
}

View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Printing.DataGridViewPrint</RootNamespace>
<AssemblyName>Printing.DataGridViewPrint</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>BlaiseBraye.GridDrawer.snk</AssemblyOriginatorKeyFile>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Printing.DataGridViewPrint.xml</DocumentationFile>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\Printing.DataGridViewPrint.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DataGridViewExtentions.cs" />
<Compile Include="DocumentMetrics.cs" />
<Compile Include="GridDrawer.cs" />
<Compile Include="Partition.cs" />
<Compile Include="PartitionBounds.cs" />
<Compile Include="PrintBlock.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Tools\PrintingDataGridViewProvider.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="LICENCE.txt" />
</ItemGroup>
<ItemGroup>
<None Include="BlaiseBraye.GridDrawer.snk" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GridDrawer 1.0")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Printing.DataGridViewPrint")]
[assembly: AssemblyCopyright("Copyright © 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("95297e98-22da-470c-bfc0-ee6388090975")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.3")]
[assembly: AssemblyFileVersion("1.0.0.3")]

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Printing.DataGridViewPrint.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Printing.DataGridViewPrint.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Printing.DataGridViewPrint.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>

View File

@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing.Printing;
using System.Windows.Forms;
namespace Printing.DataGridViewPrint.Tools
{
/// <summary>
/// The orchestrator/provider of the print handler.
/// </summary>
public class PrintingDataGridViewProvider
{
IEnumerator<Partition> drawCursor;
/// <summary>
/// The internal representation of the Drawer.
/// </summary>
public GridDrawer _Drawer;
/// <summary>
/// The publicly editable Drawer.
/// </summary>
public GridDrawer Drawer { get { return _Drawer; } }
PrintPageEventHandler _PrintPageEventHandler;
PrintDocument _PrintDocument;
PrintDocument PrintDocument
{
get { return _PrintDocument; }
set
{
if (value == null)
throw new NullReferenceException();
if (_PrintDocument != null)
_PrintDocument.PrintPage -= _PrintPageEventHandler;
_PrintDocument = value;
_PrintDocument.PrintPage += _PrintPageEventHandler;
}
}
/// <summary>
/// Constructor for the provider.
/// </summary>
/// <param name="drawer">An existing Drawer.</param>
/// <param name="printDocument">The form's print document.</param>
public PrintingDataGridViewProvider(GridDrawer drawer, PrintDocument printDocument)
{
_PrintPageEventHandler = new PrintPageEventHandler(PrintDocument_PrintPage);
_Drawer = drawer;
this.PrintDocument = printDocument;
}
/// <summary>
/// This is the default and best way to create a provider.
/// </summary>
/// <param name="printDocument">The form's print document.</param>
/// <param name="dgv">The DataGridView to be printed.</param>
/// <param name="printLevelByLevel">Whether the sheet should print row by row (level by level) [true] or column by column [false].</param>
/// <param name="mustCenterPartition">Whether the grid should be centered on the printed page.</param>
/// <param name="mustFitColumnsToPage">Whether the columns can run off the page.</param>
/// <param name="titlePrintBlock">A PrintBlock representing the title section of the page.</param>
/// <param name="sheetHeader">A PrintBlock representing the header of the page.</param>
/// <param name="sheetFooter">A PrintBlock representing the foorter of the page.</param>
/// <returns></returns>
public static PrintingDataGridViewProvider Create(PrintDocument printDocument,
DataGridView dgv, bool printLevelByLevel, bool mustCenterPartition, bool mustFitColumnsToPage,
PrintBlock titlePrintBlock, PrintBlock sheetHeader, PrintBlock sheetFooter)
{
return new PrintingDataGridViewProvider(
new GridDrawer(dgv, mustCenterPartition, mustFitColumnsToPage)
{
SheetHeader = sheetHeader,
SheetFooter = sheetFooter,
TitlePrintBlock = titlePrintBlock,
MustPrintLevelByLevel = printLevelByLevel
},
printDocument);
}
void PrintDocument_PrintPage(object sender, PrintPageEventArgs e)
{
if (drawCursor == null)
{
Drawer.Initialize(e.Graphics, DocumentMetrics.FromPrintDocument(PrintDocument));
drawCursor = Drawer.Partitions().GetEnumerator();
if (!drawCursor.MoveNext())
throw new Exception("Nothing to print");
}
Drawer.DrawSheet(e.Graphics, drawCursor.Current);
e.HasMorePages = drawCursor.MoveNext();
if (!e.HasMorePages) drawCursor = null;
}
}
}

View File

@@ -0,0 +1,42 @@
<project schemaVersion="1.6.0.2">
<assemblies>
<assembly assemblyPath=".\bin\Release\Printing.DataGridViewPrint.dll" xmlCommentsPath=".\bin\Release\Printing.DataGridViewPrint.XML" commentsOnly="False" />
</assemblies>
<ProjectSummary />
<MissingTags>Summary, Parameter, Returns, AutoDocumentCtors, Namespace</MissingTags>
<VisibleItems>InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected</VisibleItems>
<HtmlHelp1xCompilerPath path="" />
<HtmlHelp2xCompilerPath path="" />
<OutputPath>.\Help\</OutputPath>
<SandcastlePath path="" />
<WorkingPath path="" />
<CleanIntermediates>True</CleanIntermediates>
<KeepLogFile>True</KeepLogFile>
<HelpFileFormat>HtmlHelp1x</HelpFileFormat>
<PurgeDuplicateTopics>True</PurgeDuplicateTopics>
<CppCommentsFixup>False</CppCommentsFixup>
<FrameworkVersion>2.0.50727</FrameworkVersion>
<BinaryTOC>True</BinaryTOC>
<IncludeFavorites>False</IncludeFavorites>
<Preliminary>False</Preliminary>
<RootNamespaceContainer>False</RootNamespaceContainer>
<RootNamespaceTitle />
<HelpTitle>Documented GridDrawer Library</HelpTitle>
<HtmlHelpName>Documentation</HtmlHelpName>
<Language>en-US</Language>
<CopyrightHref />
<CopyrightText>Blaise Braye</CopyrightText>
<FeedbackEMailAddress>blaisemail@gmail.com</FeedbackEMailAddress>
<HeaderText>GridDrawer.Net</HeaderText>
<FooterText />
<ProjectLinkType>Local</ProjectLinkType>
<SdkLinkType>Msdn</SdkLinkType>
<SdkLinkTarget>Blank</SdkLinkTarget>
<PresentationStyle>hana</PresentationStyle>
<NamingMethod>Guid</NamingMethod>
<SyntaxFilters>Standard</SyntaxFilters>
<ShowFeedbackControl>True</ShowFeedbackControl>
<ContentPlacement>AboveNamespaces</ContentPlacement>
<ContentSiteMap path="" />
<TopicFileTransform path="" />
</project>

View File

@@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "d20SRDSpellLists.Tests", "d
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "d20SRDSpellLists", "d20 SRD Spell Lists\d20SRDSpellLists.csproj", "{F550B743-1937-4295-9AA2-770F5E0D1FDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Printing.DataGridViewPrint", "Printing.DataGridViewPrint\Printing.DataGridViewPrint.csproj", "{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -35,6 +37,16 @@ Global
{F550B743-1937-4295-9AA2-770F5E0D1FDC}.Release|Mixed Platforms.Build.0 = Release|x86
{F550B743-1937-4295-9AA2-770F5E0D1FDC}.Release|x86.ActiveCfg = Release|x86
{F550B743-1937-4295-9AA2-770F5E0D1FDC}.Release|x86.Build.0 = Release|x86
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Debug|x86.ActiveCfg = Debug|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Release|Any CPU.Build.0 = Release|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -29,7 +29,7 @@
this.labelVersion = new System.Windows.Forms.Label();
this.labelCopyright = new System.Windows.Forms.Label();
this.labelCompanyName = new System.Windows.Forms.Label();
this.textBoxDescription = new System.Windows.Forms.TextBox();
this.textBoxDescription = new System.Windows.Forms.RichTextBox();
this.okButton = new System.Windows.Forms.Button();
this.tableLayoutPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit();
@@ -122,17 +122,14 @@
//
// textBoxDescription
//
this.textBoxDescription.Text = "Description";
this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxDescription.Location = new System.Drawing.Point(143, 107);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBoxDescription.Size = new System.Drawing.Size(271, 126);
this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = "Description";
//
// okButton
//
@@ -161,7 +158,6 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "AboutBox1";
this.tableLayoutPanel.ResumeLayout(false);
this.tableLayoutPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
this.ResumeLayout(false);
@@ -175,7 +171,7 @@
private System.Windows.Forms.Label labelVersion;
private System.Windows.Forms.Label labelCopyright;
private System.Windows.Forms.Label labelCompanyName;
private System.Windows.Forms.TextBox textBoxDescription;
private System.Windows.Forms.RichTextBox textBoxDescription;
private System.Windows.Forms.Button okButton;
}
}

View File

@@ -15,7 +15,14 @@ namespace d20_SRD_Spell_Lists {
this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = AssemblyCompany;
this.textBoxDescription.Text = AssemblyDescription;
var webBrowser = new WebBrowser();
//webBrowser.CreateControl(); // only if needed
webBrowser.DocumentText = AssemblyDescription;
webBrowser.Document.ExecCommand("SelectAll", false, null);
webBrowser.Document.ExecCommand("Copy", false, null);
this.textBoxDescription.Text = "";
this.textBoxDescription.Paste();
}
#region Assembly Attribute Accessors

View File

@@ -23,8 +23,8 @@
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.lblExtra9 = new System.Windows.Forms.Label();
@@ -71,21 +71,23 @@
this.label2 = new System.Windows.Forms.Label();
this.lblDirections = new System.Windows.Forms.Label();
this.mainToolStrip = new System.Windows.Forms.ToolStrip();
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.spellsDataGridView = new System.Windows.Forms.DataGridView();
this.btnAdd = new System.Windows.Forms.Button();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
this.openToolStripButton = new System.Windows.Forms.ToolStripButton();
this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
this.printToolStripButton = new System.Windows.Forms.ToolStripButton();
this.printPreviewToolstripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
this.cutToolStripButton = new System.Windows.Forms.ToolStripButton();
this.copyToolStripButton = new System.Windows.Forms.ToolStripButton();
this.pasteToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.helpToolStripButton = new System.Windows.Forms.ToolStripButton();
this.spellsDataGridView = new System.Windows.Forms.DataGridView();
this.btnAdd = new System.Windows.Forms.Button();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.printDoc = new System.Drawing.Printing.PrintDocument();
this.dataGridViewImageColumn1 = new System.Windows.Forms.DataGridViewImageColumn();
this.dataGridViewImageColumn2 = new System.Windows.Forms.DataGridViewImageColumn();
this.prepColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.levelColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.spellNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -96,12 +98,17 @@
this.tableLayoutPanel1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.mainToolStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.spellsDataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
this.tableLayoutPanel1.ColumnCount = 11;
@@ -149,7 +156,7 @@
this.tableLayoutPanel1.Controls.Add(this.label10, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.label19, 10, 0);
this.tableLayoutPanel1.Controls.Add(this.lblDC0, 1, 1);
this.tableLayoutPanel1.Location = new System.Drawing.Point(233, 115);
this.tableLayoutPanel1.Location = new System.Drawing.Point(233, 94);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
@@ -494,7 +501,7 @@
// charClassComboBox
//
this.charClassComboBox.FormattingEnabled = true;
this.charClassComboBox.Location = new System.Drawing.Point(60, 88);
this.charClassComboBox.Location = new System.Drawing.Point(56, 66);
this.charClassComboBox.Name = "charClassComboBox";
this.charClassComboBox.Size = new System.Drawing.Size(156, 21);
this.charClassComboBox.TabIndex = 23;
@@ -502,7 +509,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 91);
this.label6.Location = new System.Drawing.Point(12, 69);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(35, 13);
this.label6.TabIndex = 22;
@@ -510,11 +517,13 @@
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.txtSpellCastingAttribute);
this.groupBox1.Controls.Add(this.lblSpellCastingAttributeMod);
this.groupBox1.Controls.Add(this.lblModifiers);
this.groupBox1.Controls.Add(this.lblSpellCastingAttribute);
this.groupBox1.Location = new System.Drawing.Point(15, 115);
this.groupBox1.Location = new System.Drawing.Point(15, 98);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(201, 73);
this.groupBox1.TabIndex = 15;
@@ -561,7 +570,7 @@
//
// txtCharacter
//
this.txtCharacter.Location = new System.Drawing.Point(60, 62);
this.txtCharacter.Location = new System.Drawing.Point(56, 40);
this.txtCharacter.Name = "txtCharacter";
this.txtCharacter.Size = new System.Drawing.Size(156, 20);
this.txtCharacter.TabIndex = 8;
@@ -570,7 +579,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 65);
this.label2.Location = new System.Drawing.Point(12, 43);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(38, 13);
this.label2.TabIndex = 1;
@@ -579,7 +588,7 @@
// lblDirections
//
this.lblDirections.AutoSize = true;
this.lblDirections.Location = new System.Drawing.Point(12, 35);
this.lblDirections.Location = new System.Drawing.Point(12, 14);
this.lblDirections.Name = "lblDirections";
this.lblDirections.Size = new System.Drawing.Size(578, 13);
this.lblDirections.TabIndex = 0;
@@ -593,6 +602,7 @@
this.openToolStripButton,
this.saveToolStripButton,
this.printToolStripButton,
this.printPreviewToolstripButton,
this.toolStripSeparator,
this.cutToolStripButton,
this.copyToolStripButton,
@@ -601,22 +611,104 @@
this.helpToolStripButton});
this.mainToolStrip.Location = new System.Drawing.Point(0, 0);
this.mainToolStrip.Name = "mainToolStrip";
this.mainToolStrip.Size = new System.Drawing.Size(784, 25);
this.mainToolStrip.Size = new System.Drawing.Size(710, 25);
this.mainToolStrip.TabIndex = 1;
//
// newToolStripButton
//
this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.newToolStripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.page_add;
this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.newToolStripButton.Name = "newToolStripButton";
this.newToolStripButton.Size = new System.Drawing.Size(23, 22);
this.newToolStripButton.Text = "&New";
//
// openToolStripButton
//
this.openToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.openToolStripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.folder_page;
this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.openToolStripButton.Name = "openToolStripButton";
this.openToolStripButton.Size = new System.Drawing.Size(23, 22);
this.openToolStripButton.Text = "&Open";
this.openToolStripButton.Click += new System.EventHandler(this.openToolStripButton_Click);
//
// saveToolStripButton
//
this.saveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.saveToolStripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.page_save;
this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.saveToolStripButton.Name = "saveToolStripButton";
this.saveToolStripButton.Size = new System.Drawing.Size(23, 22);
this.saveToolStripButton.Text = "&Save";
this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripButton_Click);
//
// printToolStripButton
//
this.printToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.printToolStripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.printer;
this.printToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.printToolStripButton.Name = "printToolStripButton";
this.printToolStripButton.Size = new System.Drawing.Size(23, 22);
this.printToolStripButton.Text = "&Print";
this.printToolStripButton.Click += new System.EventHandler(this.printToolStripButton_Click);
//
// printPreviewToolstripButton
//
this.printPreviewToolstripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.printPreviewToolstripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.print_preview;
this.printPreviewToolstripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.printPreviewToolstripButton.Name = "printPreviewToolstripButton";
this.printPreviewToolstripButton.Size = new System.Drawing.Size(23, 22);
this.printPreviewToolstripButton.Text = "Print Preview";
this.printPreviewToolstripButton.Click += new System.EventHandler(this.printPreviewToolstripButton_Click);
//
// toolStripSeparator
//
this.toolStripSeparator.Name = "toolStripSeparator";
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
//
// cutToolStripButton
//
this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.cutToolStripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.cut;
this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.cutToolStripButton.Name = "cutToolStripButton";
this.cutToolStripButton.Size = new System.Drawing.Size(23, 22);
this.cutToolStripButton.Text = "C&ut";
//
// copyToolStripButton
//
this.copyToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.copyToolStripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.page_copy;
this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.copyToolStripButton.Name = "copyToolStripButton";
this.copyToolStripButton.Size = new System.Drawing.Size(23, 22);
this.copyToolStripButton.Text = "&Copy";
//
// pasteToolStripButton
//
this.pasteToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.pasteToolStripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.page_paste;
this.pasteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.pasteToolStripButton.Name = "pasteToolStripButton";
this.pasteToolStripButton.Size = new System.Drawing.Size(23, 22);
this.pasteToolStripButton.Text = "&Paste";
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// errorProvider
// helpToolStripButton
//
this.errorProvider.ContainerControl = this;
this.helpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.helpToolStripButton.Image = global::d20_SRD_Spell_Lists.Properties.Resources.information;
this.helpToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.helpToolStripButton.Name = "helpToolStripButton";
this.helpToolStripButton.Size = new System.Drawing.Size(23, 22);
this.helpToolStripButton.Text = "A&bout";
this.helpToolStripButton.Click += new System.EventHandler(this.helpToolStripButton_Click);
//
// spellsDataGridView
//
@@ -631,17 +723,18 @@
this.descColumn,
this.editColumn,
this.deleteColumn});
this.spellsDataGridView.Dock = System.Windows.Forms.DockStyle.Bottom;
this.spellsDataGridView.Location = new System.Drawing.Point(0, 194);
this.spellsDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.spellsDataGridView.Location = new System.Drawing.Point(0, 0);
this.spellsDataGridView.Name = "spellsDataGridView";
this.spellsDataGridView.ReadOnly = true;
this.spellsDataGridView.Size = new System.Drawing.Size(784, 368);
this.spellsDataGridView.Size = new System.Drawing.Size(710, 354);
this.spellsDataGridView.TabIndex = 24;
this.spellsDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.spellsDataGridView_CellContentClick);
//
// btnAdd
//
this.btnAdd.Location = new System.Drawing.Point(697, 165);
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnAdd.Location = new System.Drawing.Point(623, 144);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(75, 23);
this.btnAdd.TabIndex = 25;
@@ -649,14 +742,49 @@
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 25);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.lblDirections);
this.splitContainer1.Panel1.Controls.Add(this.btnAdd);
this.splitContainer1.Panel1.Controls.Add(this.label2);
this.splitContainer1.Panel1.Controls.Add(this.txtCharacter);
this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Panel1.Controls.Add(this.groupBox1);
this.splitContainer1.Panel1.Controls.Add(this.charClassComboBox);
this.splitContainer1.Panel1.Controls.Add(this.label6);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.spellsDataGridView);
this.splitContainer1.Size = new System.Drawing.Size(710, 537);
this.splitContainer1.SplitterDistance = 179;
this.splitContainer1.TabIndex = 26;
//
// printDoc
//
this.printDoc.DocumentName = "Spell List";
//
// dataGridViewImageColumn1
//
this.dataGridViewImageColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.Gray;
dataGridViewCellStyle2.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle2.NullValue")));
this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridViewImageColumn1.HeaderText = "";
this.dataGridViewImageColumn1.Image = global::d20_SRD_Spell_Lists.Properties.Resources.edit_16;
this.dataGridViewImageColumn1.Name = "dataGridViewImageColumn1";
this.dataGridViewImageColumn1.ReadOnly = true;
this.dataGridViewImageColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewImageColumn1.Width = 5;
this.dataGridViewImageColumn1.ToolTipText = "Edit spell";
//
// dataGridViewImageColumn2
//
@@ -664,93 +792,19 @@
this.dataGridViewImageColumn2.HeaderText = "";
this.dataGridViewImageColumn2.Image = global::d20_SRD_Spell_Lists.Properties.Resources.editdelete_16;
this.dataGridViewImageColumn2.Name = "dataGridViewImageColumn2";
this.dataGridViewImageColumn2.ReadOnly = true;
this.dataGridViewImageColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridViewImageColumn2.Width = 5;
//
// newToolStripButton
//
this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image")));
this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.newToolStripButton.Name = "newToolStripButton";
this.newToolStripButton.Size = new System.Drawing.Size(23, 22);
this.newToolStripButton.Text = "&New";
//
// openToolStripButton
//
this.openToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image")));
this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.openToolStripButton.Name = "openToolStripButton";
this.openToolStripButton.Size = new System.Drawing.Size(23, 22);
this.openToolStripButton.Text = "&Open";
this.openToolStripButton.Click += new System.EventHandler(this.openToolStripButton_Click);
//
// saveToolStripButton
//
this.saveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image")));
this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.saveToolStripButton.Name = "saveToolStripButton";
this.saveToolStripButton.Size = new System.Drawing.Size(23, 22);
this.saveToolStripButton.Text = "&Save";
this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripButton_Click);
//
// printToolStripButton
//
this.printToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.printToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripButton.Image")));
this.printToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.printToolStripButton.Name = "printToolStripButton";
this.printToolStripButton.Size = new System.Drawing.Size(23, 22);
this.printToolStripButton.Text = "&Print";
//
// cutToolStripButton
//
this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.cutToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image")));
this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.cutToolStripButton.Name = "cutToolStripButton";
this.cutToolStripButton.Size = new System.Drawing.Size(23, 22);
this.cutToolStripButton.Text = "C&ut";
//
// copyToolStripButton
//
this.copyToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image")));
this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.copyToolStripButton.Name = "copyToolStripButton";
this.copyToolStripButton.Size = new System.Drawing.Size(23, 22);
this.copyToolStripButton.Text = "&Copy";
//
// pasteToolStripButton
//
this.pasteToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.pasteToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripButton.Image")));
this.pasteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.pasteToolStripButton.Name = "pasteToolStripButton";
this.pasteToolStripButton.Size = new System.Drawing.Size(23, 22);
this.pasteToolStripButton.Text = "&Paste";
//
// helpToolStripButton
//
this.helpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.helpToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("helpToolStripButton.Image")));
this.helpToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.helpToolStripButton.Name = "helpToolStripButton";
this.helpToolStripButton.Size = new System.Drawing.Size(23, 22);
this.helpToolStripButton.Text = "He&lp";
//
// prepColumn
//
this.prepColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
this.prepColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.prepColumn.DataPropertyName = "IsPrepped";
this.prepColumn.HeaderText = "Prep?";
this.prepColumn.Name = "prepColumn";
this.prepColumn.ReadOnly = true;
this.prepColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.prepColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.prepColumn.Width = 41;
this.prepColumn.Width = 75;
//
// levelColumn
//
@@ -763,7 +817,7 @@
//
// spellNameColumn
//
this.spellNameColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.spellNameColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.spellNameColumn.DataPropertyName = "Name";
this.spellNameColumn.HeaderText = "Name";
this.spellNameColumn.Name = "spellNameColumn";
@@ -772,7 +826,7 @@
//
// componentColumn
//
this.componentColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
this.componentColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.componentColumn.DataPropertyName = "Components";
this.componentColumn.HeaderText = "Comp";
this.componentColumn.Name = "componentColumn";
@@ -790,12 +844,12 @@
// editColumn
//
this.editColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.Gray;
dataGridViewCellStyle5.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle5.NullValue")));
this.editColumn.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle1.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle1.NullValue")));
this.editColumn.DefaultCellStyle = dataGridViewCellStyle1;
this.editColumn.HeaderText = "";
this.editColumn.Image = global::d20_SRD_Spell_Lists.Properties.Resources.edit_16;
this.editColumn.Image = global::d20_SRD_Spell_Lists.Properties.Resources.pencil;
this.editColumn.Name = "editColumn";
this.editColumn.ReadOnly = true;
this.editColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
@@ -806,7 +860,7 @@
//
this.deleteColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.deleteColumn.HeaderText = "";
this.deleteColumn.Image = global::d20_SRD_Spell_Lists.Properties.Resources.editdelete_16;
this.deleteColumn.Image = global::d20_SRD_Spell_Lists.Properties.Resources.delete;
this.deleteColumn.Name = "deleteColumn";
this.deleteColumn.ReadOnly = true;
this.deleteColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
@@ -816,16 +870,8 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(784, 562);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.spellsDataGridView);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.charClassComboBox);
this.Controls.Add(this.label6);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.txtCharacter);
this.Controls.Add(this.label2);
this.Controls.Add(this.lblDirections);
this.ClientSize = new System.Drawing.Size(710, 562);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.mainToolStrip);
this.Name = "FrmMain";
this.Text = "D&D 3.5 SRD Spell Lists";
@@ -835,8 +881,12 @@
this.groupBox1.PerformLayout();
this.mainToolStrip.ResumeLayout(false);
this.mainToolStrip.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.spellsDataGridView)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -862,7 +912,6 @@
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblSpellCastingAttributeMod;
private System.Windows.Forms.Label lblModifiers;
private System.Windows.Forms.ErrorProvider errorProvider;
private System.Windows.Forms.MaskedTextBox txtSpellCastingAttribute;
private System.Windows.Forms.ComboBox charClassComboBox;
private System.Windows.Forms.Label label6;
@@ -902,6 +951,11 @@
private System.Windows.Forms.Label lblDC0;
private System.Windows.Forms.DataGridView spellsDataGridView;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn2;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.ToolStripButton printPreviewToolstripButton;
private System.Drawing.Printing.PrintDocument printDoc;
private System.Windows.Forms.DataGridViewTextBoxColumn prepColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn levelColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn spellNameColumn;
@@ -909,8 +963,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn descColumn;
private System.Windows.Forms.DataGridViewImageColumn editColumn;
private System.Windows.Forms.DataGridViewImageColumn deleteColumn;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn2;
}
}

View File

@@ -10,6 +10,7 @@ using d20_SRD_Spell_Lists.Models;
using d20_SRD_Spell_Lists.Exceptions;
using System.Xml.Serialization;
using System.IO;
using Printing.DataGridViewPrint.Tools;
namespace d20_SRD_Spell_Lists {
public partial class FrmMain : Form {
@@ -17,6 +18,7 @@ namespace d20_SRD_Spell_Lists {
private Character character;
private string characterFile;
private bool loadingCharacter;
private PrintingDataGridViewProvider printProvider;
public FrmMain() {
InitializeComponent();
@@ -33,6 +35,29 @@ namespace d20_SRD_Spell_Lists {
//spellsDataGridView.CellValueChanged += new DataGridViewCellEventHandler(spellsDataGridView_CellValueChanged);
}
private void setupPrinting() {
printDoc = new System.Drawing.Printing.PrintDocument();
printDoc.DocumentName = "D20 3.5 Spell List";
printDoc.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(40, 40, 40, 20);
printDoc.DefaultPageSettings.Landscape = true;
printProvider = PrintingDataGridViewProvider.Create(printDoc, spellsDataGridView, true, true, true,
new TitlePrintBlock() {
Title = printDoc.DocumentName,
DCs = this.tableLayoutPanel1,
CharName = character.Name,
CharClass = Character.getSpellcastingClassName(character.CharacterClass),
CharAttr = character.SpellCastingAttribute.ToString(),
CharAttrMod = character.SpellCastingAttributeModAsString(),
CharAttrName = character.SpellCastingAttributeName
},
new HeaderPrintBlock() {
Header = character.Name
},
new FooterPrintBlock() {
Footer = "Page XX of YY"
});
}
private void setupSpells() {
this.spellsDataGridView.DataSource = character.Spells;
}
@@ -104,10 +129,12 @@ namespace d20_SRD_Spell_Lists {
private void txtSpellCastingAttribute_TextChanged(object sender, EventArgs e) {
if (txtSpellCastingAttribute.Text != "") {
character.SpellCastingAttribute = int.Parse(txtSpellCastingAttribute.Text);
lblSpellCastingAttributeMod.Text = String.Format((character.SpellCastingAttributeMod >= 0) ? "+{0:D}" : "{0:D}", character.SpellCastingAttributeMod);
lblSpellCastingAttributeMod.Text = character.SpellCastingAttributeModAsString();
}
}
private void txtSpellCastingAttribute_LostFocus(object sender, EventArgs e) {
updateSpellDCs();
updateExtraSpells();
@@ -188,6 +215,7 @@ namespace d20_SRD_Spell_Lists {
var result = addForm.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK) {
character.Spells.Add(addForm.spell);
character.Spells.Sort(new SpellInequalityComparer());
refreshSpellList();
}
}
@@ -226,5 +254,25 @@ namespace d20_SRD_Spell_Lists {
}
return false;
}
private void helpToolStripButton_Click(object sender, EventArgs e) {
FrmCredits credits = new FrmCredits();
credits.ShowDialog();
}
private void printToolStripButton_Click(object sender, EventArgs e) {
}
private void printPreviewToolstripButton_Click(object sender, EventArgs e) {
spellsDataGridView.Columns["editColumn"].Visible = false;
spellsDataGridView.Columns["deleteColumn"].Visible = false;
setupPrinting();
PrintPreviewDialog ppd = new PrintPreviewDialog();
ppd.Document = printDoc;
ppd.ShowDialog();
spellsDataGridView.Columns["editColumn"].Visible = true;
spellsDataGridView.Columns["deleteColumn"].Visible = true;
}
}
}

View File

@@ -120,9 +120,6 @@
<metadata name="mainToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>137, 17</value>
</metadata>
<metadata name="prepColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -142,145 +139,44 @@
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="dataGridViewCellStyle5.NullValue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="dataGridViewCellStyle1.NullValue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Qk32AgAAAAAAADYAAAAoAAAADgAAABAAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYGEgoTGw8bGw8bGw8bGw8bGw8bGw8bG
w8bGw8bGw8bGw8bGw8bGw8YAAAABgYSChP///////////////////////////////////////////8bD
xgAAAAGBhIKE////////////////////////////////////////////xsPGAAAAAYGEgoT/////////
///////////////////////////////////Gw8YAAAABgYSChP//////////////////////////////
/////////////8bDxgAAAAGBhIKE////////////AAD/AAD/////////AAD/AAD/////////xsPGAAAA
AYGEgoT///////////////8AAP8AAP8AAP8AAP/////////////Gw8YAAAABgYSChP//////////////
/////wAA/wAA/////////////////8bDxgAAAAGBhIKE////////////////AAD/AAD/AAD/AAD/////
////////xsPGAAAAAYGEgoT///////////8AAP8AAP////////8AAP8AAP/////////Gw8YAAAABgYSC
hP///////////////////////////////////////////8bDxgAAAAGBhIKE////////////////////
////////////////////////xsPGAAAAAYGEgoT/////////////////////////////////////////
///Gw8YAAAABgYSChP///////////////////////////////////////////8bDxgAAAAGBhIKEhIKE
hIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEAYE=
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+EgoTGw8bGw8bGw8bGw8bGw8bGw8bG
w8bGw8bGw8bGw8bGw8bGw8YAAAAA/4SChP///////////////////////////////////////////8bD
xgAAAAD/hIKE////////////////////////////////////////////xsPGAAAAAP+EgoT/////////
///////////////////////////////////Gw8YAAAAA/4SChP//////////////////////////////
/////////////8bDxgAAAAD/hIKE////////////AAD/AAD/////////AAD/AAD/////////xsPGAAAA
AP+EgoT///////////////8AAP8AAP8AAP8AAP/////////////Gw8YAAAAA/4SChP//////////////
/////wAA/wAA/////////////////8bDxgAAAAD/hIKE////////////////AAD/AAD/AAD/AAD/////
////////xsPGAAAAAP+EgoT///////////8AAP8AAP////////8AAP8AAP/////////Gw8YAAAAA/4SC
hP///////////////////////////////////////////8bDxgAAAAD/hIKE////////////////////
////////////////////////xsPGAAAAAP+EgoT/////////////////////////////////////////
///Gw8YAAAAA/4SChP///////////////////////////////////////////8bDxgAAAAD/hIKEhIKE
hIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEAP8=
</value>
</data>
<metadata name="deleteColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="newToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<metadata name="printDoc.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>130, 17</value>
</metadata>
<data name="dataGridViewCellStyle2.NullValue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAQ9JREFUOE+t09lq
wkAUBmBfyr5DfY32jaReSOmFCyKCgkKLFrVUBZeKiEbshqRuaNw1xiXmLxMJBJ0Zc+GBw9zMfDPnHMZm
u1ZE35s4zXCqjmC8Al+sgHLjD9y7yGFWPIbecOO45yORtMAEHnxxJHL1IyKI9JeEXqtMwOl50Q8bSS0l
8PzBBPbqAQQxICrgjeapgKZpkJUdBmNZB+y3d/QSnsIZKrDdqZjMFYj9OR9wB1NngHrQsJC36EkrfIkT
PuDyJ84AZbOHNF2j1Z2h9i3xAVKfOUjjZssN2oMFmq0xSkLfOmBu3E97iurnENlKxzpgbpzwO0Kh1kOy
KFoDjHmzVuYYjRmTDZfyWh9Yd/4B2Mz2w1z7EGUAAAAASUVORK5CYII=
</value>
</data>
<data name="openToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlpJREFUOE+tk21I
k1EYhif0oyA0sqIQCix/+GcQFFH9CCmiUBTLLEjShJofVBgL2fxoU9Pp5ubUlS5rU9f8rCyjsA+pUCRC
TR1ppmVFUSlmhq78unrnQF1KGHTg/nEOz30993PO+7qJFrmUeiv2n+Mij+XLRLLYULdF2pxlEVIDcw0p
AsyxD5fmI/rQ94pqi26eOlsfuZj+7BgSm01QdA4ih7m73Yx9qGpavwatjPebqCzOprPt8YKQgzFagqL0
BEjyEFWVaBkdLHMxT34uYNwWR9nVTEoL0zHlp2DMSeaSRk6eKt4VWm5WM/rVPNN5SjDTLQebZEHNA1wr
UvHjk3E6tsNcV62e1r3KLGqtKm6WplNpSsVqVFJsOM8VfSKFWjkGtcyZptSYzvC7XByx3zQoqCnTMvlG
CX1prnornPUmQJcUXsbSVhGK5bIOkcmQyveeTHiv4VZ5Nk33Nc6iuSO8CIfmECYa/bE/8ON1iRipJNh5
F0V6Bd86lfQ1JlFj1TDVq4COKCegLVIwHmGiKRB7/V6G7+5koHozymgfYRy5E1CgTWKgXcZ1i5qWp0KS
rjgBcAJawph6FszYk/2M1O1isGYLX8p9ab6wgqP+3rMvYciS01GfzA1LFvQkQ6sQ9/khxhoCGHnox1Dt
NvorxXw0b8Km8UQh2cip6GOzgNyMeKqKM7HdjqFZJ5pRk2YJ9aql3EnxoCJxNaZ4Ly6e3UDY3O6OEXRp
59ApTpIhiyDh9GHORAZyPHQPB/ZtZ/cOMVvFPvh6e7F+3SrWrHRnraf7Xz/xf/rJ/kvxb84I3U1y+9/W
AAAAAElFTkSuQmCC
</value>
</data>
<data name="saveToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAixJREFUOE+tk91L
k3EUx/cvdN9N0EW3NTWGa7EaPOUcyqphWBG9PZEv5dJlmqhYmUYtXyBb4dJJy+kknFT4BqZIjaFMJUsz
V7TEoabYRDD49ju/6Pm1Mi+iH5zLz+c855zvo1L9j/fsaRRUvvZltHmX8Ni9gMaGCO47ZlBb8wn22yHc
KJ9CackECgteIy93FBfOB6H0JrC3B6ipXsVGb2V1Dca0XhxOe8JLEXhbF7mgsuLLX3mCIwsr2G1+DrVa
huWQRwjcj+a5oLTk87qCn/D78CLiTD4UXJ7GAXOTEDjrZ7ngku3dH4Jf4ZHJCLZJXlhzxpGa4hSCurth
LsjOGo0R/A4PBsPYrHdDlgMwmRxCUF31kQvkMwFFsB7c4/+ATYkNOHL0BZKSaoXgZuU0urvATgkcP/kK
lmMDfNu0MJqZPps6/4D7cNDSCUmyC8HVskl0+MAyADS5vrG7f0X59Tm+VFoYzZyZEVTg5NR2GAwVQnCl
cByeZuChc40FJwpjek5MmU/YkH6uiHdOTmHwfg/0+jIhsOWNMRiouhPlnUnAQoI4rYSht7MYm5qDnHsN
e41tHNbucUGnKxICiqXjHpTPJgHBZ/Nv4U1oHqGZJVwstiNe72JwI+J3PYA2MV8IMjOG2dzLfOatBg+2
7JDQ0tEPX9cguvv8GHg5hH0mC9S6eiQweLumDhqNVQgo06dP9fN4UsIoJHRnOhVtmxZGM1NXKoJ3JmTH
Cv71r/4OTrQ4xWMwWlcAAAAASUVORK5CYII=
</value>
</data>
<data name="printToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAi1JREFUOE+1k/9P
UlEYxv2nWK2tVlttGmpltrCcEQ1XUjSMaUHJNLIpNcnCragplBvUoC/okJhZLG92ySUpU8RNICdIhAio
EF+e7r1UZMDW1jrb+8t7z/N83vucc8rK/sdyeYIwvpopWYbRaZTk0uIx0o0/V/JbGt7lVTwxT6CKKylt
oLd8xGYihS/hKGz2WaaeWUnoTATsMz7UCztx9Ex7cYN3jkUQU4tb4DR5LZaAcyEAg4VE5YlLMFmJQoNQ
JA61gUA6k4XPH9pCN9s+gZz2oq5Jjlq+DDfUz3Fba86bOGY9jHiUdDF0mvqT7A/F4fKEcE9nZf5d1jOI
B4ZxVJ2U5gyc8z70akegMX3AXb0ND1+8R6/GgvZbeog61OA2K3CA2lxR34JjZ69B2T8EsVyN/Q0XcwY3
B14iGk8UpE43UukMNqhA6QyC4Q0srcQg7dagsbWHmuDHScj7jDC9nsJTqx0a4xjuaIfRqXoMSXc/hG0q
8C4owGnqwEGeFOXHxThH9eoEV7G7VpiboE2pK0qnm9H1JLz+NUzOBfHWEcAQsQSuqAuVDa1gVZzKGUgU
jwoMqAzxNZbC3Od1jDvDYPdth+7NCpP8Yf4V7KoR5A1arg8gmQIoGMLxLJYjWSwEMphwb2J4MoZB2yqU
LBZUIxHGYB9HlBfTE4jl9+GmBPTHv6lfo//+GGoaZajmXQabumXl1HHt5TRjz5Hz2HlIgB3Vp7GNzWeo
RcX/+pq/AwHYL0leVl8fAAAAAElFTkSuQmCC
</value>
</data>
<data name="cutToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAYdJREFUOE+t001L
QlEQBuB+TdCmRVEJRRIWtRAUlKsQhFmkpZQtIiWyAlMwP5KkXS0shLqGFkgoFqWQmaRR2qIvU7FMwWhd
8JZXkFx0uVGzOcNh5jkDw6mr+++4SN7B6fbju/uQecYm6a25+/Hdl2IJptWNmmJyL4DwWZwZUJbtayT8
RxGqIV8oQaaaRfrxkTmw4z2G+WuKbC6PYDgOkUSJp6ccc+AgdI4luwPbHh/UCxb0S0aZN5fHTmefMTVv
wfDEHIiBMegMpt8BZUShNoGQTIKQGxA8TTIHMoUPGF1vEOvTWHTcgqeJQahNwLqVQiRRpIdS+XcM2l4h
1t2DI3WAP7oGoSYE3kwSPQofljcqm/kxjK4SCH0OXSMetItsUC26wZuOVptYhI0eEOuz1YI2gZnKBdpr
6iR9V2jkKOkBQpeiCryhFFr4eioft16iU7qNho4h1Dc00QOqlRuwpSSa+UawuZXdByIZsPoUaOmWwrUf
owcOozlwZeto7ZXDuXvCfHV/+dGfqqrf44qgu28AAAAASUVORK5CYII=
</value>
</data>
<data name="copyToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAeJJREFUOE+lk9FP
klEYxv1TSsecde0f0FpZrTbbal7URVvZuuJCr7pq2WzLNWy0iSHNwtIB9qG0ltLSYRJpBomUgZPMGSyU
8SmJIOiv7zssCdrAzXd77s77e5/nnPdUVR20HBPfUCWNB4QsI176HB8IL/9iX2y1ubTMwx6utz0nuLhc
GWIfCxT153Z26ep/g9Md4FJLZ2WIZdQnAM4QSJ/BH5Z5aH6NNCljm0hgdSV4MppAPxQXCq5kil31OTx7
DjLbOeSNNJFYUgBKq31glfpmN76F9QLEZHOJc73ubXQjMreln7Q+DdP/du0/QIsxhmNK5mjTMJ/m43mI
Qcmr5t5MZVlNpFiKrPM1vIbpVVQAOqSckF+ZekUX5UjTS+ouDFLb+CwPUPNupbN7k7WmEDcMX3hgXSpy
IP/OsrCyhXtuA6M0g+bc4wJATqaZ/x7DF4zg8f9g/OMibb355701kERriHL5fojzd2aFjNI0mjPdBUD9
6auUqlU/KwBZJV4skWUuvMmYV8b+Ls6jQQ81DfryO3KtfUoA/p3810G37T3VJ3TlARdvukhldjANeemx
z2B8MS0mq80GyySHj98rD2jQOpXbtgrVNprRnO2h5lQX1Sc7leYODh27W3nN9/WZDnroDx0A5wwhdtmt
AAAAAElFTkSuQmCC
</value>
</data>
<data name="pasteToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlBJREFUOE+1k1lI
lGEUhn/owm6KFuqqq4LoJooIqouMwixMM4zEjKyJGJUSlcnSITU1RSe3SdPGyGVQc6tEUSkSIXFo13CM
FonUyGmy5p9xz+Lp/z8ZbGjzpgMv5+a8z1n4Pkn6H9HZnEH7zVQayxKYF7+hMg+3ynKO4LBVMWa7xmBf
Nme1vuSl67hi0GNMj/sVqBon5XqmnXVMOqoxF+sYH6kgJyWKF13xnD/tT7xmM7bOY4y0riY6bL8nRAWo
5mlnDUUZR+m2ZCO/L2C4T89bywmaSgIJD/WmKnEVT/MkIg/v8wTUVeTMAuQbGBLDSNaFoI8K5lxkEDpt
IDEafyJCfciPXiMAIX7enoDqUgNTci1TdhPjQ5nYn0dhrVgu1Fu+jO7iRTwyegmzKp9tGz0BZlMGE/Yy
JgbSGH95irFnB5GbF5Nb3kqmqZELl2uJN5iJSS0hPMFIWGyWJ6C0MJXRQSNjfVpGH/vjur+Jj7dXCLM7
pme+4XBOMjDsIDgihYDj+jlISW4S8qs0XA99cXWsx9m2ksFySXRWo/RWp5Cppp3efpsw3+2ysidIMwsp
zErgc88ZnO3rkFuWYq/3ov+6JMb+OvOdLy6l8wcHvW9sWHre4Rcag69i3rX3AN7bdyDlX4zD/iBCMS/h
U8NChioXYC2SiFZ2Vsd2T3BVmaDA3EZTh1VkVVs3rEW6lBwrHoj7yu6sVQ72c+d7ltfCXH+nm5rWJ3MA
dY3cpJPKCwtEE7SbgJ1bBFm9trqzu9vvspjgT3FIubZa8C/N67P9regHTvjvLQ3rR38AAAAASUVORK5C
YII=
</value>
</data>
<data name="helpToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAhhJREFUOE+1U09r
E0EU70fIR9iPUBQ8eMrR46IN5JhCDz2oBA8SBHEpCMFgG5GiwdJdq2Ijqe6ldo3Wrmhri0gXazW2YbMt
UdNmm45ulf7R/HwzU1hLIzn54LFvhvn9eW9nOjr+R0wvBLhTXEf6bgV9w0sYLJQx/uoz2mq9c7eRn2pA
L67Bq+/i29YeWLBL9Q6u5ktI6w6Kr1dbE3HwA3sT/o8mbAfQRgE1LZPXtsPgbjZxaXAG4y/Kh0m48sbP
JgwbiKYAwwLYNkR4DEje5HsMFSI5l3l2kGD6/RYezzeEMgfzwzzMWSCRlV9OFk0xqhl06wNy+Tchyb2n
dXxhv4TVaFLazppAJ9VKL0MySxYoVI0hkXaw5AbovjAWEmTur4qBqZoEdfbKVCgTBObqdolBUW0ocRs1
P8Cx2PWQ4PJtl6a9J+xLIB1OMHIilU2b1gSMqCZ9TdTq33FEHQgJcg8rWPF3qHcJVOKeyOyoJIioDqUk
UFM2SuUqus4YIcHEzFdYji8GxIGROAc41JJHc6E1B58wRRqWhzFrEVduTR78E5mRBSz7v0l1H0AgXgsH
+2DNcPBp3cep0/rhezA5V0Vfbg5ug+4CqaiaI/rmyWu+t1zdQIysDxdmW9/GiZcVnO+fgvHkI+YXV7BG
067VA9Ezt91Fyvq/wH8/lKHCW/RcfITj8Rs4evIaYmdHkBl63v4xtX1tLQ78AZ3a8qxOv4hDAAAAAElF
TkSuQmCC
Qk32AgAAAAAAADYAAAAoAAAADgAAABAAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+EgoTGw8bGw8bGw8bGw8bGw8bGw8bG
w8bGw8bGw8bGw8bGw8bGw8YAAAAA/4SChP///////////////////////////////////////////8bD
xgAAAAD/hIKE////////////////////////////////////////////xsPGAAAAAP+EgoT/////////
///////////////////////////////////Gw8YAAAAA/4SChP//////////////////////////////
/////////////8bDxgAAAAD/hIKE////////////AAD/AAD/////////AAD/AAD/////////xsPGAAAA
AP+EgoT///////////////8AAP8AAP8AAP8AAP/////////////Gw8YAAAAA/4SChP//////////////
/////wAA/wAA/////////////////8bDxgAAAAD/hIKE////////////////AAD/AAD/AAD/AAD/////
////////xsPGAAAAAP+EgoT///////////8AAP8AAP////////8AAP8AAP/////////Gw8YAAAAA/4SC
hP///////////////////////////////////////////8bDxgAAAAD/hIKE////////////////////
////////////////////////xsPGAAAAAP+EgoT/////////////////////////////////////////
///Gw8YAAAAA/4SChP///////////////////////////////////////////8bDxgAAAAD/hIKEhIKE
hIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEAP8=
</value>
</data>
</root>

View File

@@ -97,6 +97,11 @@ namespace d20_SRD_Spell_Lists.Models {
public void addAllClassSpells() {
Spells.AddRange(new MasterSpellSet().byClass(CharacterClass));
Spells.Sort(new SpellInequalityComparer());
}
public string SpellCastingAttributeModAsString() {
return String.Format((SpellCastingAttributeMod >= 0) ? "+{0:D}" : "{0:D}", SpellCastingAttributeMod);
}
}
}

View File

@@ -55,7 +55,7 @@ namespace d20_SRD_Spell_Lists.Models {
}
}
public class SpellComparer : IEqualityComparer<Spell> {
public class SpellEqualityComparer : IEqualityComparer<Spell> {
public bool Equals(Spell x, Spell y) {
return x.Name == y.Name;
}
@@ -64,4 +64,31 @@ namespace d20_SRD_Spell_Lists.Models {
return obj.Name.GetHashCode();
}
}
public class SpellInequalityComparer : IComparer<Spell> {
public int Compare(Spell x, Spell y) {
if (x.Level < y.Level) {
return -1;
}
if (x.Level == y.Level && x.Name.CompareTo(y.Name) < 0) {
return -1;
}
if (x.Level == y.Level && x.Name.CompareTo(y.Name) == 0) {
return 0;
}
if (x.Level == y.Level && x.Name.CompareTo(y.Name) > 0) {
return 1;
}
if (x.Level > y.Level) {
return 1;
}
return 0;
}
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace Printing.DataGridViewPrint.Tools {
public class FooterPrintBlock : PrintBlock {
public string Footer { get; set; }
public Font Font { get; set; }
public StringFormat Format { get; set; }
public FooterPrintBlock() {
Format = new StringFormat();
Format.LineAlignment = StringAlignment.Center;
Format.Alignment = StringAlignment.Far;
Format.Trimming = StringTrimming.Word;
Format.FormatFlags = StringFormatFlags.LineLimit;
this.Font = new Font("Tahoma", 8);
}
public override SizeF GetSize(Graphics g, DocumentMetrics metrics) {
return g.MeasureString(Footer, Font, metrics.PrintAbleWidth, Format);
}
public override void Draw(System.Drawing.Graphics g, Dictionary<CodeEnum, string> codes) {
g.DrawString(string.Format("Page {0} Of {1}", codes[CodeEnum.SheetNumber], codes[CodeEnum.SheetsCount]), Font, new SolidBrush(Color.Black), Rectangle, Format);
}
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace Printing.DataGridViewPrint.Tools {
/// <summary>
/// The HeaderPrintBlock controls information that prints small at the very top of each page.
/// </summary>
public class HeaderPrintBlock : PrintBlock {
public string Header { get; set; }
public Font Font { get; set; }
public StringFormat Format { get; set; }
public HeaderPrintBlock() {
Format = new StringFormat();
Format.LineAlignment = StringAlignment.Center;
Format.Alignment = StringAlignment.Far;
Format.Trimming = StringTrimming.Word;
Format.FormatFlags = StringFormatFlags.LineLimit;
this.Font = new Font("Tahoma", 8);
}
public override SizeF GetSize(Graphics g, DocumentMetrics metrics) {
return g.MeasureString(Header, Font, metrics.PrintAbleWidth, Format);
}
public override void Draw(System.Drawing.Graphics g, Dictionary<CodeEnum, string> codes) {
g.DrawString(Header, Font, new SolidBrush(Color.Black), Rectangle, Format);
}
}
}

View File

@@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using d20_SRD_Spell_Lists.Models;
using System.Windows.Forms;
namespace Printing.DataGridViewPrint.Tools
{
/// <author>Blaise Braye</author>
/// <summary>
/// Reusable Sample of a title to print on first printed sheet
/// </summary>
public class TitlePrintBlock : PrintBlock
{
public String Title { get; set; }
public System.Windows.Forms.TableLayoutPanel DCs { get; set; }
public String CharName { get; set; }
public String CharClass { get; set; }
public String CharAttrName { get; set; }
public String CharAttr { get; set; }
public String CharAttrMod { get; set; }
public Color ForeColor { get; set; }
public Font Font { get; set; }
public Font BodyFont { get; set; }
public StringFormat Format { get; set; }
public StringFormat BodyFormat { get; set; }
private SizeF titleSize;
private SizeF nameSize;
public TitlePrintBlock()
{
Format = new StringFormat();
Format.LineAlignment = StringAlignment.Near;
Format.Alignment = StringAlignment.Center;
Format.Trimming = StringTrimming.Word;
Format.FormatFlags = StringFormatFlags.LineLimit;
this.Font = new Font("Tahoma", 14, FontStyle.Bold);
this.Title = "this is a sample title";
this.BodyFont = new Font("Times New Roman", 12, FontStyle.Regular);
this.ForeColor = Color.Black;
BodyFormat = new StringFormat();
BodyFormat.LineAlignment = StringAlignment.Center;
BodyFormat.Alignment = StringAlignment.Near;
BodyFormat.Trimming = StringTrimming.Word;
BodyFormat.FormatFlags = StringFormatFlags.LineLimit;
}
public override SizeF GetSize(Graphics g, DocumentMetrics metrics)
{
Title += " \u2014 " + CharName + "\r\n";
titleSize = g.MeasureString(Title, Font, metrics.PrintAbleWidth, Format);
nameSize = g.MeasureString(Title, BodyFont, metrics.PrintAbleWidth, BodyFormat);
nameSize.Height += 5;
SizeF tableSize = DCs.DisplayRectangle.Size;
tableSize.Height += 100;
return new SizeF(metrics.PrintAbleWidth, titleSize.Height + tableSize.Height);
}
public override void Draw(Graphics g, Dictionary<CodeEnum, string> codes)
{
g.DrawString(Title, Font, new SolidBrush(ForeColor), Rectangle, Format);
float midWidth = Rectangle.Width / 2;
float thirdWidth = Rectangle.Width / 3;
float textPadding = 40;
float tablePadding = 20;
g.DrawString(CharName + ", " + CharClass + "\r\n", BodyFont, new SolidBrush(ForeColor), thirdWidth, Rectangle.Y + titleSize.Height + textPadding, BodyFormat);
g.DrawString(CharAttrName + ": " + CharAttr + " | " + CharAttrMod, BodyFont, new SolidBrush(ForeColor), thirdWidth, Rectangle.Y + titleSize.Height + nameSize.Height + textPadding, BodyFormat);
using (Bitmap printImage = new Bitmap(DCs.Width, DCs.Height)) {
//Draw the TableLayoutPanel control to the temporary bitmap image
Color oldBkgd = DCs.BackColor;
DCs.BackColor = Color.White;
DCs.DrawToBitmap(printImage, new Rectangle(0, 0, printImage.Width, printImage.Height));
g.DrawImage(printImage, new PointF(midWidth, Rectangle.Y + titleSize.Height + tablePadding));
DCs.BackColor = oldBkgd;
}
}
}
}

View File

@@ -5,12 +5,17 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("d20 SRD Spell Lists")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("D20 SRD Spell Lists")]
[assembly: AssemblyDescription(@"<p>Major kudos to the following projects:</p>
<ul>
<li><a href=""http://www.andargor.com/"">Andargor</a>'s SRD 3.5 Database - The spell list (in XML format) is what's used here for the base spells.</li>
<li><a href=""http://www.codeproject.com/KB/grid/GridDrawer.Net.aspx"">GridDrawer</a> - Used (with some tweaks) to print the spell lists.</li>
<li><a href=""http://www.famfamfam.com/"">FamFamFam</a> - Their Silk icons grace these forms, although I had to create my own print preview icon.</li>
</ul>")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Wells Fargo NA")]
[assembly: AssemblyProduct("d20 SRD Spell Lists")]
[assembly: AssemblyCopyright("Copyright © Wells Fargo NA 2011")]
[assembly: AssemblyCompany("Melissa Avery-Weir")]
[assembly: AssemblyProduct("D20 SRD Spell Lists")]
[assembly: AssemblyCopyright("Copyright © Melissa Avery-Weir 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,5 +37,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -60,6 +60,27 @@ namespace d20_SRD_Spell_Lists.Properties {
}
}
internal static System.Drawing.Bitmap agt_print_256 {
get {
object obj = ResourceManager.GetObject("agt_print-256", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap cut {
get {
object obj = ResourceManager.GetObject("cut", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap delete {
get {
object obj = ResourceManager.GetObject("delete", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap edit_16 {
get {
object obj = ResourceManager.GetObject("edit-16", resourceCulture);
@@ -87,5 +108,103 @@ namespace d20_SRD_Spell_Lists.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap filenew_256 {
get {
object obj = ResourceManager.GetObject("filenew-256", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap fileopen_256 {
get {
object obj = ResourceManager.GetObject("fileopen-256", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap filesave_256 {
get {
object obj = ResourceManager.GetObject("filesave-256", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap filesave_32 {
get {
object obj = ResourceManager.GetObject("filesave-32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap folder_page {
get {
object obj = ResourceManager.GetObject("folder_page", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap information {
get {
object obj = ResourceManager.GetObject("information", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap page_add {
get {
object obj = ResourceManager.GetObject("page_add", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap page_copy {
get {
object obj = ResourceManager.GetObject("page_copy", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap page_paste {
get {
object obj = ResourceManager.GetObject("page_paste", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap page_save {
get {
object obj = ResourceManager.GetObject("page_save", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap pencil {
get {
object obj = ResourceManager.GetObject("pencil", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap print_preview {
get {
object obj = ResourceManager.GetObject("print-preview", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap printer {
get {
object obj = ResourceManager.GetObject("printer", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap zoom {
get {
object obj = ResourceManager.GetObject("zoom", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -118,16 +118,67 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="editdelete_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\editdelete-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="cut" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cut.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="edit_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\edit-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="folder_page" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\folder_page.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="information" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="agt_print-256" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\agt_print-256.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="filesave-32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\filesave-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="printer" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\printer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="edit-16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\edit-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="editdelete_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\editdelete-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="filesave-256" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\filesave-256.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_paste.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_copy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="fileopen-256" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\fileopen-256.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="editdelete-16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\editdelete-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="filenew-256" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\filenew-256.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="edit_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\edit-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zoom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="print-preview" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\print-preview.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

View File

@@ -49,8 +49,11 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Printing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -83,6 +86,9 @@
<Compile Include="Models\Character.cs" />
<Compile Include="Models\Spell.cs" />
<Compile Include="Models\MasterSpellSet.cs" />
<Compile Include="Printing\FooterPrintBlock.cs" />
<Compile Include="Printing\HeaderPrintBlock.cs" />
<Compile Include="Printing\TitlePrintBlock.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FrmAddEdit.resx">
@@ -123,6 +129,23 @@
<Content Include="AppData\UserSpellList.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Resources\print-preview.png" />
<None Include="Resources\information.png" />
<None Include="Resources\folder_page.png" />
<None Include="Resources\cut.png" />
<None Include="Resources\page_paste.png" />
<None Include="Resources\page_copy.png" />
<None Include="Resources\page_add.png" />
<None Include="Resources\printer.png" />
<None Include="Resources\pencil.png" />
<None Include="Resources\page_save.png" />
<None Include="Resources\delete.png" />
<None Include="Resources\zoom.png" />
<None Include="Resources\agt_print-256.png" />
<None Include="Resources\filenew-256.png" />
<None Include="Resources\fileopen-256.png" />
<None Include="Resources\filesave-256.png" />
<None Include="Resources\filesave-32.png" />
<None Include="Resources\editdelete-16.png" />
<None Include="Resources\edit-16.png" />
<None Include="Resources\editdelete-32.png" />
@@ -152,6 +175,13 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Printing.DataGridViewPrint\Printing.DataGridViewPrint.csproj">
<Project>{FDFCB41B-C75D-476F-A4AA-EFD8C875A677}</Project>
<Name>Printing.DataGridViewPrint</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.