Added source code.

This commit is contained in:
2018-02-06 01:24:46 +02:00
parent 1d9f2990c8
commit 8b28da5b80
367 changed files with 22964 additions and 0 deletions

View File

@ -0,0 +1,103 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace MatrixCalculator
{
public static class CsvParser
{
/// <summary>
/// Converts a CSV string into a DataTable
/// </summary>
/// <param name="csv">CSV</param>
/// <param name="separators">Separator characters</param>
/// <param name="combine">Should separators be combined?</param>
public static DataTable GetTable(string csv, char[] separators, bool combine = false)
{
DataTable table = new DataTable("table");
table.Columns.Add();
csv = csv.TrimEnd('\n', '\r');
string[] lines = csv.Split('\n');
for (int i = 0; i < lines.Length; i++)
{
string[] vals = lines[i].Split(separators, (combine ? StringSplitOptions.RemoveEmptyEntries : StringSplitOptions.None));
table.Rows.Add("");
for (int j = 0; j < vals.Length; j++)
{
if (j >= table.Columns.Count) table.Columns.Add();
table.Rows[i][j] = vals[j];
}
}
return table;
}
/// <summary>
/// Converts matrix to CSV string
/// </summary>
/// <param name="m">The matrix</param>
/// <param name="sep">CSV separator character</param>
public static string ToCSV (MathNet.Numerics.LinearAlgebra.Matrix<double> m, char sep = ',')
{
StringBuilder str = new StringBuilder();
for (int i = 0; i < m.RowCount; i++)
{
for (int j = 0; j < m.ColumnCount; j++) {
str.Append(m[i, j]);
if (j < m.ColumnCount - 1) str.Append(sep);
}
str.Append('\n');
}
return str.ToString();
}
/// <summary>
/// Converts the data in a DataGridView to CSV format
/// </summary>
/// <param name="m">The DataGridView</param>
/// <param name="sep">CSV separator</param>
public static string ToCSV(System.Windows.Forms.DataGridView m, char sep = ',')
{
return ToCSV(m, 0, 0, m.Rows.Count, m.Columns.Count, false, sep);
}
/// <summary>
/// Converts the data in a DataGridView to CSV format
/// </summary>
/// <param name="m">The DataGridView</param>
/// <param name="startRow">First row in range.</param>
/// <param name="startCol">First column in range.</param>
/// <param name="endRow">Last row in range.</param>
/// <param name="endCol">Last column in range.</param>
/// <param name="just_selected">Only selected cells will be taken.</param>
/// <param name="sep">CSV separator</param>
public static string ToCSV(System.Windows.Forms.DataGridView m, int startRow, int startCol, int endRow, int endCol, bool just_selected = false, char sep = ',')
{
StringBuilder str = new StringBuilder();
for (int i = startRow; i < endRow; i++)
{
for (int j = startCol; j < endCol; j++)
{
if (!just_selected || (just_selected && m[j, i].Selected))
str.Append(m[j, i].Value);
if (j < m.ColumnCount - 1) str.Append(sep);
}
str.Append('\n');
}
return str.ToString();
}
}
}

View File

@ -0,0 +1,454 @@
namespace MatrixCalculator
{
partial class Editor
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.dataEditorContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.contextMenuCut = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuCopy = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuPaste = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.contextMenuClear = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuClearAll = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.contextMenuInsertRow = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuInsertCol = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuDelRow = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuDelColumn = new System.Windows.Forms.ToolStripMenuItem();
this.groupSize = new DynamicLink.Controls.MyGroupBox();
this.buttonResizeReset = new DynamicLink.Controls.MyButton();
this.labelWarning = new System.Windows.Forms.Label();
this.buttonResizeApply = new DynamicLink.Controls.MyButton();
this.labelColumns = new System.Windows.Forms.Label();
this.labelRows = new System.Windows.Forms.Label();
this.inputColumns = new System.Windows.Forms.NumericUpDown();
this.inputRows = new System.Windows.Forms.NumericUpDown();
this.groupInfo = new DynamicLink.Controls.MyGroupBox();
this.inputDescription = new System.Windows.Forms.TextBox();
this.inputName = new System.Windows.Forms.TextBox();
this.labelDescription = new System.Windows.Forms.Label();
this.labelName = new System.Windows.Forms.Label();
this.buttonAccept = new DynamicLink.Controls.MyButton();
this.buttonCancel = new DynamicLink.Controls.MyButton();
this.groupBoxMatrixData = new DynamicLink.Controls.MyGroupBox();
this.dataEditor = new System.Windows.Forms.DataGridView();
this.dataEditorContextMenu.SuspendLayout();
this.groupSize.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.inputColumns)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.inputRows)).BeginInit();
this.groupInfo.SuspendLayout();
this.groupBoxMatrixData.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataEditor)).BeginInit();
this.SuspendLayout();
//
// dataEditorContextMenu
//
this.dataEditorContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.contextMenuCut,
this.contextMenuCopy,
this.contextMenuPaste,
this.toolStripSeparator1,
this.contextMenuClear,
this.contextMenuClearAll,
this.toolStripSeparator2,
this.contextMenuInsertRow,
this.contextMenuInsertCol,
this.contextMenuDelRow,
this.contextMenuDelColumn});
this.dataEditorContextMenu.Name = "dataEditorContextMenu";
this.dataEditorContextMenu.Size = new System.Drawing.Size(226, 214);
//
// contextMenuCut
//
this.contextMenuCut.Name = "contextMenuCut";
this.contextMenuCut.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
this.contextMenuCut.Size = new System.Drawing.Size(225, 22);
this.contextMenuCut.Text = "Cu&t";
this.contextMenuCut.Click += new System.EventHandler(this.contextMenuCut_Click);
//
// contextMenuCopy
//
this.contextMenuCopy.Name = "contextMenuCopy";
this.contextMenuCopy.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
this.contextMenuCopy.Size = new System.Drawing.Size(225, 22);
this.contextMenuCopy.Text = "&Copy";
this.contextMenuCopy.Click += new System.EventHandler(this.contextMenuCopy_Click);
//
// contextMenuPaste
//
this.contextMenuPaste.Name = "contextMenuPaste";
this.contextMenuPaste.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
this.contextMenuPaste.Size = new System.Drawing.Size(225, 22);
this.contextMenuPaste.Text = "&Paste";
this.contextMenuPaste.Click += new System.EventHandler(this.contextMenuPaste_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(222, 6);
//
// contextMenuClear
//
this.contextMenuClear.Name = "contextMenuClear";
this.contextMenuClear.ShortcutKeys = System.Windows.Forms.Keys.Delete;
this.contextMenuClear.Size = new System.Drawing.Size(225, 22);
this.contextMenuClear.Text = "&Clear selected";
this.contextMenuClear.Click += new System.EventHandler(this.contextMenuClear_Click);
//
// contextMenuClearAll
//
this.contextMenuClearAll.Name = "contextMenuClearAll";
this.contextMenuClearAll.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.Delete)));
this.contextMenuClearAll.Size = new System.Drawing.Size(225, 22);
this.contextMenuClearAll.Text = "Clear &all";
this.contextMenuClearAll.Click += new System.EventHandler(this.contextMenuClearAll_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(222, 6);
//
// contextMenuInsertRow
//
this.contextMenuInsertRow.Name = "contextMenuInsertRow";
this.contextMenuInsertRow.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Alt)
| System.Windows.Forms.Keys.R)));
this.contextMenuInsertRow.Size = new System.Drawing.Size(225, 22);
this.contextMenuInsertRow.Text = "Insert row";
this.contextMenuInsertRow.Click += new System.EventHandler(this.contextMenuInsertRow_Click);
//
// contextMenuInsertCol
//
this.contextMenuInsertCol.Name = "contextMenuInsertCol";
this.contextMenuInsertCol.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Alt)
| System.Windows.Forms.Keys.C)));
this.contextMenuInsertCol.Size = new System.Drawing.Size(225, 22);
this.contextMenuInsertCol.Text = "Insert column";
this.contextMenuInsertCol.Click += new System.EventHandler(this.contextMenuInsertCol_Click);
//
// contextMenuDelRow
//
this.contextMenuDelRow.Name = "contextMenuDelRow";
this.contextMenuDelRow.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.R)));
this.contextMenuDelRow.Size = new System.Drawing.Size(225, 22);
this.contextMenuDelRow.Text = "Delete row";
this.contextMenuDelRow.Click += new System.EventHandler(this.contextMenuDelRow_Click);
//
// contextMenuDelColumn
//
this.contextMenuDelColumn.Name = "contextMenuDelColumn";
this.contextMenuDelColumn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.C)));
this.contextMenuDelColumn.Size = new System.Drawing.Size(225, 22);
this.contextMenuDelColumn.Text = "Delete column";
this.contextMenuDelColumn.Click += new System.EventHandler(this.contextMenuDelColumn_Click);
//
// groupSize
//
this.groupSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupSize.BackColor = System.Drawing.Color.Transparent;
this.groupSize.Controls.Add(this.buttonResizeReset);
this.groupSize.Controls.Add(this.labelWarning);
this.groupSize.Controls.Add(this.buttonResizeApply);
this.groupSize.Controls.Add(this.labelColumns);
this.groupSize.Controls.Add(this.labelRows);
this.groupSize.Controls.Add(this.inputColumns);
this.groupSize.Controls.Add(this.inputRows);
this.groupSize.Location = new System.Drawing.Point(382, 135);
this.groupSize.Name = "groupSize";
this.groupSize.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.groupSize.Size = new System.Drawing.Size(192, 153);
this.groupSize.TabIndex = 1;
this.groupSize.TabStop = false;
this.groupSize.Text = "Matrix size:";
//
// buttonResizeReset
//
this.buttonResizeReset.BackColor = System.Drawing.Color.Transparent;
this.buttonResizeReset.Location = new System.Drawing.Point(6, 124);
this.buttonResizeReset.Name = "buttonResizeReset";
this.buttonResizeReset.Size = new System.Drawing.Size(87, 23);
this.buttonResizeReset.TabIndex = 6;
this.buttonResizeReset.Text = "Reset";
this.buttonResizeReset.UseVisualStyleBackColor = false;
this.buttonResizeReset.Click += new System.EventHandler(this.buttonResizeReset_Click);
//
// labelWarning
//
this.labelWarning.Location = new System.Drawing.Point(6, 87);
this.labelWarning.Name = "labelWarning";
this.labelWarning.Size = new System.Drawing.Size(180, 27);
this.labelWarning.TabIndex = 5;
this.labelWarning.Text = "Warning: removing rows or columns will delete the data contained.";
//
// buttonResizeApply
//
this.buttonResizeApply.BackColor = System.Drawing.Color.Transparent;
this.buttonResizeApply.Location = new System.Drawing.Point(99, 124);
this.buttonResizeApply.Name = "buttonResizeApply";
this.buttonResizeApply.Size = new System.Drawing.Size(87, 23);
this.buttonResizeApply.TabIndex = 4;
this.buttonResizeApply.Text = "Apply";
this.buttonResizeApply.UseVisualStyleBackColor = false;
this.buttonResizeApply.Click += new System.EventHandler(this.buttonResizeApply_Click);
//
// labelColumns
//
this.labelColumns.AutoSize = true;
this.labelColumns.Location = new System.Drawing.Point(6, 57);
this.labelColumns.Name = "labelColumns";
this.labelColumns.Size = new System.Drawing.Size(50, 13);
this.labelColumns.TabIndex = 3;
this.labelColumns.Text = "Columns:";
//
// labelRows
//
this.labelRows.AutoSize = true;
this.labelRows.Location = new System.Drawing.Point(6, 31);
this.labelRows.Name = "labelRows";
this.labelRows.Size = new System.Drawing.Size(37, 13);
this.labelRows.TabIndex = 2;
this.labelRows.Text = "Rows:";
//
// inputColumns
//
this.inputColumns.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.inputColumns.Location = new System.Drawing.Point(90, 55);
this.inputColumns.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.inputColumns.Name = "inputColumns";
this.inputColumns.Size = new System.Drawing.Size(94, 20);
this.inputColumns.TabIndex = 1;
this.inputColumns.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// inputRows
//
this.inputRows.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.inputRows.Location = new System.Drawing.Point(90, 29);
this.inputRows.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.inputRows.Name = "inputRows";
this.inputRows.Size = new System.Drawing.Size(94, 20);
this.inputRows.TabIndex = 0;
this.inputRows.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// groupInfo
//
this.groupInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupInfo.BackColor = System.Drawing.Color.Transparent;
this.groupInfo.Controls.Add(this.inputDescription);
this.groupInfo.Controls.Add(this.inputName);
this.groupInfo.Controls.Add(this.labelDescription);
this.groupInfo.Controls.Add(this.labelName);
this.groupInfo.Location = new System.Drawing.Point(382, 13);
this.groupInfo.Name = "groupInfo";
this.groupInfo.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.groupInfo.Size = new System.Drawing.Size(192, 116);
this.groupInfo.TabIndex = 2;
this.groupInfo.TabStop = false;
this.groupInfo.Text = "Matrix info:";
//
// inputDescription
//
this.inputDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.inputDescription.Location = new System.Drawing.Point(6, 67);
this.inputDescription.Multiline = true;
this.inputDescription.Name = "inputDescription";
this.inputDescription.Size = new System.Drawing.Size(178, 43);
this.inputDescription.TabIndex = 7;
//
// inputName
//
this.inputName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.inputName.Location = new System.Drawing.Point(50, 22);
this.inputName.Name = "inputName";
this.inputName.Size = new System.Drawing.Size(134, 20);
this.inputName.TabIndex = 6;
//
// labelDescription
//
this.labelDescription.AutoSize = true;
this.labelDescription.Location = new System.Drawing.Point(6, 51);
this.labelDescription.Name = "labelDescription";
this.labelDescription.Size = new System.Drawing.Size(63, 13);
this.labelDescription.TabIndex = 5;
this.labelDescription.Text = "Description:";
//
// labelName
//
this.labelName.AutoSize = true;
this.labelName.Location = new System.Drawing.Point(6, 25);
this.labelName.Name = "labelName";
this.labelName.Size = new System.Drawing.Size(38, 13);
this.labelName.TabIndex = 4;
this.labelName.Text = "Name:";
//
// buttonAccept
//
this.buttonAccept.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAccept.BackColor = System.Drawing.Color.Transparent;
this.buttonAccept.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAccept.ForeColor = System.Drawing.Color.DarkGreen;
this.buttonAccept.Location = new System.Drawing.Point(490, 327);
this.buttonAccept.Name = "buttonAccept";
this.buttonAccept.Size = new System.Drawing.Size(84, 29);
this.buttonAccept.TabIndex = 8;
this.buttonAccept.Text = "Accept";
this.buttonAccept.UseVisualStyleBackColor = false;
this.buttonAccept.Click += new System.EventHandler(this.buttonAccept_Click);
//
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.BackColor = System.Drawing.Color.Transparent;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(400, 327);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(84, 29);
this.buttonCancel.TabIndex = 7;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = false;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// groupBoxMatrixData
//
this.groupBoxMatrixData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxMatrixData.BackColor = System.Drawing.Color.Transparent;
this.groupBoxMatrixData.Controls.Add(this.dataEditor);
this.groupBoxMatrixData.Location = new System.Drawing.Point(12, 13);
this.groupBoxMatrixData.Name = "groupBoxMatrixData";
this.groupBoxMatrixData.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.groupBoxMatrixData.Size = new System.Drawing.Size(364, 343);
this.groupBoxMatrixData.TabIndex = 9;
this.groupBoxMatrixData.TabStop = false;
this.groupBoxMatrixData.Text = "Matrix data";
//
// dataEditor
//
this.dataEditor.AllowUserToAddRows = false;
this.dataEditor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataEditor.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataEditor.ContextMenuStrip = this.dataEditorContextMenu;
this.dataEditor.Location = new System.Drawing.Point(3, 21);
this.dataEditor.Name = "dataEditor";
this.dataEditor.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders;
this.dataEditor.Size = new System.Drawing.Size(358, 319);
this.dataEditor.TabIndex = 1;
this.dataEditor.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataEditor_CellMouseDown);
//
// Editor
//
this.AcceptButton = this.buttonAccept;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(586, 368);
this.Controls.Add(this.groupBoxMatrixData);
this.Controls.Add(this.buttonAccept);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.groupInfo);
this.Controls.Add(this.groupSize);
this.HelpButton = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Editor";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Editor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Editor_FormClosing);
this.dataEditorContextMenu.ResumeLayout(false);
this.groupSize.ResumeLayout(false);
this.groupSize.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.inputColumns)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.inputRows)).EndInit();
this.groupInfo.ResumeLayout(false);
this.groupInfo.PerformLayout();
this.groupBoxMatrixData.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataEditor)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DynamicLink.Controls.MyGroupBox groupSize;
private DynamicLink.Controls.MyButton buttonResizeApply;
private System.Windows.Forms.Label labelColumns;
private System.Windows.Forms.Label labelRows;
private System.Windows.Forms.NumericUpDown inputColumns;
private System.Windows.Forms.NumericUpDown inputRows;
private DynamicLink.Controls.MyButton buttonResizeReset;
private System.Windows.Forms.Label labelWarning;
private DynamicLink.Controls.MyGroupBox groupInfo;
private System.Windows.Forms.TextBox inputDescription;
private System.Windows.Forms.TextBox inputName;
private System.Windows.Forms.Label labelDescription;
private System.Windows.Forms.Label labelName;
private DynamicLink.Controls.MyButton buttonAccept;
private DynamicLink.Controls.MyButton buttonCancel;
private System.Windows.Forms.ContextMenuStrip dataEditorContextMenu;
private System.Windows.Forms.ToolStripMenuItem contextMenuCut;
private System.Windows.Forms.ToolStripMenuItem contextMenuCopy;
private System.Windows.Forms.ToolStripMenuItem contextMenuPaste;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem contextMenuClear;
private System.Windows.Forms.ToolStripMenuItem contextMenuClearAll;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem contextMenuInsertRow;
private System.Windows.Forms.ToolStripMenuItem contextMenuInsertCol;
private System.Windows.Forms.ToolStripMenuItem contextMenuDelRow;
private System.Windows.Forms.ToolStripMenuItem contextMenuDelColumn;
private DynamicLink.Controls.MyGroupBox groupBoxMatrixData;
private System.Windows.Forms.DataGridView dataEditor;
}
}

View File

@ -0,0 +1,181 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MathNet.Numerics.LinearAlgebra;
namespace MatrixCalculator
{
public partial class Editor : Form
{
bool allowExit = true;
#region Setters and getters
public string MatrixName {
get { return inputName.Text; }
set { inputName.Text = value; }
}
public string MatrixDescription
{
get { return inputDescription.Text; }
set { inputDescription.Text = value; }
}
public Matrix<double> Matrix
{
get { return GridViewHelper.GetMatrix(dataEditor); }
set {
GridViewHelper.PutMatrix(value, dataEditor);
inputColumns.Value = value.ColumnCount;
inputRows.Value = value.RowCount;
}
}
#endregion
#region Constructor
public Editor()
{
InitializeComponent();
inputName.Text = "New matrix ";
}
#endregion
#region Resize buttons
private void buttonResizeReset_Click(object sender, EventArgs e)
{
inputRows.Value = dataEditor.Rows.Count;
inputColumns.Value = dataEditor.Columns.Count;
}
private void buttonResizeApply_Click(object sender, EventArgs e)
{
int rows = Convert.ToInt32(inputRows.Value);
int cols = Convert.ToInt32(inputColumns.Value);
GridViewHelper.Resize(dataEditor, cols, rows);
}
#endregion
#region Form buttons
private void buttonAccept_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.OK;
// Make sure name is not empty
if (MatrixName == "")
{
allowExit = false;
MessageBox.Show("You must enter a name!", "Error!");
}
// Make sure size is not empty! Empty matrices behave very weird
else if (dataEditor.Columns.Count == 0 || dataEditor.Rows.Count == 0)
{
allowExit = false;
MessageBox.Show("The matrix must have at least one row and one column!", "Error!");
}
}
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Close();
}
#endregion
#region Right click menu
private void contextMenuCut_Click(object sender, EventArgs e)
{
GridViewHelper.CopySelected(dataEditor);
foreach (DataGridViewCell i in dataEditor.SelectedCells) i.Value = "0";
}
private void contextMenuCopy_Click(object sender, EventArgs e)
{
GridViewHelper.CopySelected(dataEditor);
}
private void contextMenuPaste_Click(object sender, EventArgs e)
{
GridViewHelper.Paste(dataEditor);
}
private void contextMenuClear_Click(object sender, EventArgs e)
{
foreach (DataGridViewCell i in dataEditor.SelectedCells) i.Value = "0";
}
private void contextMenuClearAll_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow i in dataEditor.Rows)
foreach (DataGridViewCell j in i.Cells)
j.Value = "0";
}
private void contextMenuInsertRow_Click(object sender, EventArgs e)
{
if (dataEditor.CurrentCell != null) dataEditor.Rows.Insert(dataEditor.CurrentCell.RowIndex, new DataGridViewRow());
else dataEditor.Rows.Add();
}
private void contextMenuInsertCol_Click(object sender, EventArgs e)
{
var col = new DataGridViewTextBoxColumn()
{
SortMode = DataGridViewColumnSortMode.NotSortable,
AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCellsExceptHeader
};
if (dataEditor.CurrentCell != null) dataEditor.Columns.Insert(dataEditor.CurrentCell.ColumnIndex, col);
else dataEditor.Columns.Add(col);
}
private void contextMenuDelRow_Click(object sender, EventArgs e)
{
foreach (DataGridViewCell i in dataEditor.SelectedCells)
dataEditor.Rows.RemoveAt(i.RowIndex);
}
private void contextMenuDelColumn_Click(object sender, EventArgs e)
{
foreach (DataGridViewCell i in dataEditor.SelectedCells)
dataEditor.Columns.RemoveAt(i.ColumnIndex);
}
#endregion
#region Drawing
protected override void OnPaintBackground(PaintEventArgs e)
{
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
}
#endregion
private void dataEditor_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.ColumnIndex < 0 || e.ColumnIndex >= dataEditor.Columns.Count) return;
if (e.RowIndex < 0 || e.RowIndex >= dataEditor.Rows.Count) return;
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
dataEditor.CurrentCell = dataEditor.Rows[e.RowIndex].Cells[e.ColumnIndex];
if (dataEditor.ContextMenu != null) dataEditor.ContextMenu.Show(dataEditor, e.Location);
}
}
private void Editor_FormClosing(object sender, FormClosingEventArgs e)
{
if (!allowExit)
{
allowExit = true;
e.Cancel = true;
}
}
}
}

View File

@ -0,0 +1,123 @@
<?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>
<metadata name="dataEditorContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,455 @@
namespace MatrixCalculator
{
partial class ImportCsvWindow
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.buttonAccept = new DynamicLink.Controls.MyButton();
this.buttonCancel = new DynamicLink.Controls.MyButton();
this.buttonEntire = new DynamicLink.Controls.MyButton();
this.labelSepChars = new System.Windows.Forms.Label();
this.checkSepComma = new System.Windows.Forms.CheckBox();
this.checkSepSemicolon = new System.Windows.Forms.CheckBox();
this.checkSepTab = new System.Windows.Forms.CheckBox();
this.checkSepSpace = new System.Windows.Forms.CheckBox();
this.checkSepOthers = new System.Windows.Forms.CheckBox();
this.inputSepOthers = new System.Windows.Forms.TextBox();
this.checkCombine = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.groupBoxSelectRange = new DynamicLink.Controls.MyGroupBox();
this.dataGrid = new System.Windows.Forms.DataGridView();
this.groupBoxMatrixName = new DynamicLink.Controls.MyGroupBox();
this.inputName = new System.Windows.Forms.TextBox();
this.groupBoxRange = new DynamicLink.Controls.MyGroupBox();
this.labelEndColumn = new System.Windows.Forms.Label();
this.inputEndColumn = new System.Windows.Forms.NumericUpDown();
this.labelEndRow = new System.Windows.Forms.Label();
this.inputEndRow = new System.Windows.Forms.NumericUpDown();
this.labelStartColumn = new System.Windows.Forms.Label();
this.inputStartColumn = new System.Windows.Forms.NumericUpDown();
this.labelStartRow = new System.Windows.Forms.Label();
this.inputStartRow = new System.Windows.Forms.NumericUpDown();
this.groupBoxSeparators = new DynamicLink.Controls.MyGroupBox();
this.groupBoxSelectRange.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit();
this.groupBoxMatrixName.SuspendLayout();
this.groupBoxRange.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.inputEndColumn)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.inputEndRow)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.inputStartColumn)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.inputStartRow)).BeginInit();
this.groupBoxSeparators.SuspendLayout();
this.SuspendLayout();
//
// buttonAccept
//
this.buttonAccept.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAccept.BackColor = System.Drawing.Color.Transparent;
this.buttonAccept.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAccept.ForeColor = System.Drawing.Color.DarkGreen;
this.buttonAccept.Location = new System.Drawing.Point(426, 401);
this.buttonAccept.Name = "buttonAccept";
this.buttonAccept.Size = new System.Drawing.Size(75, 23);
this.buttonAccept.TabIndex = 5;
this.buttonAccept.Text = "Accept ";
this.buttonAccept.UseVisualStyleBackColor = false;
this.buttonAccept.Click += new System.EventHandler(this.buttonAccept_Click);
//
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.BackColor = System.Drawing.Color.Transparent;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(345, 401);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 4;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = false;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// buttonEntire
//
this.buttonEntire.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonEntire.BackColor = System.Drawing.Color.Transparent;
this.buttonEntire.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonEntire.Location = new System.Drawing.Point(8, 401);
this.buttonEntire.Name = "buttonEntire";
this.buttonEntire.Size = new System.Drawing.Size(75, 23);
this.buttonEntire.TabIndex = 6;
this.buttonEntire.Text = "Entire grid";
this.buttonEntire.UseVisualStyleBackColor = false;
this.buttonEntire.Click += new System.EventHandler(this.buttonEntire_Click);
//
// labelSepChars
//
this.labelSepChars.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelSepChars.AutoSize = true;
this.labelSepChars.BackColor = System.Drawing.Color.Transparent;
this.labelSepChars.Location = new System.Drawing.Point(6, 28);
this.labelSepChars.Name = "labelSepChars";
this.labelSepChars.Size = new System.Drawing.Size(85, 13);
this.labelSepChars.TabIndex = 15;
this.labelSepChars.Text = "Separator chars:";
//
// checkSepComma
//
this.checkSepComma.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkSepComma.AutoSize = true;
this.checkSepComma.BackColor = System.Drawing.Color.Transparent;
this.checkSepComma.Checked = true;
this.checkSepComma.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkSepComma.Location = new System.Drawing.Point(28, 69);
this.checkSepComma.Margin = new System.Windows.Forms.Padding(2);
this.checkSepComma.Name = "checkSepComma";
this.checkSepComma.Size = new System.Drawing.Size(61, 17);
this.checkSepComma.TabIndex = 16;
this.checkSepComma.Text = "Comma";
this.checkSepComma.UseVisualStyleBackColor = false;
this.checkSepComma.CheckedChanged += new System.EventHandler(this.checkSepComma_CheckedChanged);
//
// checkSepSemicolon
//
this.checkSepSemicolon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkSepSemicolon.AutoSize = true;
this.checkSepSemicolon.BackColor = System.Drawing.Color.Transparent;
this.checkSepSemicolon.Location = new System.Drawing.Point(28, 90);
this.checkSepSemicolon.Margin = new System.Windows.Forms.Padding(2);
this.checkSepSemicolon.Name = "checkSepSemicolon";
this.checkSepSemicolon.Size = new System.Drawing.Size(75, 17);
this.checkSepSemicolon.TabIndex = 17;
this.checkSepSemicolon.Text = "Semicolon";
this.checkSepSemicolon.UseVisualStyleBackColor = false;
this.checkSepSemicolon.CheckedChanged += new System.EventHandler(this.checkSepSemicolon_CheckedChanged);
//
// checkSepTab
//
this.checkSepTab.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkSepTab.AutoSize = true;
this.checkSepTab.BackColor = System.Drawing.Color.Transparent;
this.checkSepTab.Location = new System.Drawing.Point(28, 48);
this.checkSepTab.Margin = new System.Windows.Forms.Padding(2);
this.checkSepTab.Name = "checkSepTab";
this.checkSepTab.Size = new System.Drawing.Size(45, 17);
this.checkSepTab.TabIndex = 18;
this.checkSepTab.Text = "Tab";
this.checkSepTab.UseVisualStyleBackColor = false;
this.checkSepTab.CheckedChanged += new System.EventHandler(this.checkSepTab_CheckedChanged);
//
// checkSepSpace
//
this.checkSepSpace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkSepSpace.AutoSize = true;
this.checkSepSpace.BackColor = System.Drawing.Color.Transparent;
this.checkSepSpace.Location = new System.Drawing.Point(28, 111);
this.checkSepSpace.Margin = new System.Windows.Forms.Padding(2);
this.checkSepSpace.Name = "checkSepSpace";
this.checkSepSpace.Size = new System.Drawing.Size(57, 17);
this.checkSepSpace.TabIndex = 19;
this.checkSepSpace.Text = "Space";
this.checkSepSpace.UseVisualStyleBackColor = false;
this.checkSepSpace.CheckedChanged += new System.EventHandler(this.checkSepSpace_CheckedChanged);
//
// checkSepOthers
//
this.checkSepOthers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkSepOthers.AutoSize = true;
this.checkSepOthers.BackColor = System.Drawing.Color.Transparent;
this.checkSepOthers.Location = new System.Drawing.Point(28, 132);
this.checkSepOthers.Margin = new System.Windows.Forms.Padding(2);
this.checkSepOthers.Name = "checkSepOthers";
this.checkSepOthers.Size = new System.Drawing.Size(60, 17);
this.checkSepOthers.TabIndex = 20;
this.checkSepOthers.Text = "Others:";
this.checkSepOthers.UseVisualStyleBackColor = false;
this.checkSepOthers.CheckedChanged += new System.EventHandler(this.checkSepOthers_CheckedChanged);
//
// inputSepOthers
//
this.inputSepOthers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.inputSepOthers.Location = new System.Drawing.Point(93, 130);
this.inputSepOthers.Name = "inputSepOthers";
this.inputSepOthers.Size = new System.Drawing.Size(59, 20);
this.inputSepOthers.TabIndex = 21;
this.inputSepOthers.TextChanged += new System.EventHandler(this.inputSepOthers_TextChanged);
//
// checkCombine
//
this.checkCombine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkCombine.AutoSize = true;
this.checkCombine.BackColor = System.Drawing.Color.Transparent;
this.checkCombine.Location = new System.Drawing.Point(9, 165);
this.checkCombine.Margin = new System.Windows.Forms.Padding(2);
this.checkCombine.Name = "checkCombine";
this.checkCombine.Size = new System.Drawing.Size(120, 17);
this.checkCombine.TabIndex = 22;
this.checkCombine.Text = "Combine characters";
this.checkCombine.UseVisualStyleBackColor = false;
this.checkCombine.CheckedChanged += new System.EventHandler(this.checkCombine_CheckedChanged);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(355, 36);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(38, 13);
this.label1.TabIndex = 24;
this.label1.Text = "Name:";
//
// groupBoxSelectRange
//
this.groupBoxSelectRange.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxSelectRange.BackColor = System.Drawing.Color.Transparent;
this.groupBoxSelectRange.Controls.Add(this.dataGrid);
this.groupBoxSelectRange.Location = new System.Drawing.Point(12, 12);
this.groupBoxSelectRange.Name = "groupBoxSelectRange";
this.groupBoxSelectRange.Padding = new System.Windows.Forms.Padding(4, 9, 4, 4);
this.groupBoxSelectRange.Size = new System.Drawing.Size(326, 383);
this.groupBoxSelectRange.TabIndex = 25;
this.groupBoxSelectRange.TabStop = false;
this.groupBoxSelectRange.Text = "Matrix data";
//
// dataGrid
//
this.dataGrid.AllowUserToAddRows = false;
this.dataGrid.AllowUserToDeleteRows = false;
this.dataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGrid.Location = new System.Drawing.Point(4, 22);
this.dataGrid.Name = "dataGrid";
this.dataGrid.ReadOnly = true;
this.dataGrid.Size = new System.Drawing.Size(318, 357);
this.dataGrid.TabIndex = 1;
//
// groupBoxMatrixName
//
this.groupBoxMatrixName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxMatrixName.BackColor = System.Drawing.Color.Transparent;
this.groupBoxMatrixName.Controls.Add(this.inputName);
this.groupBoxMatrixName.Location = new System.Drawing.Point(344, 12);
this.groupBoxMatrixName.Name = "groupBoxMatrixName";
this.groupBoxMatrixName.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.groupBoxMatrixName.Size = new System.Drawing.Size(158, 49);
this.groupBoxMatrixName.TabIndex = 26;
this.groupBoxMatrixName.TabStop = false;
this.groupBoxMatrixName.Text = "Name";
//
// inputName
//
this.inputName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.inputName.Location = new System.Drawing.Point(6, 24);
this.inputName.Name = "inputName";
this.inputName.Size = new System.Drawing.Size(146, 20);
this.inputName.TabIndex = 24;
this.inputName.Text = "Imported ";
//
// groupBoxRange
//
this.groupBoxRange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxRange.BackColor = System.Drawing.Color.Transparent;
this.groupBoxRange.Controls.Add(this.labelEndColumn);
this.groupBoxRange.Controls.Add(this.inputEndColumn);
this.groupBoxRange.Controls.Add(this.labelEndRow);
this.groupBoxRange.Controls.Add(this.inputEndRow);
this.groupBoxRange.Controls.Add(this.labelStartColumn);
this.groupBoxRange.Controls.Add(this.inputStartColumn);
this.groupBoxRange.Controls.Add(this.labelStartRow);
this.groupBoxRange.Controls.Add(this.inputStartRow);
this.groupBoxRange.Location = new System.Drawing.Point(344, 67);
this.groupBoxRange.Name = "groupBoxRange";
this.groupBoxRange.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.groupBoxRange.Size = new System.Drawing.Size(158, 132);
this.groupBoxRange.TabIndex = 27;
this.groupBoxRange.TabStop = false;
this.groupBoxRange.Text = "Range";
//
// labelEndColumn
//
this.labelEndColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelEndColumn.AutoSize = true;
this.labelEndColumn.BackColor = System.Drawing.Color.Transparent;
this.labelEndColumn.Location = new System.Drawing.Point(6, 104);
this.labelEndColumn.Name = "labelEndColumn";
this.labelEndColumn.Size = new System.Drawing.Size(66, 13);
this.labelEndColumn.TabIndex = 22;
this.labelEndColumn.Text = "End column:";
//
// inputEndColumn
//
this.inputEndColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.inputEndColumn.Location = new System.Drawing.Point(96, 102);
this.inputEndColumn.Name = "inputEndColumn";
this.inputEndColumn.Size = new System.Drawing.Size(56, 20);
this.inputEndColumn.TabIndex = 21;
//
// labelEndRow
//
this.labelEndRow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelEndRow.AutoSize = true;
this.labelEndRow.BackColor = System.Drawing.Color.Transparent;
this.labelEndRow.Location = new System.Drawing.Point(6, 78);
this.labelEndRow.Name = "labelEndRow";
this.labelEndRow.Size = new System.Drawing.Size(49, 13);
this.labelEndRow.TabIndex = 20;
this.labelEndRow.Text = "End row:";
//
// inputEndRow
//
this.inputEndRow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.inputEndRow.Location = new System.Drawing.Point(96, 76);
this.inputEndRow.Name = "inputEndRow";
this.inputEndRow.Size = new System.Drawing.Size(56, 20);
this.inputEndRow.TabIndex = 19;
//
// labelStartColumn
//
this.labelStartColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelStartColumn.AutoSize = true;
this.labelStartColumn.BackColor = System.Drawing.Color.Transparent;
this.labelStartColumn.Location = new System.Drawing.Point(6, 52);
this.labelStartColumn.Name = "labelStartColumn";
this.labelStartColumn.Size = new System.Drawing.Size(69, 13);
this.labelStartColumn.TabIndex = 18;
this.labelStartColumn.Text = "Start column:";
//
// inputStartColumn
//
this.inputStartColumn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.inputStartColumn.Location = new System.Drawing.Point(96, 50);
this.inputStartColumn.Name = "inputStartColumn";
this.inputStartColumn.Size = new System.Drawing.Size(56, 20);
this.inputStartColumn.TabIndex = 17;
//
// labelStartRow
//
this.labelStartRow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelStartRow.AutoSize = true;
this.labelStartRow.BackColor = System.Drawing.Color.Transparent;
this.labelStartRow.Location = new System.Drawing.Point(6, 26);
this.labelStartRow.Name = "labelStartRow";
this.labelStartRow.Size = new System.Drawing.Size(52, 13);
this.labelStartRow.TabIndex = 16;
this.labelStartRow.Text = "Start row:";
//
// inputStartRow
//
this.inputStartRow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.inputStartRow.Location = new System.Drawing.Point(96, 24);
this.inputStartRow.Name = "inputStartRow";
this.inputStartRow.Size = new System.Drawing.Size(56, 20);
this.inputStartRow.TabIndex = 15;
//
// groupBoxSeparators
//
this.groupBoxSeparators.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxSeparators.BackColor = System.Drawing.Color.Transparent;
this.groupBoxSeparators.Controls.Add(this.labelSepChars);
this.groupBoxSeparators.Controls.Add(this.checkSepComma);
this.groupBoxSeparators.Controls.Add(this.checkSepSemicolon);
this.groupBoxSeparators.Controls.Add(this.checkSepTab);
this.groupBoxSeparators.Controls.Add(this.checkSepSpace);
this.groupBoxSeparators.Controls.Add(this.checkCombine);
this.groupBoxSeparators.Controls.Add(this.checkSepOthers);
this.groupBoxSeparators.Controls.Add(this.inputSepOthers);
this.groupBoxSeparators.Location = new System.Drawing.Point(344, 206);
this.groupBoxSeparators.Name = "groupBoxSeparators";
this.groupBoxSeparators.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.groupBoxSeparators.Size = new System.Drawing.Size(158, 187);
this.groupBoxSeparators.TabIndex = 28;
this.groupBoxSeparators.TabStop = false;
this.groupBoxSeparators.Text = "Separator characters";
//
// ImportCsvWindow
//
this.AcceptButton = this.buttonAccept;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(513, 436);
this.Controls.Add(this.groupBoxSeparators);
this.Controls.Add(this.groupBoxRange);
this.Controls.Add(this.groupBoxMatrixName);
this.Controls.Add(this.groupBoxSelectRange);
this.Controls.Add(this.label1);
this.Controls.Add(this.buttonEntire);
this.Controls.Add(this.buttonAccept);
this.Controls.Add(this.buttonCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Name = "ImportCsvWindow";
this.Text = "Import from CSV file...";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ImportCsvWindow_FormClosing);
this.groupBoxSelectRange.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGrid)).EndInit();
this.groupBoxMatrixName.ResumeLayout(false);
this.groupBoxMatrixName.PerformLayout();
this.groupBoxRange.ResumeLayout(false);
this.groupBoxRange.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.inputEndColumn)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.inputEndRow)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.inputStartColumn)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.inputStartRow)).EndInit();
this.groupBoxSeparators.ResumeLayout(false);
this.groupBoxSeparators.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private DynamicLink.Controls.MyButton buttonAccept;
private DynamicLink.Controls.MyButton buttonCancel;
private DynamicLink.Controls.MyButton buttonEntire;
private System.Windows.Forms.Label labelSepChars;
private System.Windows.Forms.CheckBox checkSepComma;
private System.Windows.Forms.CheckBox checkSepSemicolon;
private System.Windows.Forms.CheckBox checkSepTab;
private System.Windows.Forms.CheckBox checkSepSpace;
private System.Windows.Forms.CheckBox checkSepOthers;
private System.Windows.Forms.TextBox inputSepOthers;
private System.Windows.Forms.CheckBox checkCombine;
private System.Windows.Forms.Label label1;
private DynamicLink.Controls.MyGroupBox groupBoxSelectRange;
public System.Windows.Forms.DataGridView dataGrid;
private DynamicLink.Controls.MyGroupBox groupBoxMatrixName;
private System.Windows.Forms.TextBox inputName;
private DynamicLink.Controls.MyGroupBox groupBoxRange;
private System.Windows.Forms.Label labelEndColumn;
private System.Windows.Forms.NumericUpDown inputEndColumn;
private System.Windows.Forms.Label labelEndRow;
private System.Windows.Forms.NumericUpDown inputEndRow;
private System.Windows.Forms.Label labelStartColumn;
private System.Windows.Forms.NumericUpDown inputStartColumn;
private System.Windows.Forms.Label labelStartRow;
private System.Windows.Forms.NumericUpDown inputStartRow;
private DynamicLink.Controls.MyGroupBox groupBoxSeparators;
}
}

View File

@ -0,0 +1,225 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MatrixCalculator
{
public partial class ImportCsvWindow : Form
{
private string csv;
private bool allowExit = true;
#region Public properties
public int StartRow { get; set; }
public int StartCol { get; set; }
public int EndRow { get; set; }
public int EndCol { get; set; }
public string Csv{
get { return csv; }
set { csv = value; UpdateGrid(); }
}
public string MatrixName {
get {
return inputName.Text;
}
set {
inputName.Text = value;
}
}
public MathNet.Numerics.LinearAlgebra.Matrix<double> Matrix
{
get { return GridViewHelper.GetMatrix(dataGrid); }
set { GridViewHelper.PutMatrix(value, dataGrid); }
}
#endregion
private Dictionary<char, bool> separators = new Dictionary<char,bool>();
public ImportCsvWindow()
{
InitializeComponent();
separators.Add(',', true);
separators.Add('\t', false);
separators.Add(' ', false);
separators.Add(';', false);
}
public void LoadFile(string filename)
{
if (System.IO.File.Exists(filename))
Csv = System.IO.File.ReadAllText(filename);
}
private void UpdateGrid()
{
List<char> sep = new List<char>();
foreach (var i in separators)
if (i.Value) sep.Add(i.Key);
// Update data
dataGrid.DataSource = CsvParser.GetTable(Csv, sep.ToArray(), checkCombine.Checked);
foreach (DataGridViewColumn i in dataGrid.Columns)
{
i.HeaderText = "";
i.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
}
// Update sizes
inputStartRow.Value = 0;
inputStartColumn.Value = 0;
inputEndColumn.Value = inputEndColumn.Maximum = dataGrid.Columns.Count - 1;
inputEndRow.Value = inputEndRow.Maximum = dataGrid.Rows.Count - 1;
}
#region Separators
private void checkCombine_CheckedChanged(object sender, EventArgs e)
{
UpdateGrid();
}
private void checkSepComma_CheckedChanged(object sender, EventArgs e)
{
separators[','] = checkSepComma.Checked;
UpdateGrid();
}
private void checkSepSemicolon_CheckedChanged(object sender, EventArgs e)
{
separators[';'] = checkSepComma.Checked;
UpdateGrid();
}
private void checkSepSpace_CheckedChanged(object sender, EventArgs e)
{
separators[' '] = checkSepComma.Checked;
UpdateGrid();
}
private void checkSepOthers_CheckedChanged(object sender, EventArgs e)
{
List<char> temp = new List<char>();
foreach (var i in separators)
if (i.Key != ' ' && i.Key != '\t' && i.Key != ';' && i.Key != ',')
temp.Add(i.Key);
foreach (var i in temp) separators[i] = false;
if (checkSepOthers.Checked)
foreach (var i in inputSepOthers.Text)
separators[i] = true;
UpdateGrid();
}
private void checkSepTab_CheckedChanged(object sender, EventArgs e)
{
separators['\t'] = checkSepComma.Checked;
UpdateGrid();
}
private void inputSepOthers_TextChanged(object sender, EventArgs e)
{
List<char> temp = new List<char>();
foreach (var i in separators)
if (i.Key != ' ' && i.Key != '\t' && i.Key != ';' && i.Key != ',')
temp.Add(i.Key);
foreach (var i in temp) separators[i] = false;
if (checkSepOthers.Checked)
foreach (var i in inputSepOthers.Text)
separators[i] = true;
UpdateGrid();
}
#endregion
#region Form buttons
private void buttonEntire_Click(object sender, EventArgs e)
{
StartCol = StartRow = 0;
inputEndColumn.Value = dataGrid.Columns.Count - 1;
inputEndRow.Value = dataGrid.Rows.Count - 1;
this.DialogResult = System.Windows.Forms.DialogResult.OK;
this.Close();
}
private void buttonAccept_Click(object sender, EventArgs e)
{
// Get numbers
StartCol = Convert.ToInt32(inputStartColumn.Value);
StartRow = Convert.ToInt32(inputStartRow.Value);
EndCol = Convert.ToInt32(inputEndColumn.Value);
EndRow = Convert.ToInt32(inputEndRow.Value);
// Validate input
if (inputName.Text == "")
{
allowExit = false;
MessageBox.Show("Name cannot be empty!", "Error!");
return;
}
if (EndCol - StartCol <= 0 || EndRow - StartRow <= 0)
{
allowExit = false;
MessageBox.Show("Invalid range, the matrix must have at least one row and one column.", "Error!");
return;
}
// Trim unneeded rows and columns
while (StartCol > 0) {
dataGrid.Columns.RemoveAt(0);
StartCol--;
EndCol--;
}
while (StartRow > 0) {
dataGrid.Rows.RemoveAt(0);
StartRow--;
EndRow--;
}
GridViewHelper.Resize(dataGrid, EndCol + 1, EndRow + 1);
// Done, finish
this.DialogResult = System.Windows.Forms.DialogResult.OK;
this.Close();
}
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Close();
}
#endregion
private void ImportCsvWindow_FormClosing(object sender, FormClosingEventArgs e)
{
if (!allowExit)
{
allowExit = true;
e.Cancel = true;
}
}
#region Painting
protected override void OnPaintBackground(PaintEventArgs e)
{
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
}
#endregion
}
}

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,113 @@
namespace MatrixCalculator
{
partial class ImportWorksheetWindow
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.listMatrices = new System.Windows.Forms.CheckedListBox();
this.buttonAccept = new DynamicLink.Controls.MyButton();
this.buttonCancel = new DynamicLink.Controls.MyButton();
this.groupBoxSelectMatrices = new DynamicLink.Controls.MyGroupBox();
this.groupBoxSelectMatrices.SuspendLayout();
this.SuspendLayout();
//
// listMatrices
//
this.listMatrices.CheckOnClick = true;
this.listMatrices.Dock = System.Windows.Forms.DockStyle.Fill;
this.listMatrices.FormattingEnabled = true;
this.listMatrices.Location = new System.Drawing.Point(5, 23);
this.listMatrices.Name = "listMatrices";
this.listMatrices.Size = new System.Drawing.Size(250, 215);
this.listMatrices.TabIndex = 0;
//
// buttonAccept
//
this.buttonAccept.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAccept.BackColor = System.Drawing.Color.Transparent;
this.buttonAccept.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAccept.ForeColor = System.Drawing.Color.DarkGreen;
this.buttonAccept.Location = new System.Drawing.Point(197, 261);
this.buttonAccept.Name = "buttonAccept";
this.buttonAccept.Size = new System.Drawing.Size(75, 23);
this.buttonAccept.TabIndex = 5;
this.buttonAccept.Text = "Accept";
this.buttonAccept.UseVisualStyleBackColor = false;
this.buttonAccept.Click += new System.EventHandler(this.buttonAccept_Click);
//
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.BackColor = System.Drawing.Color.Transparent;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(116, 261);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 4;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = false;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// groupBoxSelectMatrices
//
this.groupBoxSelectMatrices.BackColor = System.Drawing.Color.Transparent;
this.groupBoxSelectMatrices.Controls.Add(this.listMatrices);
this.groupBoxSelectMatrices.Location = new System.Drawing.Point(12, 12);
this.groupBoxSelectMatrices.Name = "groupBoxSelectMatrices";
this.groupBoxSelectMatrices.Padding = new System.Windows.Forms.Padding(5, 10, 5, 5);
this.groupBoxSelectMatrices.Size = new System.Drawing.Size(260, 243);
this.groupBoxSelectMatrices.TabIndex = 6;
this.groupBoxSelectMatrices.TabStop = false;
this.groupBoxSelectMatrices.Text = "Select matrices to import:";
//
// ImportWorksheetWindow
//
this.AcceptButton = this.buttonAccept;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(284, 296);
this.Controls.Add(this.groupBoxSelectMatrices);
this.Controls.Add(this.buttonAccept);
this.Controls.Add(this.buttonCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Name = "ImportWorksheetWindow";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Import from worksheet...";
this.groupBoxSelectMatrices.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.CheckedListBox listMatrices;
private DynamicLink.Controls.MyButton buttonAccept;
private DynamicLink.Controls.MyButton buttonCancel;
private DynamicLink.Controls.MyGroupBox groupBoxSelectMatrices;
}
}

View File

@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MatrixCalculator
{
public partial class ImportWorksheetWindow : Form
{
public DataTable Data { get; set; }
public ImportWorksheetWindow()
{
InitializeComponent();
}
public void LoadFile(string filename)
{
WorksheetFile file = new WorksheetFile(filename);
Data = file.Read();
listMatrices.Items.Clear();
foreach (DataRow i in Data.Rows)
listMatrices.Items.Add(i["name"].ToString());
}
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Close();
}
private void buttonAccept_Click(object sender, EventArgs e)
{
List<DataRow> toRemove = new List<DataRow>();
foreach (DataRow i in Data.Rows)
if (!listMatrices.CheckedItems.Contains(i["name"].ToString())) toRemove.Add(i);
foreach (var i in toRemove)
Data.Rows.Remove(i);
this.DialogResult = System.Windows.Forms.DialogResult.OK;
this.Close();
}
#region Paint
protected override void OnPaintBackground(PaintEventArgs e)
{
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
}
#endregion
}
}

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,131 @@
namespace MatrixCalculator
{
partial class NumericInput
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.inputBox = new System.Windows.Forms.TextBox();
this.buttonCancel = new DynamicLink.Controls.MyButton();
this.buttonAccept = new DynamicLink.Controls.MyButton();
this.labelMessage = new System.Windows.Forms.Label();
this.myGroupBox = new DynamicLink.Controls.MyGroupBox();
this.myGroupBox.SuspendLayout();
this.SuspendLayout();
//
// inputBox
//
this.inputBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.inputBox.Location = new System.Drawing.Point(6, 26);
this.inputBox.Name = "inputBox";
this.inputBox.Size = new System.Drawing.Size(256, 20);
this.inputBox.TabIndex = 1;
//
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.BackColor = System.Drawing.Color.Transparent;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(112, 71);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 2;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = false;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// buttonAccept
//
this.buttonAccept.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAccept.BackColor = System.Drawing.Color.Transparent;
this.buttonAccept.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAccept.ForeColor = System.Drawing.Color.DarkGreen;
this.buttonAccept.Location = new System.Drawing.Point(193, 71);
this.buttonAccept.Name = "buttonAccept";
this.buttonAccept.Size = new System.Drawing.Size(75, 23);
this.buttonAccept.TabIndex = 3;
this.buttonAccept.Text = "Accept";
this.buttonAccept.UseVisualStyleBackColor = false;
this.buttonAccept.Click += new System.EventHandler(this.buttonAccept_Click);
//
// labelMessage
//
this.labelMessage.AutoSize = true;
this.labelMessage.BackColor = System.Drawing.Color.Transparent;
this.labelMessage.Location = new System.Drawing.Point(6, 6);
this.labelMessage.Name = "labelMessage";
this.labelMessage.Size = new System.Drawing.Size(92, 13);
this.labelMessage.TabIndex = 0;
this.labelMessage.Text = "Insert a ? number:";
//
// myGroupBox
//
this.myGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.myGroupBox.BackColor = System.Drawing.Color.Transparent;
this.myGroupBox.Controls.Add(this.labelMessage);
this.myGroupBox.Controls.Add(this.inputBox);
this.myGroupBox.Location = new System.Drawing.Point(6, 7);
this.myGroupBox.Name = "myGroupBox";
this.myGroupBox.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.myGroupBox.Size = new System.Drawing.Size(269, 58);
this.myGroupBox.TabIndex = 4;
this.myGroupBox.TabStop = false;
//
// NumericInput
//
this.AcceptButton = this.buttonAccept;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(280, 106);
this.Controls.Add(this.myGroupBox);
this.Controls.Add(this.buttonAccept);
this.Controls.Add(this.buttonCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "NumericInput";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.NumericInput_FormClosing);
this.myGroupBox.ResumeLayout(false);
this.myGroupBox.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TextBox inputBox;
private DynamicLink.Controls.MyButton buttonCancel;
private DynamicLink.Controls.MyButton buttonAccept;
private System.Windows.Forms.Label labelMessage;
private DynamicLink.Controls.MyGroupBox myGroupBox;
}
}

View File

@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MatrixCalculator
{
public partial class NumericInput : Form
{
public enum NumberType { Integer, Real };
#region Data
bool allowExit = true;
private NumberType type;
public NumberType Type {
get { return type; }
set
{
if (value == NumberType.Integer) labelMessage.Text = "Insert an integer number:";
else labelMessage.Text = "Insert a real number:";
type = value;
}
}
public double NumberReal
{
get {
double ret = 0;
double.TryParse(inputBox.Text, out ret);
return ret;
}
set {
inputBox.Text = value.ToString();
}
}
public int NumberInt
{
get {
int ret = 0;
int.TryParse(inputBox.Text, out ret);
return ret;
}
set {
inputBox.Text = value.ToString();
}
}
#endregion
public NumericInput(NumberType t = NumberType.Real)
{
InitializeComponent();
Type = t;
}
private void buttonAccept_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.OK;
// Validate input
bool ok = true;
double val;
int vali;
if (Type == NumberType.Real) ok = double.TryParse(inputBox.Text, out val);
else ok = int.TryParse(inputBox.Text, out vali);
// Is everything ok?
if (!ok)
{
allowExit = false;
inputBox.BackColor = Color.LightPink;
labelMessage.Font = new Font(labelMessage.Font, FontStyle.Bold);
}
}
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Close();
}
private void NumericInput_FormClosing(object sender, FormClosingEventArgs e)
{
if (!allowExit)
{
allowExit = true;
e.Cancel = true;
}
}
#region Paint
protected override void OnPaintBackground(PaintEventArgs e)
{
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
}
#endregion
}
}

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,169 @@
namespace MatrixCalculator
{
partial class SettingsWindow
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.buttonAccept = new DynamicLink.Controls.MyButton();
this.buttonCancel = new DynamicLink.Controls.MyButton();
this.groupBox1 = new DynamicLink.Controls.MyGroupBox();
this.label1 = new System.Windows.Forms.Label();
this.checkResultAsMatrix = new System.Windows.Forms.CheckBox();
this.inputDoublePrecision = new System.Windows.Forms.NumericUpDown();
this.checkDoublePrecision = new System.Windows.Forms.CheckBox();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.inputDoublePrecision)).BeginInit();
this.SuspendLayout();
//
// buttonAccept
//
this.buttonAccept.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAccept.BackColor = System.Drawing.Color.Transparent;
this.buttonAccept.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonAccept.ForeColor = System.Drawing.Color.DarkGreen;
this.buttonAccept.Location = new System.Drawing.Point(223, 116);
this.buttonAccept.Name = "buttonAccept";
this.buttonAccept.Size = new System.Drawing.Size(75, 23);
this.buttonAccept.TabIndex = 7;
this.buttonAccept.Text = "Accept";
this.buttonAccept.UseVisualStyleBackColor = false;
this.buttonAccept.Click += new System.EventHandler(this.buttonAccept_Click);
//
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.BackColor = System.Drawing.Color.Transparent;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(142, 116);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 6;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = false;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.BackColor = System.Drawing.Color.Transparent;
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.checkResultAsMatrix);
this.groupBox1.Controls.Add(this.inputDoublePrecision);
this.groupBox1.Controls.Add(this.checkDoublePrecision);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.groupBox1.Size = new System.Drawing.Size(286, 98);
this.groupBox1.TabIndex = 8;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Matrix calculator preferences";
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(204, 33);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(70, 13);
this.label1.TabIndex = 15;
this.label1.Text = "decimal digits";
//
// checkResultAsMatrix
//
this.checkResultAsMatrix.AutoSize = true;
this.checkResultAsMatrix.BackColor = System.Drawing.Color.Transparent;
this.checkResultAsMatrix.Location = new System.Drawing.Point(16, 65);
this.checkResultAsMatrix.Name = "checkResultAsMatrix";
this.checkResultAsMatrix.Size = new System.Drawing.Size(154, 17);
this.checkResultAsMatrix.TabIndex = 14;
this.checkResultAsMatrix.Text = "Show result as a 1x1 matrix";
this.toolTip.SetToolTip(this.checkResultAsMatrix, "If set, the result of numeric calculations (like determinant, minimum element etc" +
") will be displayed as a 1x1 matrix. Otherwise, it will be displayed in the \"Out" +
"put\" box.");
this.checkResultAsMatrix.UseVisualStyleBackColor = false;
//
// inputDoublePrecision
//
this.inputDoublePrecision.Location = new System.Drawing.Point(138, 31);
this.inputDoublePrecision.Name = "inputDoublePrecision";
this.inputDoublePrecision.Size = new System.Drawing.Size(60, 20);
this.inputDoublePrecision.TabIndex = 13;
this.toolTip.SetToolTip(this.inputDoublePrecision, "For example, if value is 1, number 0.234 will be displayed as 0.2 ");
//
// checkDoublePrecision
//
this.checkDoublePrecision.AutoSize = true;
this.checkDoublePrecision.BackColor = System.Drawing.Color.Transparent;
this.checkDoublePrecision.Location = new System.Drawing.Point(16, 32);
this.checkDoublePrecision.Name = "checkDoublePrecision";
this.checkDoublePrecision.Size = new System.Drawing.Size(116, 17);
this.checkDoublePrecision.TabIndex = 12;
this.checkDoublePrecision.Text = "Round numbers to:";
this.toolTip.SetToolTip(this.checkDoublePrecision, "If set, the number of decimals will be limited to the number selected.");
this.checkDoublePrecision.UseVisualStyleBackColor = false;
this.checkDoublePrecision.CheckedChanged += new System.EventHandler(this.checkDoublePrecision_CheckedChanged);
//
// SettingsWindow
//
this.AcceptButton = this.buttonAccept;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(310, 151);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.buttonAccept);
this.Controls.Add(this.buttonCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SettingsWindow";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Preferences";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.inputDoublePrecision)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DynamicLink.Controls.MyButton buttonAccept;
private DynamicLink.Controls.MyButton buttonCancel;
private DynamicLink.Controls.MyGroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox checkResultAsMatrix;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.NumericUpDown inputDoublePrecision;
private System.Windows.Forms.CheckBox checkDoublePrecision;
}
}

View File

@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MatrixCalculator
{
public partial class SettingsWindow : Form
{
public SettingsWindow()
{
InitializeComponent();
// Get settings
int prec = MatrixCalculator.Properties.Settings.Default.DoublePrecision;
bool res = MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix;
// Show settings
if (prec == -1) checkDoublePrecision.Checked = false;
else
{
checkDoublePrecision.Checked = true;
inputDoublePrecision.Value = prec;
}
checkResultAsMatrix.Checked = res;
}
private void checkDoublePrecision_CheckedChanged(object sender, EventArgs e)
{
inputDoublePrecision.Enabled = checkDoublePrecision.Checked;
}
private void buttonAccept_Click(object sender, EventArgs e)
{
if (!checkDoublePrecision.Checked) MatrixCalculator.Properties.Settings.Default.DoublePrecision = -1;
else MatrixCalculator.Properties.Settings.Default.DoublePrecision = Convert.ToInt32(inputDoublePrecision.Value);
MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix = checkResultAsMatrix.Checked;
this.Close();
}
private void buttonCancel_Click(object sender, EventArgs e)
{
this.Close();
}
#region Paint
protected override void OnPaintBackground(PaintEventArgs e)
{
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
}
#endregion
}
}

View File

@ -0,0 +1,123 @@
<?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>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,144 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MathNet.Numerics.LinearAlgebra;
namespace MatrixCalculator
{
static class GridViewHelper
{
/// <summary>
/// Loads a matrix in a DataGridView
/// </summary>
public static void PutMatrix(Matrix<double> m, DataGridView grid)
{
// Reset grid
grid.Rows.Clear();
grid.Columns.Clear();
// Add columns
for (int i = 0; i < m.ColumnCount; i++)
{
var col = new DataGridViewTextBoxColumn()
{
SortMode = DataGridViewColumnSortMode.NotSortable,
AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
};
grid.Columns.Add(col);
}
// Add rows and data
for (int i = 0; i < m.RowCount; i++)
{
grid.Rows.Add();
for (int j = 0; j < m.ColumnCount; j++)
grid[j, i].Value = MyDouble.String(m[i, j]);
}
}
/// <summary>
/// Gets the matrix from a DataGridView
/// </summary>
public static Matrix<double> GetMatrix(DataGridView grid)
{
Matrix<double> m = Matrix<double>.Build.Dense(grid.Rows.Count, grid.Columns.Count);
for (int i = 0; i < m.RowCount; i++)
for (int j = 0; j < m.ColumnCount; j++)
{
double temp = 0;
if (grid[j, i].Value != null)
double.TryParse(grid[j, i].Value.ToString(), out temp);
m[i, j] = temp;
}
return m;
}
/// <summary>
/// Resizes a DataGridView
/// </summary>
/// <param name="grid">The DataGridView</param>
/// <param name="ncols">The new number of columns</param>
/// <param name="nrows">The new number of rows</param>
public static void Resize(DataGridView grid, int ncols, int nrows)
{
// Add columns
while (grid.Columns.Count < ncols)
{
DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn()
{
AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells,
SortMode = DataGridViewColumnSortMode.NotSortable
};
grid.Columns.Add(col);
}
// Remove columns
while (grid.Columns.Count > ncols)
grid.Columns.Remove(grid.Columns.GetLastColumn(DataGridViewElementStates.Displayed, DataGridViewElementStates.None));
// Add rows
while (grid.Rows.Count < nrows)
grid.Rows.Add();
// Remove rows
while (grid.Rows.Count > nrows)
grid.Rows.RemoveAt(grid.Rows.GetLastRow(DataGridViewElementStates.Displayed));
}
/// <summary>
/// Copies the selected area to clipboard
/// </summary>
public static void CopySelected(DataGridView grid)
{
int minRow, minCol, maxRow, maxCol;
minRow = minCol = int.MaxValue;
maxRow = maxCol = int.MinValue;
foreach (DataGridViewCell i in grid.SelectedCells)
{
minRow = Math.Min(minRow, i.RowIndex);
minCol = Math.Min(minCol, i.ColumnIndex);
maxRow = Math.Max(maxRow, i.RowIndex);
maxCol = Math.Max(maxCol, i.ColumnIndex);
}
string csv = CsvParser.ToCSV(grid, minRow, minCol, maxRow, maxCol, true);
Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
}
/// <summary>
/// Pastes clipboard content into selected cell and beyond
/// </summary>
public static void Paste(DataGridView grid)
{
// Where to paste
int row = 0, col = 0;
if (grid.CurrentCell != null) {
row = grid.CurrentCell.RowIndex;
col = grid.CurrentCell.ColumnIndex;
}
// Get data
string data = "";
if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue)) data = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
else if (Clipboard.ContainsText()) data = Clipboard.GetText();
var table = CsvParser.GetTable(data, MatrixCalculator.Properties.Settings.Default.InternalCsvSeparators.ToArray());
// Put data in table
for (int i = 0; i < table.Rows.Count; i++)
for (int j = 0; j < table.Columns.Count; j++)
if (table.Rows[i][j].ToString() != "" && row + i < grid.Rows.Count && col + j < grid.Columns.Count)
grid[j + col, i + row].Value = table.Rows[i][j];
}
}
}

View File

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using MathNet.Numerics.LinearAlgebra;
namespace MatrixCalculator
{
static class MatrixConverter
{
/// <summary>
/// Puts a matrix in a DataTable
/// </summary>
public static DataTable GetTable(Matrix<double> matrix)
{
DataTable table = new DataTable("matrix");
for (int i = 0; i < matrix.ColumnCount; i++)
table.Columns.Add();
for (int i = 0; i < matrix.RowCount; i++)
{
table.Rows.Add("");
for (int j = 0; j < matrix.ColumnCount; j++)
table.Rows[i][j] = matrix[i, j].ToString();
}
return table;
}
/// <summary>
/// Converts a DataTable into a matrix
/// </summary>
public static Matrix<double> FromTable(DataTable table)
{
Matrix<double> matrix = Matrix<double>.Build.Dense(table.Rows.Count, table.Columns.Count);
for (int i = 0; i < matrix.RowCount; i++)
for (int j = 0; j < matrix.ColumnCount; j++)
{
double temp = 0;
double.TryParse(table.Rows[i][j].ToString(), out temp);
matrix[i, j] = temp;
}
return matrix;
}
}
}

View File

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MathNet.Numerics.LinearAlgebra;
namespace MatrixCalculator
{
static class MatrixHelper
{
public static bool Equal(Matrix<double> a, Matrix<double> b)
{
if (a.RowCount != b.RowCount || a.ColumnCount != b.ColumnCount) return false;
for (int i = 0; i < a.RowCount; i++)
for (int j = 0; j < a.ColumnCount; j++)
if (a[i, j] != b[i, j]) return false;
return true;
}
public static Matrix<double> Power(Matrix<double> mat, int power)
{
// Solution
Matrix<double> sol = Matrix<double>.Build.DenseIdentity(mat.RowCount, mat.ColumnCount);
if (power < 0) {
mat = mat.Inverse();
power *= -1;
}
// Now raise to power binary
for (int i = 0; (1 << i) <= power; i++)
{
if ((power & (1 << i)) != 0) sol = (sol * mat);
mat = (mat * mat);
}
// Done
return sol;
}
public static double Max(Matrix<double> mat)
{
double max = double.MinValue;
for (int i = 0; i < mat.RowCount; i++)
for (int j = 0; j < mat.ColumnCount; j++)
max = Math.Max(mat[i, j], max);
return max;
}
public static double Min(Matrix<double> mat)
{
double min = double.MaxValue;
for (int i = 0; i < mat.RowCount; i++)
for (int j = 0; j < mat.ColumnCount; j++)
min = Math.Min(mat[i, j], min);
return min;
}
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MatrixCalculator
{
static class MyDouble
{
public static string String(double n)
{
if (MatrixCalculator.Properties.Settings.Default.DoublePrecision == -1) return n.ToString();
else return Math.Round(n, MatrixCalculator.Properties.Settings.Default.DoublePrecision).ToString();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,812 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MathNet.Numerics.LinearAlgebra;
namespace MatrixCalculator
{
public partial class MainWindow : Form
{
private WorksheetFile worksheet = new WorksheetFile();
private List<Matrix<double>> matrices = new List<Matrix<double>>();
private Matrix<double> matrixA, matrixB, matrixResult;
#region Matrix properties
private Matrix<double> MatrixA {
get { return matrixA; }
set {
matrixA = value;
GridViewHelper.PutMatrix(matrixA, dataMatrixA);
}
}
private Matrix<double> MatrixB
{
get { return matrixB; }
set
{
matrixB = value;
GridViewHelper.PutMatrix(matrixB, dataMatrixB);
}
}
private Matrix<double> MatrixResult
{
get { return matrixResult; }
set
{
matrixResult = value;
GridViewHelper.PutMatrix(matrixResult, dataResult);
}
}
private Matrix<double> MatrixPreview
{
get {
if (listMatrices.SelectedItems.Count == 1)
return matrices[listMatrices.SelectedIndices[0]];
else return null;
}
set {
GridViewHelper.PutMatrix(value, dataPreview);
}
}
#endregion
#region Constructor
public MainWindow()
{
InitializeComponent();
ResetAll();
}
#endregion
#region User interface
#region Menus
private void menuFileNew_Click(object sender, EventArgs e)
{
if (!ShowSaveWarningDialog()) return;
ResetAll();
worksheet = new WorksheetFile();
}
private void menuFileOpen_Click(object sender, EventArgs e)
{
if (!ShowSaveWarningDialog()) return;
// Open file dialog
string file;
if (!OpenDialog("Open worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
// Open the file
DataTable data = new DataTable();
try {
worksheet = new WorksheetFile(file);
data = worksheet.Read();
}
catch (Exception ex) {
MessageBox.Show("Error:" + ex.Message, "Error!");
return;
}
// Load data
ResetAll();
AddMatrices(data);
}
private void menuFileSave_Click(object sender, EventArgs e)
{
if (worksheet.FileName == "")
{
string file;
if (!SaveDialog("Save worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
worksheet.FileName = file;
}
try { worksheet.Save(); }
catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Error!"); }
}
private void menuFileSaveAs_Click(object sender, EventArgs e)
{
string file;
if (!SaveDialog("Save worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file)) return;
try { worksheet.SaveAs(file); }
catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "Error!"); }
}
private void menuFileImportCsv_Click(object sender, EventArgs e)
{
string file;
if (!OpenDialog("Open CSV file...", MatrixCalculator.Properties.Resources.CsvFormatFilter, out file))
return;
ImportCsvWindow wind = new ImportCsvWindow();
try { wind.LoadFile(file); }
catch (Exception ex)
{
MessageBox.Show("Error: " + ex.Message, "Error!");
}
if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK)
return;
AddMatrix(wind.Matrix, wind.MatrixName, "", true);
}
private void menuFileImportWorksheet_Click(object sender, EventArgs e)
{
string file;
if (!OpenDialog("Open worksheet...", MatrixCalculator.Properties.Resources.WorksheetFormatFilter, out file))
return;
ImportWorksheetWindow wind = new ImportWorksheetWindow();
try { wind.LoadFile(file); }
catch (Exception ex)
{
MessageBox.Show("Error: " + ex.Message, "Error!");
}
if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
AddMatrices(wind.Data);
}
private void menuFilePreferences_Click(object sender, EventArgs e)
{
new SettingsWindow().ShowDialog();
}
private void menuFileExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void menuMatrixNew_Click(object sender, EventArgs e)
{
Editor edit = new Editor();
edit.Text = "New matrix...";
if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK)
return;
AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
}
private void menuMatrixEdit_Click(object sender, EventArgs e)
{
if (listMatrices.SelectedItems.Count != 1) return;
string old_name, new_name, desc;
Matrix<double> matrix;
// Set up variables
Editor edit = new Editor();
edit.Text = "Edit matrix...";
old_name = edit.MatrixName = listMatrices.SelectedItems[0].Text;
edit.MatrixDescription = listMatrices.SelectedItems[0].SubItems[1].Text;
edit.Matrix = matrices[listMatrices.SelectedIndices[0]];
// Dialog
if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
// Update new stuff
new_name = listMatrices.SelectedItems[0].Text = edit.MatrixName;
desc = listMatrices.SelectedItems[0].SubItems[1].Text = edit.MatrixDescription;
matrix = matrices[listMatrices.SelectedIndices[0]] = edit.Matrix;
// Update in file
worksheet.ModifyMatrix(old_name, new_name, CsvParser.ToCSV(matrix), desc);
// Update preview
listMatrices_SelectedIndexChanged(this, new EventArgs());
}
private void menuMatrixDelete_Click(object sender, EventArgs e)
{
foreach (int i in listMatrices.SelectedIndices)
{
worksheet.DeleteMatrix(listMatrices.Items[i].Text);
listMatrices.Items.RemoveAt(i);
matrices.RemoveAt(i);
}
}
private void menuMatrixDuplicate_Click(object sender, EventArgs e)
{
if (listMatrices.SelectedItems.Count != 1) return;
// Set up variables
Editor edit = new Editor();
edit.Text = "New matrix...";
edit.MatrixName = listMatrices.SelectedItems[0].Text;
edit.MatrixDescription = listMatrices.SelectedItems[0].SubItems[1].Text;
edit.Matrix = matrices[listMatrices.SelectedIndices[0]];
// Dialog
if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
// Update new stuff
AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
}
private void menuMatrixInsertA_Click(object sender, EventArgs e)
{
if (listMatrices.SelectedIndices.Count == 1)
MatrixA = matrices[listMatrices.SelectedIndices[0]];
}
private void menuMatrixInsertB_Click(object sender, EventArgs e)
{
if (listMatrices.SelectedIndices.Count == 1)
MatrixB = matrices[listMatrices.SelectedIndices[0]];
}
private void menuMatrixCopy_Click(object sender, EventArgs e)
{
if (listMatrices.SelectedIndices.Count != 1) return;
string csv = CsvParser.ToCSV(matrices[listMatrices.SelectedIndices[0]]);
Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
}
private void menuMatrixPaste_Click(object sender, EventArgs e)
{
// Get data
string csv = "";
if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue))
csv = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
else return;
// Put it in a matrix
Editor edit = new Editor();
edit.Text = "Paste matrix...";
edit.Matrix = MatrixConverter.FromTable(CsvParser.GetTable(csv, ",;\t".ToArray()));
edit.MatrixName = "Pasted matrix";
if (edit.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
// Get data
AddMatrix(edit.Matrix, edit.MatrixName, edit.MatrixDescription, true);
}
private void menuMatrixPasteSpecial_Click(object sender, EventArgs e)
{
// Get data
string csv = "";
if (Clipboard.ContainsText(TextDataFormat.CommaSeparatedValue))
csv = Clipboard.GetText(TextDataFormat.CommaSeparatedValue);
else if (Clipboard.ContainsText())
csv = Clipboard.GetText();
else return;
// Use CSV importer
ImportCsvWindow wind = new ImportCsvWindow();
wind.Csv = csv;
if (wind.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
AddMatrix(wind.Matrix, wind.MatrixName, "", true);
}
private void menuHelpAbout_Click(object sender, EventArgs e)
{
DynamicLink.Launcher.About();
}
private void menuHelpHelp_Click(object sender, EventArgs e)
{
DynamicLink.Launcher.StartModule("Help", "matrixcalc");
}
private void contextMenuDataAdd_Click(object sender, EventArgs e)
{
var item = sender as ToolStripMenuItem;
var menu = item.Owner as ContextMenuStrip;
var grid = menu.SourceControl as DataGridView;
if (grid == null) return;
// Create editor window
Editor editwindow = new Editor();
editwindow.Text = "New matrix...";
editwindow.Matrix = GridViewHelper.GetMatrix(grid);
if (editwindow.ShowDialog() == System.Windows.Forms.DialogResult.OK)
AddMatrix(editwindow.Matrix, editwindow.MatrixName, editwindow.MatrixDescription, true);
}
private void contextMenuDataClear_Click(object sender, EventArgs e)
{
var item = sender as ToolStripMenuItem;
var menu = item.Owner as ContextMenuStrip;
var grid = menu.SourceControl as DataGridView;
if (grid == null) return;
if (grid == dataMatrixA) matrixA = null;
else if (grid == dataMatrixB) matrixB = null;
grid.Rows.Clear();
grid.Columns.Clear();
}
private void contextMenuDataCopy_Click(object sender, EventArgs e)
{
var item = sender as ToolStripMenuItem;
var menu = item.Owner as ContextMenuStrip;
var grid = menu.SourceControl as DataGridView;
if (grid == null) return;
string csv = CsvParser.ToCSV(grid);
Clipboard.SetText(csv, TextDataFormat.CommaSeparatedValue);
}
#endregion
#region Calculator buttons
private void buttonAdd_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 1, 1, 1, 0, 0)) return;
try { MatrixResult = matrixA + matrixB; }
catch (Exception ex)
{
textOutput.Text = "Error: " + ex.Message;
}
}
private void buttonSub_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 1, 1, 1, 0, 0)) return;
try { MatrixResult = matrixA - matrixB; }
catch (Exception ex)
{
textOutput.Text = "Error: " + ex.Message;
}
}
private void buttonMul_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 1, 1, 0, 1, 0)) return;
try { MatrixResult = matrixA * matrixB; }
catch (Exception ex)
{
textOutput.Text = "Error: " + ex.Message;
}
}
private void buttonAddNum_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
// Get a number
NumericInput input = new NumericInput(NumericInput.NumberType.Real);
if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
double number = input.NumberReal;
// Now add it
Matrix<double> m = Matrix<double>.Build.Dense(matrixA.RowCount, matrixA.ColumnCount, number);
MatrixResult = matrixA + m;
}
private void buttonSubNum_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
// Get a number
NumericInput input = new NumericInput(NumericInput.NumberType.Real);
if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
double number = input.NumberReal;
// Now add it
Matrix<double> m = Matrix<double>.Build.Dense(matrixA.RowCount, matrixA.ColumnCount, number);
MatrixResult = matrixA - m;
}
private void buttonMulNum_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
// Get a number
NumericInput input = new NumericInput(NumericInput.NumberType.Real);
if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
double number = input.NumberReal;
// Now add it
MatrixResult = matrixA * number;
}
private void buttonInv_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
try { MatrixResult = matrixA.Inverse(); }
catch (Exception ex)
{
textOutput.Text = "Error: " + ex.Message;
}
}
private void buttonPow_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
// Get a number
NumericInput input = new NumericInput(NumericInput.NumberType.Integer);
if (input.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
int number = input.NumberInt;
// Calculate
try { MatrixResult = MatrixHelper.Power (matrixA, number); }
catch (Exception ex)
{
textOutput.Text = "Error: " + ex.Message;
}
}
private void buttonTransp_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
try { MatrixResult = matrixA.Transpose(); }
catch (Exception ex)
{
textOutput.Text = "Error: " + ex.Message;
}
}
private void buttonTrace_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
MatrixResult = Matrix<double>.Build.Dense(1, 1, matrixA.Trace());
else textOutput.Text = MyDouble.String(matrixA.Trace());
}
private void buttonRank_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
MatrixResult = Matrix<double>.Build.Dense(1, 1, Convert.ToDouble(matrixA.Rank()));
else textOutput.Text = matrixA.Rank().ToString();
}
private void buttonDet_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 1)) return;
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
MatrixResult = Matrix<double>.Build.Dense(1, 1, matrixA.Determinant());
else textOutput.Text = MyDouble.String(matrixA.Determinant());
}
private void buttonMin_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
MatrixResult = Matrix<double>.Build.Dense(1, 1, MatrixHelper.Min(matrixA));
else textOutput.Text = MyDouble.String(MatrixHelper.Min(matrixA));
}
private void buttonMax_Click(object sender, EventArgs e)
{
if (!VerifyConditions(1, 0, 0, 0, 0, 0)) return;
if (MatrixCalculator.Properties.Settings.Default.NumberResultAsMatrix)
MatrixResult = Matrix<double>.Build.Dense(1, 1, MatrixHelper.Max(matrixA));
else textOutput.Text = MyDouble.String(MatrixHelper.Max(matrixA));
}
#endregion
#region Drag & drop
private void dataMatrix_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(ListViewItem))) e.Effect = DragDropEffects.Move;
else e.Effect = DragDropEffects.None;
}
private void dataMatrix_DragDrop(object sender, DragEventArgs e)
{
ListViewItem data = e.Data.GetData(typeof(ListViewItem)) as ListViewItem;
var send = sender as DataGridView;
if (data == null || send == null) return;
if (send == dataMatrixA) MatrixA = matrices[data.Index];
else if (send == dataMatrixB) MatrixB = matrices[data.Index];
}
private void listMatrices_DragOver(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Move;
}
private void listMatrices_MouseDown(object sender, MouseEventArgs e)
{
if (listMatrices.SelectedItems.Count == 1 && e.Button == System.Windows.Forms.MouseButtons.Left)
listMatrices.DoDragDrop(listMatrices.SelectedItems[0], DragDropEffects.Move);
}
#endregion
#region List Matrices Selected Index Changed
private void EnableMenus(int insA, int insB, int copy, int edit, int del, int dupl)
{
menuMatrixInsertA.Enabled = contextMenuListInsertA.Enabled = (insA != 0);
menuMatrixInsertB.Enabled = contextMenuListInsertB.Enabled = (insB != 0);
menuMatrixCopy.Enabled = contextMenuListCopy.Enabled = (copy != 0);
menuMatrixEdit.Enabled = contextMenuListEdit.Enabled = (edit != 0);
menuMatrixDelete.Enabled = contextMenuListDelete.Enabled = (del != 0);
menuMatrixDuplicate.Enabled = contextMenuListDuplicate.Enabled = (dupl != 0);
}
private void listMatrices_SelectedIndexChanged(object sender, EventArgs e)
{
switch (listMatrices.SelectedIndices.Count)
{
case 0: EnableMenus(0, 0, 0, 0, 0, 0); break;
case 1:
this.labelPreviewName.Text = "Name: " + listMatrices.SelectedItems[0].Text;
this.labelPreviewDesc.Text = "Description: " + listMatrices.SelectedItems[0].SubItems[1].Text;
MatrixPreview = matrices[listMatrices.SelectedIndices[0]];
EnableMenus(1, 1, 1, 1, 1, 1);
break;
default: EnableMenus(0, 0, 0, 0, 1, 0); break;
}
}
#endregion
#region Painting
protected override void OnPaintBackground(PaintEventArgs e)
{
DynamicLink.Controls.BackgroundGradient.Paint(e.Graphics, new Rectangle(-1, -1, this.Width, this.Height));
}
#endregion
#region Others
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
{
if (!ShowSaveWarningDialog()) e.Cancel = true;
if (!e.Cancel) MatrixCalculator.Properties.Settings.Default.Save();
}
private void textOutput_TextChanged(object sender, EventArgs e)
{
toolTip.SetToolTip(textOutput, textOutput.Text);
}
#endregion
#endregion
#region Additional routines
private string MakeUnique(string name)
{
List<string> probl = new List<string>();
// Test name uniqueness
bool unique = true;
foreach (ListViewItem i in this.listMatrices.Items)
{
if (i.Text == name) unique = false;
if (i.Text.StartsWith(name)) probl.Add(i.Text);
}
// If not unique, generate a unique name
if (!unique)
{
int n = 0;
while (probl.Contains(name + n.ToString()) && n < 10000) n++;
name += n.ToString();
}
return name;
}
private void AddMatrix(Matrix<double> m, string name, string desc, bool inFile = false)
{
matrices.Add(m);
name = MakeUnique(name);
// Add it
ListViewItem item = listMatrices.Items.Add(name);
item.SubItems.Add(desc);
// To file?
if (inFile) worksheet.AddMatrix(name, CsvParser.ToCSV(m), desc);
}
private void AddMatrices(DataTable data, bool infile = false)
{
AddMatrices(data, infile, false, MatrixCalculator.Properties.Settings.Default.InternalCsvSeparators.ToArray());
}
private void AddMatrices(DataTable data, bool infile, bool combine, params char[] separs)
{
foreach (DataRow i in data.Rows)
{
try {
string name = i["name"].ToString();
string desc = i["description"].ToString();
string csv = i["csv"].ToString();
DataTable dt = CsvParser.GetTable(csv, separs, combine);
AddMatrix(MatrixConverter.FromTable(dt), name, desc, infile);
}
catch (Exception e)
{
MessageBox.Show("Error: " + e.Message, "Error!");
return;
}
}
}
private void ResetAll()
{
matrices.Clear();
listMatrices.Items.Clear();
AddMatrix(Matrix<double>.Build.Dense(7, 7, 0), "Zero", "Zero matrix");
AddMatrix(Matrix<double>.Build.DenseIdentity(7, 7), "One", "Identity matrix");
}
private bool ShowSaveWarningDialog()
{
// Nothing to do
if (worksheet.IsQueueEmpty) return true;
// Show dialog
switch (MessageBox.Show("All the unsaved changes will be lost. Do you want to save the current worksheet?",
"Save?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question))
{
case System.Windows.Forms.DialogResult.Cancel: return false;
case System.Windows.Forms.DialogResult.Yes:
menuFileSave_Click(this, new EventArgs());
break;
case System.Windows.Forms.DialogResult.No:
break;
}
return true;
}
private bool OpenDialog(string title, string filter, out string filename)
{
bool result;
// Initialize dialog
OpenFileDialog open = new OpenFileDialog();
open.Title = title;
open.Filter = filter;
// Show
if (open.ShowDialog() == System.Windows.Forms.DialogResult.OK) result = true;
else result = false;
// Output
filename = open.FileName;
return result;
}
private bool SaveDialog(string title, string filter, out string filename)
{
bool result;
// Initialize dialog
SaveFileDialog save = new SaveFileDialog();
save.Title = title;
save.Filter = filter;
// Show
if (save.ShowDialog() == System.Windows.Forms.DialogResult.OK) result = true;
else result = false;
// Output
filename = save.FileName;
return result;
}
#endregion
#region Additional calculator routines
bool VerifyConditions(int includeA, int includeB, int changeSpecial, int checkSum, int checkMul, int checkSq)
{
// Verify matrix A
if (includeA != 0 && matrixA == null)
{
textOutput.Text = "Error: Missing matrix A!";
return false;
}
// Verify matrix B
if (includeB != 0 && matrixB == null)
{
textOutput.Text = "Error: Missing matrix B!";
return false;
}
// Replace special matrix types (0 and identity)
if (changeSpecial != 0)
{
// Matrix A
if (MatrixHelper.Equal(matrixA, Matrix<double>.Build.Dense(7, 7, 0)))
{
if (checkSum != 0) matrixA = Matrix<double>.Build.Dense(matrixB.RowCount, matrixB.ColumnCount, 0.0);
if (checkMul != 0) matrixA = Matrix<double>.Build.Dense(matrixB.ColumnCount, matrixB.ColumnCount, 0.0);
}
if (MatrixHelper.Equal(matrixA, Matrix<double>.Build.DenseIdentity(7, 7)))
{
if (checkSum != 0) matrixA = Matrix<double>.Build.DenseIdentity(matrixB.RowCount, matrixB.ColumnCount);
if (checkMul != 0) matrixA = Matrix<double>.Build.DenseIdentity(matrixB.ColumnCount, matrixB.ColumnCount);
}
// Matrix B
if (MatrixHelper.Equal(matrixB, Matrix<double>.Build.Dense(7, 7, 0)))
{
if (checkSum != 0) matrixB = Matrix<double>.Build.Dense(matrixA.RowCount, matrixA.ColumnCount, 0.0);
if (checkMul != 0) matrixB = Matrix<double>.Build.Dense(matrixA.ColumnCount, matrixA.ColumnCount, 0.0);
}
if (MatrixHelper.Equal(matrixB, Matrix<double>.Build.DenseIdentity(7, 7)))
{
if (checkSum != 0) matrixB = Matrix<double>.Build.DenseIdentity(matrixA.RowCount, matrixA.ColumnCount);
if (checkMul != 0) matrixB = Matrix<double>.Build.DenseIdentity(matrixA.ColumnCount, matrixA.ColumnCount);
}
}
// If sum, make sure sizes match
if (checkSum != 0 && (matrixA.RowCount != matrixB.RowCount || matrixA.ColumnCount != matrixB.ColumnCount))
{
textOutput.Text = "Error: Incompatible matrices.";
return false;
}
// If multiplication, check A's width = B's height
if (checkMul != 0 && (matrixA.ColumnCount != matrixB.RowCount))
{
textOutput.Text = "Error: Incompatible matrices.";
return false;
}
// If matrix A must be square
if (checkSq != 0 && (matrixA.ColumnCount != matrixA.RowCount))
{
textOutput.Text = "Error: Invalid matrix.";
return false;
}
return true;
}
#endregion
}
}

View File

@ -0,0 +1,674 @@
<?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>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>215, 17</value>
</metadata>
<metadata name="contextData.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>370, 17</value>
</metadata>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>125, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>61</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAQAEBAAAAAAIABoBAAARgAAACAgAAAAACAAqBAAAK4EAAAwMAAAAAAgAKglAABWFQAAQEAAAAAA
IAAoQgAA/joAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAD///8B////Af//
/wH///8B////AQAAAAsLFRwhLVRxOylMZz0GDBAlAAAAEwAAAAP///8B////Af///wH///8B////Af//
/wH///8BCAgIB0+PuFljtujFZMD8+WHA/v9hw/7/ZcT792K44cFDe5FfCAgIFf///wH///8B////Af//
/wH///8Brre+I47U67eU3vz/YMr6/3vD8P9Nr+v/csj1/2q/8f9v0vv/keX9/ZDR27uFhoY7////Af//
/wH///8BNDQ0BarY8L141P7/csX0/zG09P9Wsur/IZrl/zms7v83p+j/PLz2/2nK9/954f//ms7bwRcX
FxX///8B////AWu33FOX4/3/TsX4/0qd2P8Pidv/eKzX/xh6xv8/l9b/TZXO/yCX4v9zu+j/TMv6/43n
/f9QiJBbAAAAAwAAAANzzPTDhsj3/zKr7/9Zotj/BYbc/02f2v8KgdT/E4nZ/yqM0v8Mj+H/U6Tc/y+z
8v9zyvj/cMzeuwAAABFCep8Tasz++2zI8/8np+3/TpzU/wCB2f8yhsf/AHPI/y6S2f8+kM//BoTa/1Wh
1/8jp+z/c871/2/X+fEBAgIhXavfM2PJ//90s+j/HpTg/2acy/8BetD/ZZzK/wxywf88k9T/UZLH/wN5
z/9Xk8b/GpLe/3i16P9pz///JEZZN16z4zNkzv//W8L0/x6q8f85m93/MqXt/2+25/9otur/cbzt/2Sx
5v8zpOv/Jo7W/xyl7v9ew/T/a9H//ydKYTVToccRaNL+/YvE8P8onOT/pcXh/2iw4//F2uv/da7a/53K
6v+gw+D/brLi/6rI4v8nl+D/k8bw/23M+vMDBQcb////AXLd+sNk1Pz/UMv7/3zB7P9gu/H/abLl/12x
6v9mt+z/ZbDl/2C48P9xuen/U8j7/2XM+/9xxOS5AAAACf///wFv4PdPl+b9/1zF+f+tz+v/YbLm/5e/
3v9an9T/hr7l/4u43f9qtOb/q87q/2K+9v+a2/z/V5KwT////wH///8B////AZby/bF56P//htn7/23Q
+v96xvH/Ybzw/2zD8/9uv+//cs34/3zR+f+G5P//ndbptyYmJgf///8B////Af///wHe9fsdm+39tZjl
/f9ry/r/lc30/3O97/96xPH/esDx/4bT+/+Y3/3/ndjwt8PGyCf///8B////Af///wH///8B////AbGx
sQN+3PhLd9j7wW3P/v1ly///Z8v//27N/ft60vS9fb/cS25ubgX///8B////Af///wH///8B////Af//
/wH///8B////Af///wFQlMEPX67kMVum2zE+cZURAAAAA////wH///8B////Af///wH///8BAAD//wAA
//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//ygA
AAAgAAAAQAAAAAEAIAAAAAAAgBAAAAAAAAAAAAAAAAAAAAAAAAD///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wEAAAAFAAAACQAAAA8AAAATAAAAFwAAABMAAAANAAAACQAA
AAP///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////AQAAAAMAAAALAAAAHwAAAC8VJzVFLVJvWzxulHE5aY5tKUxlWQ4b
JEUAAAA5AAAAKwAAABsAAAAJ////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wEAAAALAAAAIzttkmNYotixYrX152O6//9gt/7/XrX9/161
/f9hu///Y7z//1+z8d1Tnc2nKU9mXQAAADcAAAAfAAAACf///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wEAAAADCgoKGUJ3nWFnu+3TcMz//2zM//9nyf//Y8j//2HI
//9kzv//ZdD//2PM//9mzP//a9H//2/T//9z1v/9acLjwzFXaV8KCgo1AwMDEf///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8BhISECXyEiUOO0ue1lu7//4Te//9t0f//ceb//1vG
+v9vwfT/UK/w/0vF+/9T0Pz/b770/2i+9f9bzfz/ceb//3LX//+F5f//m/j/+5TM1bNsbGxjXl5eK0ZG
RgP///8B////Af///wH///8B////Af///wH///8B////AampqQuxvMR5mNf25Yro//+F1/7/sNb4/1ip
6/9Lyv7/cbbo/7DP6/9ppdj/L6Xr/0q79P+81+7/sdHs/zWh5/9Myf7/jcPw/7Lb+v9z3P//ifT//6fa
6teNjo+Hk5OTN////wH///8B////Af///wH///8B////Af///wH///8Btb3DYbXa89Wi1f//b9b//4HG
9/+z0+//PZnf/zW8+v9gp97/q8vn/zuIyf8dluP/KaTt/4q44P9/s93/JJDc/zW9+/9lquT/ttjy/17A
+P9y5P//ltz//6TR4cGSkpKBDg4OEf///wH///8B////Af///wH///8B////ATc3NxGT2fC9rN///2zD
/v9k4f//UcX6/0S38v8suPn/JsP//x6r9f8wrPD/F6Du/xSs+v8UsPz/HKPu/x6o8P8dtPn/J8n//zDA
+v9Hxvf/S8z8/2fr//922v//o+r//4nO1r8cHBw5AAAAB////wH///8B////Af///wEAAAADXaDFYaj6
//+E5P//ZNr//1Hc//9Ar+z/LZHY/xeN3/8Rmu3/NovO/2mh0f8cb7f/BoDX/xGO4P84gsH/W5nO/wx3
yf8UpfT/KJPe/2Ky5/9BtvD/VeT//2Lc//+F7///qf///TxjbGEAAAAd////Af///wH///8B////AQUJ
DA95zvbZjd3+/6PQ9/9Mq+//N7Ty/3Kq2f9IisL/CnXF/wmJ3P+HtNj/udHl/zyAuv8Cec//GY7c/5u9
2//C1+n/C225/wqW5/85j9D/zN/v/1+l2v86xfr/Pqnw/5jS+v9v3P//fNXfvQAAADUAAAAH////Af//
/wH///8BVJnKXYHd//+Nz/v/udfy/z2k6P8yqOr/lbzf/2idyv8HdMX/B4Xa/26j0P+oxd//KHO0/wB4
0P8Cgdj/S4m//5S52P8Ka7f/BY/k/yeDyP+10Of/W57S/yy18v87puj/t9r0/1bC/P+L8v/7IURQVQAA
ABf///8B////AQAAAAVhsu21ft///2jA+/9puvP/MrH0/ymv9v9Go+L/IYzW/wSN5P8Bk+//CIfc/xaN
3f8AhNz/AJTv/wCX8v8AhNz/CYfb/wCH3/8BnPX/Bo7j/yCQ2v8elN//I7X5/zS69v9nw/b/Wcj8/4Pv
//9PoMKbAAAAKQAAAAP///8BESApD2W9+/N23v//Y93//0bN+v8uwfz/G6v1/ymW3v8PgM//AYji/wCM
6P8Ies3/FH3L/wByx/8AiOT/AI7p/yKFz/8lh9D/AnnQ/wCR7f8Jit7/Pp7d/ySV3v8ds/f/McH6/0zP
+/9o5f//gfD//1++6c8AAAA1AAAAB////wFOj7s5ZL///2rX//+GwfT/gLTh/x+X4/8zmd//o8Tg/12V
xP8AdMj/AHvT/zh/u/92pMz/AVml/wB4z/8JhNn/jLPV/7/V5/8TbbX/AIPc/w9zv/+Xu9r/WpbJ/xiU
4P8kld7/n8fp/3u/9P914v//Zcf89wIFBj0AAAAL////AVqn2l9gvf//Z9T//6TP8/+OvOL/HJbh/ySP
2P+wzOT/XZTE/wB1yf8DfNL/To3C/5a61/8YaK3/AHjP/xGI2/+UuNj/zt/s/xdvtf8Ag9z/Bm28/2OY
xv9knMv/GJLe/x6Q2v+w0Ov/jcLv/2/d//9lx///I0RWVQAAABH///8BXq/kbWC9//9l1f//Uqjv/06b
2/8cnOn/Ho/d/2mh0P8icbX/AHjP/wR/1/9Ah8L/cKPO/xlss/8Ae9T/BYTc/0eIwf9WksX/CGi2/wCF
4P8HcMP/VZLG/0CHw/8UkuL/HZPg/0mW2P9aq+//bNr//2LA//8yYXxjAAAAE////wFesuVtYL7//27j
//9X3P//O8v+/yPE//8Vsfz/HqLu/waT6v8AmvX/EaL3/z6r8P9ct/H/YLry/2PB+f9jwvr/Zbvy/1Oz
7/81qfH/EaT4/wCV8f8KlOn/Dpns/xWx/P8oxP//QMz+/1vd//926f//Yr///zNffWMAAAAR////AV6z
4l1fwv//Ztb//3q88/9ipt//G5zq/yaX4f9+sNj/QofD/02h3/9ttun/ibbc/5vA3/90qdT/a7Tn/225
7f+Rut3/mb/e/2+p2P9rue7/U53W/02Oxv80f7//E47g/x+R3v91sOL/a7Tx/3Hc//9kwP//J0lfVQAA
AAv///8BWa3WN2PG//9p2v//nc/3/5rE5/8fmeP/IJPd/5e93f+bvtz/Z6zf/2615/+81Oj/1OPv/4ix
1f9nr+P/drvq/8ja6//Y5fD/cqfT/2e26/9/tN3/3+rz/3eo0v8WkN7/KJPa/8DZ7/+EwPL/dd7//2W/
/PkFCg05AAAAB////wEwX3QLZcr99XDg//90w/n/gbvp/ySc5v8/qen/vNXq/6TF4P9kq97/abPn/7PP
5v/U4+//gKzS/2St4f9wuOn/xtnq/83e7P9so9H/ZLTr/26p1/+50eX/mb/e/y6g5/8wmOD/nsjs/2y3
9P963v//X7Lr0wAAACkAAAAD////Af///wFlyvaze+n//2zq//9V2v//ONX//1/R/f97x/H/bLjn/2G5
7/9gu/L/bLHj/3y45P9iqN3/X7Tu/2C38f93tOH/dbPh/2Cr4v9fvPT/YbHo/2my4/9uvO3/Yc/8/zvP
/v9c1///c+X//4Xl//9UmcqdAAAAGf///wH///8B////AWLH7Fl65///adL//2a59f81tff/dNP8/5HK
8P95vOj/YLju/16/9v9dr+f/YLDm/1uv5/9buvX/W7z2/2W16v9ksuf/XLLq/16/+P9itOv/erzn/3O7
7P900/z/PK70/2m18/9ev/3/heD//SxRa08AAAAJ////Af///wH///8BN3KEB3Dk+92A5P//pdX4/zyp
8P9y1Pr/rdDs/6nJ5P9gqd3/XLXr/3Go1P+rx+H/V5LF/1am4P9brub/o8Pf/7nR5v9anND/Xbfv/3av
3P/Q4fD/kL/k/3XT+/9Cn+f/rNP1/3vT//9wwOW/AAAAH////wH///8B////Af///wH///8Bbt3xV5b5
//+i5/7/WL38/2na//+n0vD/t9Pr/2qv4f9evPD/fbLb/8TY6v9nnMv/Vafh/2Cz6f+81Oj/w9jq/1id
0/9eu/D/eLDe/8zf8P9/uuf/a9T+/2W09/+l2/7/m+z//URsiFMAAAAJ////Af///wH///8B////Af//
/wFxcXEDp/j7t4f2//916///b/X//37j/v+D0vX/asb1/2TO/P9yve3/mcns/2qr3v9YtO//Wrny/5HC
6P+Mv+f/XLDp/2bL+/9vv+//hs/0/3zb+/9z8P//fuT//5Ts//+f2ea1KCgoF////wH///8B////Af//
/wH///8B////Af///wHK7fMrjuv+45bd//9s4///dNT+/6La+v92zPn/cuH//2nJ9/9yyPT/YcH0/2LO
/f9j0P7/YcH0/2nD9P9oy/r/c93//4DO+P+O0Pn/Ycv+/3Lc//+14f//nMvsxbGys2UcHBwD////Af//
/wH///8B////Af///wH///8B////Af///wXb9PtlqOv+33no//963f//s9r4/2my7v9u1f//iMXx/8Lb
8f+OveT/aL/z/2rH9v+KuuP/osjp/2y98f9u0f7/s9b1/7XZ+P941P//gd3//7LW8MvAxMZ7rq6uDf//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wXa8fY7pfb8vZv5//+Z5f//csv9/2TZ
//9hwPr/qtP1/3m37P9fw/r/ZM38/5HE7/+Fvu//VL77/2TV//+Rz/z/k9z//6L1//+d3fC9wsTFV9/f
3xf///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wGxsbEFftrzT3/g
/NN94f//g+j//3jj//9w1///ZtH//2zd//9v4f//Z8///2/U//995P//iev//4bh//+D0vHDf7DMV2ho
aBGqqqoD////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8BJ01fBWO87lVnwPazZ8P982TB//9iv///Yr7//2O+//9kvv//Zb///2a++u1ktuurUZLBTwUF
BQ3///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wEsUWoJVqDQM12t4FdgrudtXavha1ih1FVKiLMzAAAACwAA
AAX///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAoAAAAMAAAAGAAAAABACAAAAAAAIAlAAAAAAAAAAAAAAAAAAAAAAAA////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BAAAAAwAA
AAMAAAAFAAAACQAAAAsAAAAPAAAADwAAAA8AAAANAAAACQAAAAcAAAAFAAAAA////wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////AQAA
AAUAAAAJAAAAEwAAAB0AAAAjAAAAJwAAACsAAAAvAAAAMQAAAC8AAAArAAAAKQAAACUAAAAfAAAAFQAA
AAsAAAAF////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wEAAAAFAAAADQAAABsAAAApAAAANQMGCT0kQ1lVM15+Z0F4ontLi7uRSIa1iz5zmncvWHVjHDREUQAA
AEEAAAA9AAAANQAAACsAAAAfAAAADwAAAAf///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8BAAAABQAAABEAAAAhIT5TRTloi2dPkcGXXq/r02W6+/dlvP//Y7n+/2G4/v9ht/7/Ybf+/2G5
/v9kvf//ZL7//2O5+O9aquPFR4axiy1XcGURISpJAAAANQAAACcAAAAVAAAABwAAAAP///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////AQAAAAMAAAAJAAAAHR86TT1IhbF5Xq3jwWS6+O1kvf7/Y7z//2C6/v9euf7/W7b+/1y4
/v9bt/3/W7j9/1y6/v9evf//X73//2K///9kwP//ZcL9+2G+8uFYqdezO3GPcQ0ZHkUAAAAzAAAAIQAA
AA8AAAAD////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8BAAAAAwYGBg8NDQ0jQ3WaZWS26sNux/nvdND//3PS/v9w0///a9D//2jP
/v9lzf//Y83//2TQ/v9n1///adr//2TS//9l0v//aNL//2rU//9w2f//ddr//3bc//943P7/dNb152S4
2bExUF9dDw8PPwkJCSkDAwMRAAAAA////wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wF6enoHbnJ0KWiEkFWDx+Otkur//Yzn//+G4f//d9v//3fk
//957P//ZNb9/2HH+v9pxvn/Urj3/0u6+f9T0/7/Wd3+/1jB+v9pwvr/ZcT6/1zI+/9o3f7/ee7//3bk
//9+4///iun//5Lz//+a9//3irvHpWh5fG9UVFRLU1NTJTw8PAv///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Abu7uxGxsbFBnrzKj5Tc8dWg9f/7k+z//4nZ
/v+N0fv/Ybj2/1PA+/9X0v7/Wbbz/3636f+axuv/c6/i/ziY4f88t/f/R8n7/2i07P+qz+//ocvu/1ao
6P9GuPf/W9b//1i/+v+GzPr/lNj9/4Dd//+T9f//o/v9+ZHa5s2Rn6SbkJCQeYSEhDtXV1cJ////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BqampCcfHx1Wes8OHmNb46YHZ
/v2K6f//f9f+/7HZ+v+z1vX/Y6vo/0S29f9Gxv7/ZbPp/5rD5v+y0Ov/gLLd/yyL0/8vqvD/QL74/367
6P/N4fL/w9vw/1yk3f82p+v/Ssv+/0yy8/+p0vP/xOL5/4fO/P9z4P//jPT//4vn/vm13+3ffYGCfZiY
mHmNjY0xAAAAA////wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BrLCyN5+5
yY++3/bhuOD//3nN//902///bcL6/7HV9P+qzu3/SJrc/ze08v8zt/j/Xajg/6zM6f+z0On/U5XN/x6B
zP8gnej/Kazy/1ul3v+20ur/pMnm/0uX1P8omeL/N7/8/zOl6v+Lvun/w9/1/4XF8/9gyfz/d+n//3LY
//+s5f//stnnzZWgo52Dg4NhEBAQEwAAAAP///8B////Af///wH///8B////Af///wH///8B////Af//
/wEuLi4Jk665X6rd9unM6v/9nND9/2jH//9m1v//br/6/5PF8P9mrOT/MZfk/y61+P8ruPv/MJ7m/1eq
4/9eruX/LZTb/xaR4P8ZpPT/G635/yab5/9Ho+L/QKPh/yiX4P8ho+7/LL/9/y2w9P9QrOv/er7v/2S0
7/9Tv/v/aeT//2vW//+W2v//u+r995fP3cl+i42DGhoaLQAAAA0AAAAD////Af///wH///8B////Af//
/wH///8B////AQAAAAU+Pj4dk9byu5fh/v2l2v//Z8L+/2TW/v9f5P//TtD9/03J+v85wPf/LMD6/ynI
/v8jwf//G7D5/yWs8/8lqvH/FaLv/xGk8/8SrPv/ErH8/xOm9v8Yo+//G6fx/xqt9P8euvz/I8f//ynK
/v8zy/z/Qc/7/0jU+/9R3P7/ZO///2vn//9z3f//n+n//4Hs+/OUzNTDJycnRQAAAB8AAAAH////Af//
/wH///8B////Af///wH///8B////AQUICQ9gnsNrrvv//4/v//+G5///b+T//2Tq//9S4f//P7/1/z2s
6/8klN7/GZDi/xek9v8Rme7/H4XR/0uTzv9Hjcr/F264/wZuwf8HiOD/C5Pp/xd6yP8jdbz/PYfG/yF7
xf8NgdX/Fab3/xij8v8qmOP/Tq3p/0y38v9Bxvj/Vuf//2Ts//9x6f//i/T//5n7//+w///7P15lYwMD
AzMAAAAT////Af///wH///8B////Af///wH///8BAAAABTxrizF1zfXJo/P//4bc//+Cz/v/VLb3/0fG
/f88uff/UJ3c/22l1/8mdrz/DnLC/w+R4v8LiNv/XJ3P/5u+2/+lxN//Uo7B/wNmtf8EgNf/D5Hj/0qT
zf+MtNb/ts/k/1WTxf8KdML/DJXn/xCR4P9JlNH/qcrm/4a44f9Go+L/P8n8/0jM/v9Htff/edX9/37j
//+a9///c8zZrQ4VF0MAAAAjAAAABf///wH///8B////Af///wH///8BBQkMC1ym2nWE2/3zjOD+/63Z
/P+o0fT/U6jq/zy7+P8xqev/U5fR/5i93v8qdbf/CWy7/wqM3/8Igtb/fa/W/7TO5P+2z+T/WJHD/wBj
s/8BfdX/DI3i/1GXzv+yzOP/zN3s/2CYx/8HcL7/CZLk/wuN3v9OltD/zt/v/6nK5f9Jm9f/M7v2/z/C
+v89pOr/mM/3/4XR/f914v//ju304zpvg2kAAAAzAAAADf///wH///8B////Af///wH///8BQnmfMWi+
8MeJ4///e879/8rj+f+qz+//RJ/j/zK09P8woeX/c6fW/7DM5P9QjcH/CGu6/waJ3v8JgdX/aaLQ/7TN
5P+tyOD/Roa8/wBktP8Afdb/AYfg/xx2v/9tn8r/q8fg/1mSxP8Hbrz/BYvh/wWJ3P8+i8j/wNfq/6LF
4f9IldH/Kq/u/zS99/8+oOT/ns3w/5LQ+/9ezf7/l/f//Vu70akMGR5FAAAAGwAAAAX///8B////Af//
/wEAAAAFUpXFW2rF+/OL6P7/bcD8/7PV9P+JvOn/N5nj/y6y9f8zoOb/cqnY/4Gw2P86gr//BG7B/wSM
5f8Egtv/Jn7F/1ub0P9Lkcv/FHG8/wBvxf8AheH/AI3o/wVzyP8cdr7/P4vI/yN5v/8DccX/A4/o/wSN
4/8ZesX/Y57R/1+d0P8xiM3/IqPr/zC6+f85oeX/icHs/47L9v9WxPz/k/b//2XQ7dUnUWFdAAAAKQAA
AAn///8B////Af///wEAAAAJXarin2fE//+H6f//XMH+/2/B+/9Rtvb/M7P4/y3C/f8osPj/N6Xp/zSh
5f8UkN//BJHp/wOd9f8Al/H/Ao7n/xKU5/8Kkub/AI3n/wCT7f8Am/X/AJ73/wCT7f8Ajub/BZDm/wOO
5v8Akuz/AJ32/wOh9v8GlOn/GJjk/yCd5f8Zn+r/ILb6/y/J/v82vvn/UcD5/2HI/P9d0/7/jPX//2zZ
/Pk/f5p7AAAAMwAAABEAAAAD////Af///wEKExkRZbr342XD//9/6v//bej//1jf/v9I2vz/M8r8/yjG
/v8asPj/Hp7o/yKZ4v8JiNv/Ao3m/wCX8v8AkO3/AoLa/xCF1v8JgNT/AHvS/wCD3v8AkO3/AJby/waH
3/8fjNn/HYvZ/wuC1v8AhN7/AJTw/wGZ8v8LkeT/L57k/zOk5/8Ynen/Hbf5/yvK/v82zPv/TNr8/2Lm
//9z8P//iff//3Hc//9WrNKvAAAAOwAAABsAAAAD////AQAAAAM+dJcvZ8L+/2bG//904f7/XsH8/2S6
8v9IpOb/JJrp/x6q9f8pleD/WZnQ/16Yy/8odrj/AG3C/wCG4f8AedH/EGm0/1eSxf8zerf/AFmn/wBn
uf8Af9n/Aoni/x56w/9vos3/fKrS/z2Cvf8Fabr/AILc/wCD3P8VdL//dajT/3mr1f8pfcP/F5Ti/yGt
9f8nl+T/WK3p/2vB9f9dx/z/fOv//2/Y//9gv+/bAAAAPwAAACEAAAAF////AQAAAAVTmslbZcD//2PG
//9p2f//g8H2/7XV7/94r93/H43b/xqg7P9DnNr/osPf/6PD3v9RjL//AGu9/wCF3v8Adsz/HW+z/5e6
2P9bksL/A1mj/wBktP8Afdb/BYng/ziIyP+qx+D/zt7s/3KjzP8Ka7b/AH/Y/wCB2P8Ub7j/iLHV/6PD
3v8+hcH/F4zY/x6l7P8li9b/ocfo/7XW8f90vfT/cuH//27V//9myPz5BQoMQwAAACUAAAAH////AQAA
AAddreGDY77//2TH//9m1f//mcr0/8ng8/93rdv/HY3a/xee6/8ih9D/j7fZ/7bP5P9Mib3/AGy//wCF
3v8DeMz/K3e3/5y+2v92pMv/Gmms/wBltf8Afdb/CIvh/0SOy/+qx+D/1+Tw/32pz/8Ma7f/AH/Y/wCB
2P8FZbL/N3u1/4mz1f9EicL/F4vY/xui6/8ehtH/rc7q/8ff8/96uu//atr//23V//9mx///KVBlXwAA
ACsAAAAL////AQAAAAdhs+mTYr7+/2PH//9i0/7/arLu/6bM7P9pptn/HIza/xee6v89ltb/n8He/5i7
2f83e7b/AG3A/wCF3v8Hec3/RYjA/5q92f+UuNb/Nnu3/wBktf8Afdb/B4rh/zmHyP+Wudj/sMrh/2CW
xf8IabX/AH/Y/wCB2f8RbLb/fKnO/52/2/9LjcP/GIvX/xqh6/8dhdH/ZaPW/6nN6/9us+3/adb//2zS
//9lxf//OG2LbwAAAC0AAAAN////AQAAAAditu2fYr7//2PH//9j1///Rab2/0+i5f8zjdf/HJXm/xak
8/8Zhtf/Q4vH/0WJxP8OZrL/AHHI/wCI5P8EfNT/KXu//16Yyv9Xk8f/HW+2/wBpvf8Agdz/AYrl/xFz
w/8+hMD/P4S//x1vtf8Carz/AIPf/wCF3/8Ha73/NX69/1CQx/8idb3/EIvd/xql8v8di9z/MYnU/1Oi
5P9Jp/X/adn//2rO//9jwP//P3udeQAAAC0AAAAN////AQAAAAdiue6fYr7//2TJ//9v6v//WOD//0vX
//81yv7/JcT//xq+//8Tr/r/GKDu/xSZ6/8Dker/AJfy/wGe+P8Mnvb/I5/t/0Gr7f9Rsu//WLXw/126
9f9ewPn/XsL6/1679f9dt/D/Sa7t/zCj7P8anvD/CqD3/wGd9/8Bku7/CZLo/xWa6v8Omez/E637/x/B
//8qw///Ocr+/0/Y//9e4f//d+3//2vQ//9jvv//QHieewAAACsAAAAN////AQAAAAdiuuyVYcL//2PJ
/v9o3v//VsP7/1m+8/81qez/IKz0/xmz+/8eoOz/N53f/zKV2/8PgdL/EJDl/zGr9P9MsPD/abPn/369
6f92uOb/bLTl/2y47P9swPX/bMP3/2657P95u+j/eLnn/3G15v9mtev/S7T0/zGp8v8Ridz/A3rN/w+B
0f8KgNP/E5zt/xyw+P8jpu7/Oqrq/1q+8v9Vwvv/ceP+/2vP/v9kwP//Om2PcQAAACkAAAAJ////AQAA
AAVguOiDYcL//2DJ/v9m2P7/fr71/5vH7P9ipNz/G5Dg/xik7/81l9r/h7Ta/4Sx1v9OjcP/WKDY/2a4
7v9vs+X/jLfb/6nH4v+kxOD/f63U/2qn1/9qten/bLvv/36z3f+lxeD/q8ni/4u12P9tqNf/arbq/2i2
6/9jodP/a5/N/3ip0v8terv/E4bX/xqd6v8ghdP/gbbi/5fF6/9rtfP/bdr//2vN/v9mwf7/LVVwXwAA
ACUAAAAH////AQAAAANcsdxZZcb//2LK//9p3f//iMX3/8bf8/+CteH/Ho/b/xum7/8qkdj/ibTZ/77U
6P+Qt9f/Z6fZ/2e37P9xtOT/ss7l/8/g7f/S4u7/mLva/2ej0/9nsuf/brvt/5fB4v/S4e7/3Ojy/6XD
3v9tptT/Z7To/2u26f+GtNr/1ePv/9vn8v9IisL/FIjX/x6g6v8ritP/s9Hr/7/a8v9zufP/dN///23O
//9mwP37ChQaQQAAAB0AAAAF////Af///wFRn8MtZ8v+/2HK/v9x4v//hMf7/8Hd8/+Ju+P/H4za/x6p
8P8slNr/krrc/7/W6f+bv93/ZqbY/2W26/9wtOX/ttHn/9Tj7//T4u7/lrrZ/2Wi0v9mseb/brvt/53E
5P/Y5fD/3ejy/6LB3f9rpdP/ZbPo/2i06P+Cs9n/0uHv/+Hr9f9poM7/GY3a/yCh6/8yj9b/uNXt/7rX
8f9wuPb/eOH+/2rL/v9htvDfAAAANwAAABcAAAAD////Af///wEiQ1ILZsr76WLM/v966v7/XsD8/4HB
8v9kreT/JJLh/yKt9P9Wruf/stDo/7zU6P+Yvdz/ZKbX/2O26/9qseT/o8Xh/9Lh7v/L3ev/jLPV/2Og
0f9jsOX/aLjs/4+84P/S4e7/0eDu/5a62f9no9L/Y7Lp/2Oy5/9updL/n8Dc/8fb6/9/r9f/QaTm/yKl
7v8zk9z/hrrn/4W97f9ctfn/gub//2rH/v9YpNm1AAAALwAAAA////8B////Af///wEAAAADYsXwn2bS
//+E8f//ce///2Pd//9L0v//Nsj//znN//9myvv/d77s/4TA6P9orN3/Ya/l/2G88/9gtOz/aqrd/4e4
4P9+s93/ZqTW/1+m3P9fs+3/YLjx/2ms3/+Ft97/gLTc/2un1/9gqN7/X7fw/2G37/9iqN3/Z6nZ/2+v
3/9ttej/Zsj5/zzH//85wv7/Usz//2nY//915///j+///2vH/ftFfqZ9AAAAIwAAAAf///8B////Af//
/wH///8BYMDmV2nV/fWE7///auL//1zO/v9Nyfv/PNH+/1De//9x2P//eND6/3fM9v9pw/T/YcL4/1/I
/P9exPv/Xrrz/2W88v9iuvH/Xbjx/1y79f9dwPr/XMH6/1679f9lu/H/Y7rx/1648P9du/X/XsL6/2DE
+/9hvvX/asLz/2/F9f9vy/r/ctn+/1PZ/v9Bz/7/Usr8/1/L/f9v2v//k+7+/2e/8NswWHRXAAAAFQAA
AAP///8B////Af///wH///8BXLzfKWrX+cmA6/7/cdz//3/J+/9jtfD/M6bv/1TN/f92zfj/lMft/5jI
6v92s+H/YK7k/1699P9dufH/Xani/2Kp3v9fqN7/Wqff/1qt5/9auPT/Wrv3/12w6P9sseP/aK3h/1+p
3/9crub/Xbv1/1648f9lrOH/e7Xg/4G55P9zt+j/dMz5/1fF+v8/ouv/crbv/2i09v9oyf3/jub+/V+t
2K0VJzM3AAAAC////wH///8B////Af///wH///8BO3mNBWbR9HN16f71huv//4XS/P+YzfT/OaPs/1TH
+/90z/f/rdDs/83g8P+Xvt//YaTY/1237P9bsef/ZKLT/6bF4P+Rttf/V5LE/1aaz/9WquX/WLLs/3Cq
2P+px+H/ts/l/4Ct1P9Zn9T/XLXt/16y6P+Cs9v/zd/v/7zV6v+Hu+P/dc34/1e+9v9JnuT/qNDz/4LF
+v+C2v//f9X25UJ1m2UAAAAbAAAAA////wH///8B////Af///wH///8B////AVu+3Cly6vvJmvf//4zf
/v+44fz/VrLy/1LH/f9z1Pz/kcTp/7vW7P+lx+T/Z6ja/1657f9ctOv/Z6XV/7bQ5v+nxeD/W5TF/1WY
zv9VquT/WrPs/36y3P++1ej/0ODu/4mz1/9ZoNb/XLbu/16x5/9/sdv/yNzt/7/Y7P9/uub/dtP8/1K7
9v9cqer/wuD6/4vP/f+d6v//abjisRIfKDEAAAAN////Af///wH///8B////Af///wH///8B////AS5j
cAVw3PFjnP3//5Xz//+d6P7/XsL9/1DM/v9v2v//ntHy/7/a8P+y0On/ca7e/1+78P9due7/eLHd/7rU
6f+/1ej/eafQ/1WZz/9Vq+b/Wrbt/4O23//T4/D/y93t/3+u1f9Zotj/Xrrw/16x5/+LuOD/yd3v/6rM
6f93uur/cdX+/1K+/P9yvfv/o9v+/4ng/v+o8/75RWZ8VQEBARkAAAAF////Af///wH///8B////Af//
/wH///8B////Af///wFxcXEFkvb8r6L+/v2O9///fO///3Dy//9q8f//fN7+/4zT+P98wu3/aLjt/2TI
+f9ixvn/cLnp/5bF6P+iyej/d67b/1ei2/9Ys+7/Wbrz/3Cy4/+tz+v/nsbm/26s3P9brub/Y8X5/2W+
8v9zuOj/h8Xt/4HG8/961vz/buv//3Ln//+C5f//mu///6r3//mb0N+tLy8vIwAAAAf///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8BuuruRZn3/dt/6P79ieL//2rk/v9v8f//bub//4fj
//+E3v//c9r//3Di//9r3///atL8/3LO+f9zy/b/ZsT0/17E9/9ezP3/X879/2HF9/9ux/T/ccj1/2jH
9v9mz/z/bdz//3Da/v921v3/g9z+/3vb//9u5v//du7//3jg//+U3///md/++ZfW8NuNnqZlJCQkDf//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B1OvvEbTy+3OM6f7ru+n//2DP
/v9x5///btb+/6PY+v+k1vj/ecP0/3LT/P9x2///asP2/3K+7/90wO//YLfu/2C+9f9jzf3/ZNH+/2C+
9v9hue//abvv/2e68P9px/r/ctr//3PL+f+My/X/mND2/3C/+f9kz/7/d+H//4nT///R6///pNDv0Zyt
uYmoqKk7HBwcA////wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////A/v7
+zu87ft1xPD+6Xre/v1+6v//dN///5HS/P+02fb/cbXs/2jC9/9z1v//icnz/7DS7v+/2fD/msPm/2at
4/9nw/f/as36/2yx5v+Nu+P/psrp/3q15f9twfT/ddb+/3jD9f/H4ff/xeD4/4PG+v942P//heL//5TW
/vvK4vPbsrm9gcnJyVWkpKQJ////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af7+/gf7+/s7uu76fZTv/t2U9/79j/P//5Le/v+w3fz/gMP2/1a8+v9h0///Z773/5vJ
7//K4fT/pszs/2yy6P9wy/r/ddb7/3i67P+qzuz/sdLu/3K16v9hwvr/ZdX//3HC+v/N5fv/ut78/33P
/f+N6v//kOn/+ZPS89OjtcJ/ysrKT+Hh4R/b29sD////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8F5/P2Hbjp8Euh9Py9pP3//5fy//+W6P//dtP+/2PP
/v9q4P//Xcj9/3zB+P+fzfX/eLju/1Gr8f9ayf3/YNb+/2C19f+SxfH/hr7w/1ev9f9byv7/bN///2fF
/v+Hz/7/kt7//5br//+v+v/9oNzvu6y+yGnExcU13t7eE/Ly8gP///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////AczMzAOsrKwJfdbzW4Xn
/MGF5v7xg+X//4To//+J8P//fOn//3Hb//9u1f//Ys7//2HQ//9r4f//b+f//2PR//9iy///bNL//3La
//+C6v//jvL//4ro//+L5P//juD76YzY9LmErsdjaGhoG39/fwuqqqoD////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8BWVlZA2Wz2h9px/RnbM75x3DR/vVy0v//b9H//2vO/v9ozP//Z8v//2jM/v9r0P//bND//2nM
//9qy///asv//23N//9x0P//d9T//3XO++9wwuy5WZzLXztVZyE5OTkLMjIyA////wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wEqVGgDXbLgJ2G36VVkuvGdZ8H652jD/v9lwf//ZMD//2O+
/v9jvf//Y73//2O9//9lv///Zr///2jA/ftlufTZXarekVGTwFE9bI8pBQUFCQAAAAP///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEAAAADHjhJC06Q
vClZpddTYLLnfWGy6o1jte+hYrPsn16t5Ilbp9x3UZTEUzNefCUAAAAPAAAACQAAAAP///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wEAAAADAAAABQAAAAUAAAAHAAAABwAAAAcAAAAHAAAABQAAAAP///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8BAAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA
AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA
//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA
AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA
//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAA
AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA
//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//KAAAAEAAAACAAAAAAQAgAAAA
AAAAQgAAAAAAAAAAAAAAAAAAAAAAAP///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wEAAAADAAAABQAAAAcAAAAJAAAACQAAAAkAAAAHAAAABwAAAAUAAAAD////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////AQAAAAMAAAAHAAAACwAAAA8AAAATAAAAFwAAABsAAAAfAAAAIQAAACUAAAAjAAAAIQAA
AB0AAAAZAAAAFwAAABMAAAANAAAACQAAAAX///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8BAAAABQAAAAsAAAATAAAAHQAAACcAAAAvAAAANQAAADcAAAA5AAAAOwAA
AD0AAAA9AAAAPQAAADsAAAA5AAAAOQAAADcAAAAzAAAALQAAACMAAAAZAAAAEQAAAAkAAAAD////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////AQAAAAMAAAAHAAAADwAAABsAAAApAAAAMwAAADsAAAA/CRAWRzNd
fGk1YoNvSoe2j0uKupVXoNi1VJvRrUqHto9FgKqHMl17aypOZ2EAAABFAAAARQAAAEEAAAA9AAAANwAA
AC8AAAAjAAAAFwAAAAsAAAAF////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////AQAAAAcAAAAPAAAAHQAAAC0AAAA3EiArSUV/
qYNZpNu5ZLj26Wi///9ov///Z73//2S6//9kuv//ZLr//2S6//9kuv//ZL3//2fA//9nwP//Z8D//2Cy
7dVSmsylOWmMcwAAAEUAAABDAAAAPQAAADMAAAAnAAAAGQAAAAsAAAAD////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BAAAAAwAAAA0AAAAbAAAAKwAA
ADk7bZFvW6ffvWe+/flov///Zb3//2S6//9gt///XbX//1qy/f9bs/7/W7P+/1iv+/9Yr/v/W7P+/1u2
//9euf//Xbj//2G6//9ivP//Zb7//2fB//9jvvXnUp3KoxoyQFUAAABDAAAAPwAAADUAAAAlAAAAFQAA
AAkAAAAD////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BAAAABwAA
ABMAAAAlAAAAN0F2nnditPDVa8T//2jC//9kvv//Ybz//2K9//9gvP//YL3//169//9cu///Xb3//16/
//9ewP//X8H//16///9dwf//YcP//1/B//9jw///Y8P//2XD//9lwv//Zcn//2jK//9pyv/7W6/dtyZI
WF0EBARFAAAAPQAAADMAAAAhAAAADQAAAAP///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wEAAAADAAAACwkJCRsQEBAvOFt1XWS49M9xzf//dM///3jV//931///edv//3Xb//9w2P//bdb//2vV
//9m0///Z9T//2XU//9o2v//bOL//2/l//9o3P//Zdb//2nY//9s2P//a9f//3Dd//924v//e+P//3rg
//9/5f//fuH//3zj//953f/7Xq7VpyMsMFMVFRVJDQ0NOwcHByUAAAAPAAAABf///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wFVVVUDS0tLETIyMik/Pz9Fdrznr4rl//2Q6f//jOb//4jl//+C5P//fuf//4Tz
//+B9P//b+X//2DT//9jzf//Ysr//0/A/v9Pvv//Usv//1vf//9g6f//V9D//1jA//9gxP//XMf//17M
//9m2v//duz//4L2//9+7///gu3//4nu//+P7///k/P//5v6//+U9P/veqa7l1paWmk0NDRJKysrMS8v
LxscHBwJ////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wGqqqoHgICAG5SUlFGLm6eBmOP/4az8//+w/P//ke7//4Hd
//980///XsH//1a7//9i2P//X9n//1G+//9Nou3/ebfq/3+56v9nq+P/PZTg/zun8P9Gxv//Tdj//0iw
9f9rruf/mcfu/4zB7v9ap+n/QKj2/1LJ//9n4v//X9H//1a+//9nxv//etT//3ng//+P9v//r////7b/
//+b4/TNjY2Nl4CAgH15eXldTU1NKUZGRgv///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wHGxsYJvLy8L7u7u3+owdSzn+v/8Y3r
//+f+P//gej//3bK//+g0v3/nMz3/3S27v9CofH/VM///0/L//9YtfD/hbnl/63O6/+61u7/pcno/zqL
0f8xnOP/N7j6/z3L//9Zsu7/mMLn/9jn9v/V5/X/jL3l/zSW3/9EuPr/UtL//1DE//9erO3/xOL5/7vf
+/+Lzf//btX//4b2//+c////h/v//5jj+tGdoaKpnZ2dq6SkpI1eXl4nVVVVCf///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wG/v78Fnp6eHc/P
z7F+pcGFm9v/84TT//9y1P//i+v//3HT//+u1/v/z+X5/7XW8/9vruX/PJ/q/0nO//9Bwf7/WLDq/4+8
5P+oyuj/tNHr/5jA4v8tgMj/J5Lb/zCw9v81wf3/X7Hp/6PH5//f7Pf/1eb0/4685P8pitX/Nq3w/0jN
//9Iwv7/S5/m/8ji9v/W6vr/rNb3/2nE//9y5P//kPb//3Li//+i6f//xev552ducGt/f399sLCwi2ho
aCEAAAAF////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8BmZmZFb29vXNxkqhzxOf/+c3q//+Lzf//b9D//3rh//9fw///drfv/9/t+f+mzO3/Vp3a/zSe
5/9Bzv//MrP3/1ao4v+cwuX/4Oz2/73W6/9wptT/InjA/yGM1v8jpO7/JrT3/0Gf4f+SvOD/5u/3/8/i
8v+It97/IoHO/y2j6f86w/7/O7/5/zGN2/+41/D/1Oj4/7TZ9P9ctff/ZNP//3/w//9v3///dtX//8jv
///A5fPhU1NTX7W1tctVVVU5EBAQEQAAAAP///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8BAAAABXl5eSm/z9rRnNv/7d3w//+/4f//cr///2zT//9q1///dsb8/7rZ
9P/V5/f/da7f/z6O1v8sm+f/NcL+/yyt9v83l93/WZzU/5nB5P92q9r/RI7M/xh2xf8WiNn/G6Dy/x2u
+v8ikeP/QY7R/3Kq2v9jo9b/RJHR/x6A0f8jnej/Lrj9/zG6+f8qj+D/gbfl/63S7/+jz+//Xa/r/1vJ
//9w5///a9z//3bO//+k4f//vez//43X68Wbm5urWFhYVxQUFCcAAAANAAAAA////wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8BAAAAAzw8PBFlam1Do+j/6a/i///W7P//n9D7/1m0
//9s2v//Xtb//1W5//9Zqe7/Zq7q/zSW4/8plun/LbT//y7H//8nu///IKf2/yWg6/9Ir+3/Oqzu/yai
7P8Wne3/GKn4/xmy//8auP//GKz8/x6h7f8upez/KKrv/yGm7v8fqPH/IbX9/yjE//8uy///K677/zmr
8f9Hq+//VbHx/z2k9P9Qxf//Y+T//2vj//9jy///pN7//8zu//+q7f//hM/es4iIiJEkJCRBAAAAHwAA
AAn///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////AQAAAAlDQ0MrmNn6x4/p
//+V2f//mdX//1q9//9fy///bO3//1vn//9N2v//S9j//0XQ//8zy/7/L8v//yvO//8my///IMD//xm1
/f8dsPf/I630/xuo8v8So/H/D6Hw/xCo+P8Qrfz/EbL9/xCq+/8To/L/EqPw/xel8f8YrPT/GLL4/x/B
//8gxv//Js///yrP//812P//PNn//0Xj//9M4f//Vun//2Hz//9w9f//aeT//2jd//+c6f//fOb//3n6
//ekytXFMjIyUwAAADEAAAATAAAAA////wH///8B////Af///wH///8B////Af///wH///8B////AQAA
AAMAAAATW4qsabX8//+U+P//iuj//4rt//987///cPP//2j1//9T6f//Q9P//zy9+v80q+//IZvn/xyV
6P8bpfj/GK7//xGZ8P8Ogtj/HnzI/0+Vz/8jeML/B2W2/wdnuv8Ie9L/CZDq/wqc8/8KgNb/Cmm7/wpm
tv8bc77/G3bD/w10yf8QjOL/F6j7/x23//8Zm/D/KJzo/zen7P9KtvT/PsL+/0bX//9Y7f//avf//2/0
//+B9v//k/r//53+//+h////tv//9zk/P1sEBAQ/AAAAIwAAAAn///8B////Af///wH///8B////Af//
/wH///8B////Af///wEAAAAJEBcbJ3TP/9+9////mvj//4bm//941v//VsP//0/G//9N2P//PLr//zKV
4f9QmNf/TJLO/xVuvP8Sb8D/FI7f/xGc7f8Nh9n/PY3L/3Cjzv+iwt7/kbfY/2CWxf8DXKj/BHHC/wWG
3/8Fk+r/LInQ/1OQxP98qtD/qsfg/4+21/8IZK7/C3vL/w2T5v8SpPH/EoPU/06Tz/+Htt3/grXf/0yd
3P81per/Qcv//1Lj//9Jw///UsX//2rc//976f//mP///7n///9qwdilBwcHRQAAADMAAAAVAAAAA///
/wH///8B////Af///wH///8B////Af///wEAAAADAAAAE1aZyYOC3///oPT//2vK//+Nyv//icP1/1qo
7P9BsPj/Qcr//zWo7P9Wndf/mb/h/4Cv1/8OZK//C2W0/w2I2P8Oluj/CIDU/2Gg0f+ev9z/vtXn/7TO
5P96p87/A12p/wRxw/8Fht//BZPq/zWP0v91pc//udHl/9Pj7/+xzOP/EGew/wh4x/8Jj+L/D6Dv/w5/
0P9rpNP/zuDw/8fc7v+Ds9z/QqDe/zW7+f9G1v//QbT7/z6j7P+Eyfv/iNL//2DT//+Q+v//jfj/9yc9
Q1cAAAA9AAAAIwAAAAn///8B////Af///wH///8B////Af///wH///8BAAAABwoRFyFswv/nj+b//3/f
//+s2P7/z+X5/6rQ8f9bpeX/O7L0/zzD/P8rneT/LIDH/6/M5v+KtNj/C2Gs/wlksf8Jhdj/CpHm/wd9
0P91q9X/q8jh/8LX6f+zzOP/daPM/wBZpv8AbcD/AILc/wCO6P8riM7/daTO/8zd7P/X5PD/rsri/xNl
rP8Dc8P/CY7h/wqd7f8LfdD/Yp7P/8/g7//P4fD/hrXb/zKO0/8tsvL/QdL//zyw9P89n+X/k8v0/8Pk
/P9Tvf//eun//57+//9cs9OlAAAAQwAAADMAAAATAAAAA////wH///8B////Af///wH///8B////AQAA
AA9SlsZ5cs///5Dp//9tz///stj6/+Pw+/+axuz/S5rg/zay8v8yufj/LZng/0uPzP/I2+3/ncDd/zd9
uf8JY7D/CYfa/wWM4/8Mf9H/ZKDQ/6vI4f/a5vH/tM3j/2udyP8AWqb/AG7B/wCC3P8Ajuj/CHXH/zx/
uv+Vudf/xNjp/6/K4f8XaK7/A3LC/wWI3v8Fl+r/CH3O/1mWyv/N4O//yN3u/4u32/8zjM//KKrs/zbM
/v81sfL/QJrg/4nD7v/R6vv/TrX9/2ja//+k/v//cOT/8RAhJ08AAAA7AAAAHwAAAAf///8B////Af//
/wH///8B////AQAAAAMAAAAXZLbw027P//+V7///Wr3//7zb9//W6Pj/k8Hp/0OV3f8zsvL/LLH0/z2d
3v9+r9n/xNnr/5C32P8+gbr/BmKw/wWF2v8FjOT/CX3Q/zeDwf9zpM7/o8Le/2+gy/83fLj/AFyq/wBv
xP8AhN//AI/q/wByyP8WaLD/Roa8/3KjzP9tn8v/DmOs/wNvwf8Fid//BZfr/wR6zf83gb7/oMLf/6HD
4P95q9X/NYrM/yKa4/8yxvz/M7Px/0ad4P+SxOv/8fj9/0it9f9bzf//pv3//3Pq//9IlLCLAAAAQQAA
ACsAAAAN////Af///wH///8B////Af///wEAAAAJO2uNQWrB//9szv//lvP//1e3//+byvL/oMrw/1+k
4v8vjN3/MbX4/ymw+f8wmeP/TpXT/3Cm1v9Di8j/GW+6/wNpv/8Fjuf/BZPv/wCA3f8AcMj/HXvH/zqN
z/8QdcX/AG3C/wByyv8Agd3/AJDw/wCY9f8Ag+D/AHHJ/wBuw/8NdcX/EnbH/wNvwv8AetT/AI/s/wWe
9v8Fh+D/CW/B/yF4wv82hMf/L4LH/xZ9zv8cmun/Krn9/zG5+v8xl+H/U6bm/63Y9v9UsPP/WMz//5r7
//9t4///X8PqzwAAAEUAAAA1AAAAFQAAAAP///8B////Af///wH///8BAAAADVqk2ZVnv///Zsj//5H0
//9Zx///Vrj//2vE//88tvz/Nbf//zPO//8pw///JbP9/yup8v8yqe7/HZ/s/wuX6v8FmfL/BaT6/wCf
+f8Anff/AJjz/waZ8P8NnPH/A5nx/wCY8v8AmvX/AJ74/wCh+f8ApPv/AJ74/wCa9P8AmPL/A5ny/wOZ
8f8AmPL/AJz3/wCf+P8Ap/v/Baf6/wed8v8So/D/GKPv/x6p8f8Xq/b/Hrn//ynK//840///OMb//0XE
//9Xyv//Vsv//2Lc//+T/P//dOP//2nS//0fP01ZAAAAOwAAAB8AAAAH////Af///wH///8B////AQAA
ABNktvDPZb3//2XI//+K9///ePL//2Xr//9X7f//S+n//zrY//8x1f//Jcf//xm2//8ZqvX/I6bw/xSc
6/8Fkej/BZXv/wCc9/8AnPf/AJb0/wCM6P8GiuH/C4vh/wOH4P8Aht//AIfj/wCR7/8AmPX/AJ34/wCT
8v8IieL/GZHh/xOP4v8Ki+H/Aofi/wCQ7P8AmPX/AJ34/wWi+f8Lmez/IaDs/yqp7/8lqfH/E6n2/x+/
//8lyv//Ntn//z3b//9N6f//YfD//2/1//9++v//k////3no//9r1P//RYuqhwAAAD8AAAAnAAAAC///
/wH///8B////AQAAAAUdNkYhasP+/WO///9pzP//gPD//2HY//9Owf//Rrf7/zKn8v8on/P/J7v//xuo
+v8Tit//G3jH/06RzP8dcrn/BmOz/wBovv8AiOT/AInm/wB30f8AZLf/HG+0/zV+vP8OZK//AFuq/wBh
sv8Ac8r/AIbj/wCR7f8Dd87/Gm+2/06NxP9IicL/MXu7/whisf8AbcL/AIHd/wCO6/8Af9f/FXG+/06R
yf9gntH/TZLM/wxxxv8TkeT/ILL9/yq4/f8qm+7/M6Xv/0++//9Tyf//Ydz//4X2//924///Z8///1mx
27kAAABDAAAALwAAAA////8B////Af///wEAAAAHTpC7V2rE//9hvv//a9L//2/g//9Xr/7/e7fq/4S5
5/9NltX/IYXX/yCr8v8Zmur/SpnW/4ay1/+ewN3/b6DL/zh9t/8AY7P/AIXd/wCF3/8Acsf/AF6s/2ea
x/+oxd7/Mniz/wBWof8AW6j/AG/C/wCC3f8Ajuj/DnjJ/06Mwf+40OT/vtTn/56/2/8hbq//AGi5/wB9
1f8Ai+X/AHfM/yV0tv+Tudn/rMnh/4621/8ab7f/F4jV/xqj7v8jqe3/JoLR/22q3f+VxOv/ebvu/1W2
//925///e+T//2TL//9kwvTlAAAARQAAADMAAAAT////Af///wH///8BAAAAC1ii039nwf//Xrz//2jP
//9o2///fL72/8rh9P/G3fH/bKfY/x6D0/8grPL/FJTm/1ag1/+ewd//zd7t/4611v9Cgrn/AGOz/wCG
3v8Ahd//AHLH/wBeq/97qM7/v9Xn/z+AuP8GWqP/AFuo/wBvwv8Agt3/AI7o/xl+zP9gl8f/ytzr/9zo
8v/F2en/Lna0/wBouP8AfNT/AIvl/wB3zf8ZarD/daXP/6rI4f+gwt7/InS5/xaE0f8aou3/I6ns/yeB
zv+jyOf/1+f2/7TU8P9qufT/bt///3fh//9lyP//aMr+/QkRFUkAAAA3AAAAFwAAAAP///8B////AQAA
AA1fsOWlZ8H//1y6//9u1v//Zdb//5DH9f/Z6ff/wtzx/1+e1P8fhdT/G6nx/xSU5f8bfMb/Zp3M/+Tt
9f+Otdb/On23/wBktf8Aht7/AITe/wJ0xv8FYKz/eafO/7nR5f9Pi73/F2aq/wBbqP8Ab8L/AILd/wCO
6P8ig87/ZprJ/8LX6P/f6vP/0ODt/zJ5tf8AaLj/AHzU/wCL5P8Ad83/Alyn/wZaov9vosz/kbjZ/yV2
uv8WhNH/GqLt/x6l6/8ffMn/sNDr/9/s+P+31vH/Z7Lw/2bZ//955P//Ysf//2jI//8sVWtlAAAAOQAA
ABsAAAAF////Af///wEAAAANY7btu2S///9cu///atP//2DU//9rtPH/vNny/73Z8P9dn9b/HILR/xyp
8f8UlOX/TZnS/53A3v/b5/L/f6vR/zB2s/8AZbb/AIbe/wCE3v8Kdsj/MHy6/4201f/C1+j/j7XV/0qH
vP8AW6j/AG/C/wCC3f8Ajuj/IoPO/2aayf/C1+j/0uHu/7nR5f8rdLL/AGi4/wB81P8Ai+X/AHjO/xdp
r/9xocr/qMbg/6fF3/81gL3/G4bS/xad6/8epev/HnzJ/2qn2f/K4PL/s9Pv/2Ou7v9m1P//eeT//2PI
//9oyP//PXaWewAAADsAAAAdAAAAB////wH///8BAAAADWS48Mdkv///XLv//2rT//9g1P//RKHt/4e8
5/+ZxOf/SZLQ/xyF1P8cqfH/EpLj/0qX0v+Js9f/sczj/1iRwv8caq3/AGW2/wCH3/8AhN7/C3fJ/zJ9
u/94p87/pMPd/4Wu0f9Ihrz/AFuo/wBvwv8Agt3/AI7o/xZ8y/9Ihr7/lrnY/5u92v+Bq9D/HGut/wBo
uP8AfNT/AIvl/wB4zv8Xaa//caHK/5i82v+Otdb/LXu7/xmF0f8Wnev/HqXr/xx6yf8ugMb/mMPm/5LB
6f9Yqe3/Y9P//3Xe//9gv///ZcX//0WFqocAAAA7AAAAHwAAAAf///8B////AQAAAA1lu/PRZL///1y7
//9r1f//Ytr//0Gq//8+nOr/NpTh/yCD1f8dj+T/HLP7/xKa8f8Mes//HnW//0yQyf8Va7b/AF+x/wBr
wv8Ai+f/AInn/wV60f8Wcr7/QYbD/1yXyv8+hMH/HW+3/wBhtP8AdMz/AIfl/wCS7/8AdtH/Dmi1/zB8
vP8ndrn/Fmu0/wVisv8AbsT/AIHe/wCP7P8Aftj/BWS3/xZrtP84gsL/PYXD/wpouv8Mg9j/FqP0/x+s
9f8ehNn/I4LU/zyV4P8+m+j/Qaj+/2bZ//913///YL///2W///9Kj7aPAAAAOwAAAB8AAAAH////Af//
/wEAAAANZbz002S///9cu///bNn//3Lx//9b5P//Ut3//0LW//8xyf//KMX//yDH//8Wt///EKz5/xKe
7/8fn+3/BpLp/wCQ6v8AlPD/AJ74/wCd+P8Cmfb/CJPs/yKd6v8/qe3/Sq7u/1Cx7v9YtfH/WLv4/1u/
+f9bwvv/WLv4/1u28f9Vs+//Q6vs/ymf6v8Ok+n/AJTw/wCb9/8An/n/AJr2/wKP6/8IkOf/GJvr/xmc
6/8Mme3/EKj6/xm8//8lyP//LMP//zXI//9H1///VNz//2Pm//948v//d+P//2C///9lv///S4u3kwAA
ADsAAAAdAAAAB////wH///8BAAAADWS/8clkxP//XLv//2zY//9u7P//Wdv//1fU//9Kz///L8H+/yfA
//8gxv//Fbb//xuu+f8gqPH/J6Pu/xCX6/8Fk+v/AJf0/wCf+f8Oo/j/Nq/4/1u69f9zw/X/eMX1/3DC
9P9twfT/bcL2/23F+v9tx/v/bcn8/23F+v9vwvX/dcT1/3PD9f9wwvT/bsH1/1u9+P82sfj/DqX5/wCc
9/8Aku3/AJDp/wqW6/8Ll+r/Cprv/xSr+/8Ztv//Jcf//yu///80wv3/UNL//1fW//9e3f//dO7//3fi
//9gv///Zb///0WBqocAAAA5AAAAGwAAAAX///8B////AQAAAAtkvvC9ZMT//1zB//9q0///Ytj//0+u
/f9mr+v/Xafl/yeH1/8cjuX/HLL7/xWf8/8ojdf/R5HO/2Kf0f8xf8P/Dmq4/xR6zP9MsPH/bLzy/2yz
5/9sqdr/gbLb/4+63/90qtf/bKbV/2yp2v9ssub/bLzz/2zC+P9stOn/c6za/4W13P+Bstv/eK3Y/2+o
2P9sruH/bLnv/2zA9v9Mpub/FHC//wBgsf8Ra7f/F2+5/wdmuf8PhNn/Fp7y/x+m8v8ehNj/LYfU/2Sq
5P9equr/Sar8/2rb//964f//X77//2jC//9AeJ5/AAAANwAAABkAAAAD////Af///wEAAAAJYrrrp2TE
//9bv///ZNP//2jb//99vvX/uNfx/6XL6v9hotn/GoTW/x2u8/8Umej/SZrV/4632v/D2er/bKDM/16V
xf9qpNT/arnt/2q57f9yseH/jrjb/6vH4f+90+f/rsrh/5C11/9qoM3/aqvb/2q36/9qvvL/dbLh/5G3
2P+80+b/vtTn/67K4f95p9D/aqfX/2qy5v9qvPD/b7Pk/32r0v+JsNT/nL/c/5i82v8abbP/E3/O/xaZ
6P8eoOn/InrH/5C94/+11O//nsns/2e09P9r2v//ddv//2LA//9owv//MVt3ZwAAADUAAAAT////Af//
/wH///8BAAAABV614X9nx///XsH//2fT//9p4P//c7r2/8fg9f/D3fL/a6jb/x2F1P8hsfT/FZrp/zuT
1P+Ar9b/0+Lv/63K4/+Fr9P/aKPU/2i47P9ot+3/dbTi/6jI4//H2ur/1+Xw/9Hh7v+pxt//aJ7L/2iq
2/9otev/aLzx/4C44/+qx+H/3ejz/+Hr9P/O3u3/fqrR/2im1v9osub/aLrw/3Cz4/+MtNf/ydvr/+bv
9v/K3e3/Gm2z/xOB0P8anuv/I6Pp/y2Cy/+oy+j/1OX1/6rQ7/9isvX/cuD//3nd//9kwf//aML//xEf
KUsAAAAvAAAAD////wH///8B////AQAAAANZrtVXas3//1/E//9l0P//ceb//3fD/f/F3/X/zeL0/22q
3P8dgdL/Ia/z/xuh7v8Vfsz/So7G/8LY6/+uy+P/jrbY/2eh0v9nt+v/Z7ft/3a04/+00Of/zd7t/9fl
8P/R4e7/qcbf/2edy/9nqdv/Z7Tr/2e88f+LveX/ts/l/+Pt9P/k7fX/zd7t/3yp0P9npdX/Z7Ln/2e6
8P9vsuL/lLrb/9/q9P/w9fr/2OXy/yNzt/8Sg9L/Gp/s/yKh6P8xhs//qcvp/9vq9/+mze7/YLL4/3fj
//9y2P//ZMD//2S69ecAAAA/AAAAKQAAAAv///8B////Af///wH///8BPnmUH2rP/v1ixv//YM///3vs
//9qvv//uNr0/73b8v9/teH/H4HS/ySy8/8bou7/UKPb/7bR6P/R4e//vtXp/5e93P9lotL/ZbXq/2W3
7f9ysuL/qsrk/8/g7v/h7PT/0ODt/6TD3v9lm8n/Zaja/2W06v9lu/H/g7rj/7LM5P/n7/b/4+31/8jb
6v94ps7/ZaTV/2Ww5v9lue//aa7g/4Gu1P+1zuT/5u/2/9rn8v9mn8//IIrW/x+k7v8mpOr/PY3S/7jV
7v/J4PP/oMnt/1+z+v+A5///cNT//2bB//9bqt/BAAAAOwAAAB8AAAAH////Af///wH///8B////AQAA
AAlnyvjZZMr//2LR//+G9v//UsP//12z9f+AwPD/SJ/h/yaJ3f8otfb/IKn1/3G25/+py+f/w9nr/6/M
5P+Nttj/ZaLS/2O26v9jtu3/a6/h/5O83f/B1+n/3+rz/8LX6P+Xutj/Y5rJ/2Om2f9js+r/Y7rx/3Wy
4P+iwt7/3+rz/9Xj8P+2z+T/cKHM/2Ok1f9jsOf/Y7nw/2Oq3v9toc3/hK7S/8XZ6v+60+f/aqPS/1yt
5/8gqPL/JqTs/zeO2f9srOP/jcDt/1+r7f9UuP//jfH//27P//9mvv//TY65kQAAADUAAAAXAAAAA///
/wH///8B////Af///wEAAAAFYcLqk2fN//9l1///jvv//3j1//9h3///Ztn//z/H//80uv//LMj//zvE
//9xxPj/cLPm/5fE6P99st7/YqDT/2Kj2v9juvH/YLfx/2Gu5f9no9b/g7DY/53A3/9/rdX/bKHP/2Cb
zv9gp93/YLTu/2C69P9kquD/dqnT/5e83P+Nttn/e6vT/2Sczv9gpdv/YLLr/2C68/9ireX/Y5/R/2ag
0P9wptX/cKra/2uu5P9wwvb/PsP//y+9//82s/7/Rr7//2zR//9k1v//d+r//5r6//9tz///asL//ypM
ZF0AAAAtAAAAD////wH///8B////Af///wH///8B////AVatzj9q0///Z9f//5L7//908f//ZuX//17j
//9S5///Rer//z3q//9e4v//c9z//3DU/v910vv/cMz4/2TD9f9hwPf/Ycn8/2HJ/P9ev/n/Xrjy/2i5
7/9zve//ZLbt/16z6/9etO7/Xrr2/16++f9ewfv/Xrr2/2O07P9uuuz/arjt/2S16/9es+3/Xrr0/16/
+f9hxvv/YcH6/2G68v9kv/P/a8T1/27J+P9x0v7/ddr//2Lg//884P//TOz//1jo//9o5///cOb//4Lw
//+f+///cNL//2O179sAAAA7AAAAIQAAAAn///8B////Af///wH///8B////Af///wEAAAAJaNH522vc
//+I8v//auD//1O7//9auP7/Pqr3/zSv/v851P//bdv//3fS//9+zfn/g8z1/3fH9P9owfP/YsL3/1/I
/P9fyv3/X8f8/1y99/9evfX/X771/1299v9cvvf/XL74/1zC+/9cxPz/XMX8/1zC+/9ev/j/Yb72/2C+
9v9evfX/XLz1/1y/+f9fxPv/YMf8/1/D+/9kwPX/bcPz/3PG8/9xxPX/bcf5/3XV//9y3f//Pcr//zuw
/f9ErPn/VbD7/1Cw//9nz///n/X//3HS//9PkL6VAAAAMwAAABUAAAAD////Af///wH///8B////Af//
/wH///8BAAAAA2HG6X1v4P//hu///3bl//9zyP//ptX3/1uu6/8ymOX/Nbn6/3Xc//94xfT/lsPq/63O
6v+XweT/canY/2Ci2P9gt+//Xbz1/12y7P9dpN3/YKHW/2il2P9eodb/Wp/W/1qi2v9arej/Wrj2/1q9
+f9aruv/Yqfc/3aw3v9uqtv/ZKTY/12i2P9dq+T/Xbfz/1299/9frOb/aaTX/3yu2f+MueD/gLLf/3Gy
5P9zxPb/edn//zao8v9EmOL/e7bq/5LF8f9OqPf/ddX//5Xs//9yzf/3HTRFTwAAACUAAAAL////Af//
/wH///8B////Af///wH///8B////Af///wE9fpIVa9r/7Xru//+N9P//Wcb//6nY+v+Gw/H/Npzo/zmy
9/9x3P//d8r0/6/R7f/d6vX/y9/v/4Sy2f9in9L/XLLo/1678f9areT/WZ3S/4Ov1f++1Oj/eafP/1eR
xP9XlMf/V6HY/1eu6/9Xt/L/XqXc/3yr0v+vyuP/s83k/53A3f9clsn/WaLY/12z7P9evPP/Xqje/4+4
2//O3+//zuDv/6fI5f9/uOP/dcj2/3fa/v85pO7/Up/i/6HL8f+m0PX/V7T//4nj//+M5P//X6jesQAA
ADUAAAAXAAAABf///wH///8B////Af///wH///8B////Af///wH///8BAAAAA2HL64d28v//p/7//3PZ
//+w3fz/td35/0Wk6/8+svn/a93//3bO+f93teP/tNLr/8La7f+TvN7/Z6PV/16y6P9ev/P/Wq/m/1qf
0/+QuNj/4+31/5K32P9ak8T/V5PG/1We1v9Vren/VbXw/2So3P+Sudr/0ODu/9nm8v+91Of/WZTH/1qk
2v9bsuz/X73y/1+n3f+PuNz/xtvt/9/r9f+lyOb/eLfk/3rP+v9u3P//PaHu/0OY4P+93ff/rtf6/23F
//+g8P//etj/+yhFWVUAAAAlAAAAC////wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wE9gZIVdOz/5aj///9w6f//oN7//8jo/v93wPX/QrL9/17d//971f//lcvt/7fU7f/C2u7/pMfk/2+n
1/9esuf/YML2/1yz6v9bodX/i7bZ/93p8/+YvNv/YZfG/1WSxv9Wn9f/Vq/q/1a48v9ur+D/lbzb/8nc
7P/X5fH/utLn/1eUyP9aptz/XLXt/2C/8/9epd3/hrPb/7rU6v/h7fb/mMHj/3O46f9+1P7/YNT//0Cf
7/+KwfL/2+38/6DS/v9z0f//ufr//2ew5K8FBQUzAAAAFwAAAAX///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8BAAAAA2/T61+b////pf///4/y//+U5v//Ycj//0m8//9X3///ddr//5bQ
9v+72vH/x93x/6/O6f97r93/YLTq/2DF9/9ctuz/c7Hf/57D4f/b6PP/wNbp/5G32f9Vk8f/VaHY/1aw
6/9XuvP/Zavf/6PE4f/v9fr/1+Xx/6TE4P9Wlcr/W6je/1+68f9fvvL/XqTc/6HE5P/M3/D/zN/x/36y
4f9zvu//eNf//1jS//9Or///fMT//53X//9/2f//lfP//6/1//U7Q0hNAAAAIQAAAAn///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wFxcXEJffX/ubH///+X////lfr//4b1
//9w7///bvb//2Xt//992///gcr7/5zL8v9yseX/Z6rk/2K48v9jyv7/Yb72/2yz5f+IuN//t9Pq/6zK
5v+Ktdr/VpXM/1ak3f9YtO//WL31/12p4f+OuNz/0OHw/7TQ5/+Kttv/WJvT/1us5f9gv/f/ZMT4/2Gq
5P97suH/irzn/4y/7P9zuPL/fdP//2nn//9t6///b97//4rp//+e8///r/v//7T///+Wx9+tNTU1MQAA
AA8AAAAD////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////AZrB
ySvA///3efv//3rl//9w4v//cOn//3f6//9z+f//cvX//4jz//+F7f//eeL//3Ha//9v3f//ad7//2bU
//9oyvz/bsL0/4fI8/98wO3/bbfr/1uu6v9buPT/WsH+/1vH/v9buvf/Z7Pr/3++7P9/vu3/c7vt/121
7/9ix/3/aNP//2zZ//9tz/7/dNL7/3/d/v+E5f//ie3//3f2//95+P//gPf//3/p//+C4f//gtz//4Pn
//+m5v/XZWVlUSkpKRkAAAAD////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wHb29sPxPD4g33y//WI4v//u+j//1vO//9o4f//bOz//2Hb//910P//m97//4nW
//941///deL//3Xt//9w5v//bN///2nZ//9q1/7/aNT+/2bV/v9i1f//Y9f//2Pa//9k2///YtX//2HS
/v9l1f7/ZtT+/2nW/v9o1///bd7//3Hj//915f//ddv//33c//+I3P//hdX//1zI//9k3v//dOv//2zX
//94yv//t+P//7/m//9+yP3PvL7AyWpqajEcHBwJ////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////A+fn5xXG9f2fhOj/++f4//9cx///ZdT//3nt
//9k1///l9D7/8Lh+P+l0/X/f7zv/2289/913v//cNb//2vA+P9mren/hL7s/3S46/9grun/Xq/s/2G9
+P9kzf//ZtT//2G/+/9esOz/YrDr/2uz6v9qser/Y7Lu/2rF/f9y2P//ddT//3G28f+dy/P/p9H1/4XA
8v9btPz/adT//4Do//9oyP//u+L//+v2//+m1vnnanR7YcLCwoOQkJAX////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8N+/v7iYji
/HHf+P//keD//2XW//+E7///ceL//2TE//+02/j/s9j1/3O06v9ksO//fNv//3fX//+GyvX/sNLv/73Z
8P+81+//psro/2em3P9isen/Z8f7/2rT//9itOz/cqzf/4684v+pzOr/jLvk/2Wt5P9vx/f/edr//3fN
/P+Au+3/2uv5/9Pn+P+ezPX/bL///3je//+I6P//d83//7vj///h8f35oq62f8zMzKGioqIfmZmZBf//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Bf///xP7+/uJue36iYHp//d06v//ifT//4Py//+S3v//rtv9/7nd+f+LxvL/RaHw/17Q
//9p1f//cMT4/3u26P/B3PL/zuP0/7vX7/9yreD/aLbr/2/P/v903f//abnw/4C14/+rzuv/wNrw/5TC
6P9stOv/c8z+/3Dc//9awv//hL7y/+/2/f/W6fv/jsj5/3LM//+K6P//jun//3rW//+R0P7daXeAW7i4
uG3i4uJf1dXVDf///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8F////D/f390XK8PmNqvv/8aT///+h////fOn//4/Z
//+z4P//ltH9/1qy+v9bzv//XNb//1S///92uO7/vdz0/8/k9/+31vH/b63k/2q78f941P//fuL//2y+
9v+Nvur/wdzy/73Z8f9+t+j/S6nw/1TG//9k3P//Vb///5TJ+P/Z7P3/xeT//3TI//+A4v//n/n//5n0
//+V3P/Pv8LGn87Oznnc3NxB6urqDf///wP///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wP///8H39/fEbXP
2Tmd8v/Nqf///6b9//+V9P//j+n//3XZ//9j0P//adr//3Ho//9f0///XLj//4rF9/+TyPX/dLjv/0qh
7P9Hsfz/Vc///17g//9Itv//ZrDv/5PG8/+EvvH/WKrz/0+1//9k1///der//2TP//9ivf//eM3//4Xb
//+Q6v//sfz//7r+//2i2/K7sbGxb7GxsTHGxsYT39/fCf///wP///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wHMzMwFqqqqD3nL7VeD5//bjO///4zs//+K6v//her//4zx//+P+P//g/L//3Lh
//9v1///bdP//1/N//9Zx///YNT//2vm//9x7///Ytf//1zI//9ex///as///2rS//934v//ifP//5X6
//+N8P//jun//5Lp//+X6v//lur//43X/8eGna5jaWlpJ3NzcxWqqqoH////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wFVVVUDXV1dC2i/62tu0f/hcdf//3Xa
//952///et///3je//922///c9n//3HZ//9x2f//b9f//3Lb//924v//eOT//3Pc//9v1///c9j//3XZ
//912f//etz//3zf//+C4///gd///3/c//981v//abv1wUx2k082NjYhQEBAETMzMwX///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wEAAAADLVhtD2G56HVoxvvZbMj//2rG//9oxv//ZcT//2LB//9fv///Xb3//2HA//9hv///YsD//2LA
//9iv///Yb7//2TA//9gvf//Y7///2XB//9oxP//bsj//23F//tkte/DSH2kWQkJCR0AAAAPAAAABf//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wEAAAADAAAAB1WizD1iteyTZ77302rE//9qxP//Z8H//2fB
//9kwP//ZL3//2S9//9kvf//ZL3//2S9//9nwP//Z7///2rB//9pv/zzYrLrwVad0IEpSmIvAAAAFQAA
AA0AAAAF////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BAAAABQAA
AAk5aYkdVqDQUVup3HditeujYbTqp2W38stmufXVZbn01WKz7L1gr+epXargl1adz3dHgapJAAAAGQAA
ABEAAAANAAAABwAAAAP///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////AQAAAAMAAAAFAAAABwAAAAkAAAALAAAADQAAAA8AAAANAAAADQAA
AAsAAAAJAAAABwAAAAP///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
/wH///8B////Af///wH///8B////Af///wEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@ -0,0 +1,221 @@
<?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)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9C7FBEFC-5219-41CE-9EB3-24AC382C0A7A}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MatrixCalculator</RootNamespace>
<AssemblyName>MatrixCalculator</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\matrixcalc-logo.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release - Publish|x86'">
<OutputPath>..\..\TibisMathematicsSuite - Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<ItemGroup>
<Reference Include="MathNet.Numerics, Version=3.20.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MathNet.Numerics.3.20.2\lib\net35\MathNet.Numerics.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net20\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.106.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net20\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\TaskParallelLibrary.1.0.2856.0\lib\Net35\System.Threading.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CsvParser.cs" />
<Compile Include="Forms\Editor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Editor.Designer.cs">
<DependentUpon>Editor.cs</DependentUpon>
</Compile>
<Compile Include="Helpers\GridViewHelper.cs" />
<Compile Include="Forms\ImportCsvWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ImportCsvWindow.Designer.cs">
<DependentUpon>ImportCsvWindow.cs</DependentUpon>
</Compile>
<Compile Include="Forms\ImportWorksheetWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ImportWorksheetWindow.Designer.cs">
<DependentUpon>ImportWorksheetWindow.cs</DependentUpon>
</Compile>
<Compile Include="Helpers\MyDouble.cs" />
<Compile Include="MainWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainWindow.Designer.cs">
<DependentUpon>MainWindow.cs</DependentUpon>
</Compile>
<Compile Include="Helpers\MatrixConverter.cs" />
<Compile Include="Forms\NumericInput.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\NumericInput.Designer.cs">
<DependentUpon>NumericInput.cs</DependentUpon>
</Compile>
<Compile Include="Helpers\MatrixHelper.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Forms\SettingsWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SettingsWindow.Designer.cs">
<DependentUpon>SettingsWindow.cs</DependentUpon>
</Compile>
<Compile Include="WorksheetFile.cs" />
<EmbeddedResource Include="Forms\Editor.resx">
<DependentUpon>Editor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\ImportCsvWindow.resx">
<DependentUpon>ImportCsvWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\ImportWorksheetWindow.resx">
<DependentUpon>ImportWorksheetWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SettingsWindow.resx">
<DependentUpon>SettingsWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainWindow.resx">
<DependentUpon>MainWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\NumericInput.resx">
<DependentUpon>NumericInput.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Launcher\DynamicLink.csproj">
<Project>{A04B247B-6A95-462B-9E07-3337A1C158F1}</Project>
<Name>Launcher</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\page_white_add.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\folder_page_white.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\page_save.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\door_out.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\table_add.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\table_edit.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\table_delete.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\page_white_copy.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\page_white_paste.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\help.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Gnome-Edit-Clear-16.png" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\matrixcalc-logo.ico" />
<Content Include="Resources\matrixcalc-logo-2.ico" />
<None Include="Resources\wrench_orange.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.106.0\build\net20\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net20\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.106.0\build\net20\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.106.0\build\net20\System.Data.SQLite.Core.targets'))" />
</Target>
<!-- 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,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace MatrixCalculator
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainWindow());
}
}
}

View File

@ -0,0 +1,36 @@
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("Matrix Calculator")]
[assembly: AssemblyDescription("Performs various calculations with matrices.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Tibi Software")]
[assembly: AssemblyProduct("Tibi's Mathematics Suite")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[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("940536d9-62a8-488d-a640-2a7440966996")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,174 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.261
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MatrixCalculator.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("MatrixCalculator.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;
}
}
/// <summary>
/// Looks up a localized string similar to Comma Separated Values file|*.csv;*.txt|All files|*.*.
/// </summary>
internal static string CsvFormatFilter {
get {
return ResourceManager.GetString("CsvFormatFilter", resourceCulture);
}
}
internal static System.Drawing.Bitmap door_out {
get {
object obj = ResourceManager.GetObject("door_out", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap folder_page_white {
get {
object obj = ResourceManager.GetObject("folder_page_white", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Gnome_Edit_Clear_16 {
get {
object obj = ResourceManager.GetObject("Gnome-Edit-Clear-16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap help {
get {
object obj = ResourceManager.GetObject("help", 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 page_white_add {
get {
object obj = ResourceManager.GetObject("page_white_add", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap page_white_copy {
get {
object obj = ResourceManager.GetObject("page_white_copy", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap page_white_paste {
get {
object obj = ResourceManager.GetObject("page_white_paste", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap table_add {
get {
object obj = ResourceManager.GetObject("table_add", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap table_delete {
get {
object obj = ResourceManager.GetObject("table_delete", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap table_edit {
get {
object obj = ResourceManager.GetObject("table_edit", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to mxs.
/// </summary>
internal static string WorksheetFormat {
get {
return ResourceManager.GetString("WorksheetFormat", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Matrix calculator worksheets|*.mxs|All files|*.*.
/// </summary>
internal static string WorksheetFormatFilter {
get {
return ResourceManager.GetString("WorksheetFormatFilter", resourceCulture);
}
}
internal static System.Drawing.Bitmap wrench_orange {
get {
object obj = ResourceManager.GetObject("wrench_orange", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -0,0 +1,166 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="table_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\table_add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_page_white" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\folder_page_white.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_white_copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_white_copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="table_edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\table_edit.png;System.Drawing.Bitmap, System.Drawing, Version=2.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=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_white_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_white_add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_white_paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_white_paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="door_out" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\door_out.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="table_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\table_delete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Gnome-Edit-Clear-16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Gnome-Edit-Clear-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wrench_orange" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wrench_orange.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WorksheetFormat" xml:space="preserve">
<value>mxs</value>
</data>
<data name="WorksheetFormatFilter" xml:space="preserve">
<value>Matrix calculator worksheets|*.mxs|All files|*.*</value>
</data>
<data name="CsvFormatFilter" xml:space="preserve">
<value>Comma Separated Values file|*.csv;*.txt|All files|*.*</value>
</data>
</root>

View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.261
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MatrixCalculator.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;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("3")]
public int DoublePrecision {
get {
return ((int)(this["DoublePrecision"]));
}
set {
this["DoublePrecision"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool NumberResultAsMatrix {
get {
return ((bool)(this["NumberResultAsMatrix"]));
}
set {
this["NumberResultAsMatrix"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(",;")]
public string InternalCsvSeparators {
get {
return ((string)(this["InternalCsvSeparators"]));
}
set {
this["InternalCsvSeparators"] = value;
}
}
}
}

View File

@ -0,0 +1,15 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="MatrixCalculator.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="DoublePrecision" Type="System.Int32" Scope="User">
<Value Profile="(Default)">3</Value>
</Setting>
<Setting Name="NumberResultAsMatrix" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="InternalCsvSeparators" Type="System.String" Scope="User">
<Value Profile="(Default)">,;</Value>
</Setting>
</Settings>
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

View File

@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SQLite;
namespace MatrixCalculator
{
class WorksheetFile
{
private string filename = "";
private Queue<SQLiteCommand> queue = new Queue<SQLiteCommand>();
public string FileName
{
get { return filename; }
set { filename = value; }
}
/// <summary>
/// Creates a new worksheet that will be destroyed at exit
/// </summary>
public WorksheetFile()
{
queue.Enqueue(new SQLiteCommand("CREATE TABLE matrices (name TEXT PRIMARY KEY, description TEXT, csv TEXT)"));
}
/// <summary>
/// Opens an existing worksheet
/// </summary>
public WorksheetFile(string filename)
{
this.filename = filename;
if (!System.IO.File.Exists(filename)) throw new Exception("Could not open file.");
}
public bool IsQueueEmpty {
get {
if (queue.Count == 1 && queue.Peek().CommandText.StartsWith("CREATE TABLE matrices")) return true;
return queue.Count == 0;
}
}
public void Save()
{
System.Diagnostics.Debug.Assert(filename != "");
// Open database
SQLiteConnection connection = new SQLiteConnection("Data Source=" + filename + ";Version=3");
connection.Open();
// Write changes
while (queue.Count > 0)
{
var cmd = queue.Dequeue();
cmd.Connection = connection;
cmd.ExecuteNonQuery();
cmd.Dispose();
}
// Done
connection.Close();
connection.Dispose();
}
public void SaveAs(string new_file)
{
// Copy old file
if (System.IO.File.Exists(filename))
System.IO.File.Copy(filename, new_file, true);
filename = new_file;
// Save file
Save();
}
public DataTable Read()
{
if (!System.IO.File.Exists(filename)) throw new Exception("File not found.");
// Open connection
SQLiteConnection connection = new SQLiteConnection("Data Source=" + filename + ";Version=3;");
connection.Open();
// Set up command
SQLiteCommand command = connection.CreateCommand();
command.CommandText = "SELECT * FROM matrices";
// Read data
SQLiteDataReader reader = command.ExecuteReader();
// Load in table
DataTable table = new DataTable();
table.Load(reader);
// Cleanup
reader.Close();
reader.Dispose();
command.Dispose();
connection.Close();
connection.Dispose();
return table;
}
public void AddMatrix(string name, string csv, string description = "")
{
SQLiteCommand cmd = new SQLiteCommand("INSERT INTO matrices VALUES (@name, @desc, @csv)");
cmd.Parameters.AddWithValue("@name", name);
cmd.Parameters.AddWithValue("@desc", description);
cmd.Parameters.AddWithValue("@csv", csv);
queue.Enqueue(cmd);
}
public void DeleteMatrix(string name)
{
SQLiteCommand cmd = new SQLiteCommand("DELETE FROM matrices WHERE name=@name");
cmd.Parameters.AddWithValue("@name", name);
queue.Enqueue(cmd);
}
public void ModifyMatrix(string old_name, string new_name, string csv, string description = "")
{
SQLiteCommand cmd = new SQLiteCommand("UPDATE matrices SET name=@newname, description=@desc, csv=@csv WHERE name=@oldname");
cmd.Parameters.AddWithValue("@oldname", old_name);
cmd.Parameters.AddWithValue("@newname", new_name);
cmd.Parameters.AddWithValue("@desc", description);
cmd.Parameters.AddWithValue("@csv", csv);
queue.Enqueue(cmd);
}
}
}

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="MatrixCalculator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<MatrixCalculator.Properties.Settings>
<setting name="DoublePrecision" serializeAs="String">
<value>3</value>
</setting>
<setting name="NumberResultAsMatrix" serializeAs="String">
<value>True</value>
</setting>
<setting name="InternalCsvSeparators" serializeAs="String">
<value>,;</value>
</setting>
</MatrixCalculator.Properties.Settings>
</userSettings>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data></configuration>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MathNet.Numerics" version="3.20.2" targetFramework="net35" />
<package id="System.Data.SQLite" version="1.0.106.0" targetFramework="net35" />
<package id="System.Data.SQLite.Core" version="1.0.106.0" targetFramework="net35" />
<package id="System.Data.SQLite.Linq" version="1.0.106.0" targetFramework="net35" />
<package id="TaskParallelLibrary" version="1.0.2856.0" targetFramework="net35" />
</packages>