Pdf работает
This commit is contained in:
parent
c65bcbb792
commit
9de3a512ef
4
WinFormsProject/AppView/FormMain.Designer.cs
generated
4
WinFormsProject/AppView/FormMain.Designer.cs
generated
@ -39,6 +39,7 @@
|
|||||||
this.сформироватьPdfToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.сформироватьPdfToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.сформироватьExcelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.сформироватьExcelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.documentWithImage1 = new WinFormsLibrary.DocumentWithImage(this.components);
|
this.documentWithImage1 = new WinFormsLibrary.DocumentWithImage(this.components);
|
||||||
|
this.table2column1 = new WinFormsLibrary.Table2column(this.components);
|
||||||
this.contextMenuStrip1.SuspendLayout();
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
@ -62,7 +63,7 @@
|
|||||||
this.сформироватьPdfToolStripMenuItem,
|
this.сформироватьPdfToolStripMenuItem,
|
||||||
this.сформироватьExcelToolStripMenuItem});
|
this.сформироватьExcelToolStripMenuItem});
|
||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(205, 180);
|
this.contextMenuStrip1.Size = new System.Drawing.Size(205, 158);
|
||||||
//
|
//
|
||||||
// создатьToolStripMenuItem
|
// создатьToolStripMenuItem
|
||||||
//
|
//
|
||||||
@ -138,5 +139,6 @@
|
|||||||
private ToolStripMenuItem сформироватьPdfToolStripMenuItem;
|
private ToolStripMenuItem сформироватьPdfToolStripMenuItem;
|
||||||
private ToolStripMenuItem сформироватьExcelToolStripMenuItem;
|
private ToolStripMenuItem сформироватьExcelToolStripMenuItem;
|
||||||
private WinFormsLibrary.DocumentWithImage documentWithImage1;
|
private WinFormsLibrary.DocumentWithImage documentWithImage1;
|
||||||
|
private WinFormsLibrary.Table2column table2column1;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -148,7 +148,40 @@ namespace AppView
|
|||||||
|
|
||||||
private void ñôîðìèðîâàòüPdfToolStripMenuItem_Click(object sender, EventArgs e)
|
private void ñôîðìèðîâàòüPdfToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
|
||||||
|
string fileName = "";
|
||||||
|
using (var dialog = new SaveFileDialog { Filter = "pdf|*.pdf" })
|
||||||
|
{
|
||||||
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
fileName = dialog.FileName.ToString();
|
||||||
|
MessageBox.Show("Âûïîëíåíî", "Óñïåõ", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<ColumnDefinition> columnDefinitionsUp = new List<ColumnDefinition> {
|
||||||
|
new ColumnDefinition{Header = "#", PropertyName = "Id", Weight = 30},
|
||||||
|
new ColumnDefinition{Header = "Èíôîðìàöèÿ", PropertyName = "NumberType", Weight = 30},
|
||||||
|
new ColumnDefinition{Header = "", PropertyName = "NumberType", Weight = 30},
|
||||||
|
new ColumnDefinition{Header = "Íîìåð òåëåôîíà", PropertyName = "Number", Weight = 30},
|
||||||
|
};
|
||||||
|
List<ColumnDefinition> columnDefinitionsDown = new List<ColumnDefinition> {
|
||||||
|
new ColumnDefinition{Header = "#", PropertyName = "Id", Weight = 30},
|
||||||
|
new ColumnDefinition{Header = "Íàçâàíèå", PropertyName = "Name", Weight = 30},
|
||||||
|
new ColumnDefinition{Header = "Òèï èçäåëèÿ", PropertyName = "Type", Weight = 30},
|
||||||
|
new ColumnDefinition{Header = "-", PropertyName = "Number", Weight = 30},
|
||||||
|
};
|
||||||
|
|
||||||
|
var orders = _providerStorage.GetFullList();
|
||||||
|
|
||||||
|
List<int[]> mergedColums = new() { new int[] { 1, 2 } };
|
||||||
|
|
||||||
|
BigTable<ProviderViewModel> info = new(fileName, "Table", columnDefinitionsUp, columnDefinitionsDown, orders, mergedColums);
|
||||||
|
|
||||||
|
table2column1.CreateTable(info);
|
||||||
|
MessageBox.Show("Ãîòîâî");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -63,4 +63,7 @@
|
|||||||
<metadata name="documentWithImage1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="documentWithImage1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>172, 17</value>
|
<value>172, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="table2column1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>345, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user