diff --git a/COP/WinFormsTest/FormTest.Designer.cs b/COP/WinFormsTest/FormTest.Designer.cs index e2f10c0..d350632 100644 --- a/COP/WinFormsTest/FormTest.Designer.cs +++ b/COP/WinFormsTest/FormTest.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.userCheckedListBox = new Components.Components.UserCheckedListBox(); this.buttonAdd = new System.Windows.Forms.Button(); this.buttonClear = new System.Windows.Forms.Button(); @@ -46,6 +47,9 @@ this.buttonExcelTable = new System.Windows.Forms.Button(); this.buttonExcelImages = new System.Windows.Forms.Button(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.excelTableComponent = new Components.LogicalComponents.ExcelTableComponent(this.components); + this.excelDiagramComponent = new Components.LogicalComponents.ExcelDiagramComponent(this.components); + this.excelImagesComponent = new Components.LogicalComponents.ExcelImagesComponent(this.components); this.SuspendLayout(); // // userCheckedListBox @@ -194,6 +198,7 @@ this.buttonExcelDiagram.TabIndex = 19; this.buttonExcelDiagram.Text = "Excel (Диаграмма)"; this.buttonExcelDiagram.UseVisualStyleBackColor = true; + this.buttonExcelDiagram.Click += new System.EventHandler(this.buttonExcelDiagram_Click); // // buttonExcelTable // @@ -203,6 +208,7 @@ this.buttonExcelTable.TabIndex = 18; this.buttonExcelTable.Text = "Excel (Таблица)"; this.buttonExcelTable.UseVisualStyleBackColor = true; + this.buttonExcelTable.Click += new System.EventHandler(this.buttonExcelTable_Click); // // buttonExcelImages // @@ -212,6 +218,7 @@ this.buttonExcelImages.TabIndex = 17; this.buttonExcelImages.Text = "Excel (картинки)"; this.buttonExcelImages.UseVisualStyleBackColor = true; + this.buttonExcelImages.Click += new System.EventHandler(this.buttonExcelImages_Click); // // openFileDialog // @@ -265,5 +272,8 @@ private Button buttonExcelTable; private Button buttonExcelImages; private OpenFileDialog openFileDialog; + private Components.LogicalComponents.ExcelTableComponent excelTableComponent; + private Components.LogicalComponents.ExcelDiagramComponent excelDiagramComponent; + private Components.LogicalComponents.ExcelImagesComponent excelImagesComponent; } } \ No newline at end of file diff --git a/COP/WinFormsTest/FormTest.cs b/COP/WinFormsTest/FormTest.cs index e37cc3b..6c36304 100644 --- a/COP/WinFormsTest/FormTest.cs +++ b/COP/WinFormsTest/FormTest.cs @@ -143,8 +143,8 @@ namespace WinFormsTest openFileDialog.Dispose(); List images = new List(); string path = AppDomain.CurrentDomain.BaseDirectory + "test.xlsx"; - //if (excelImagesComponent.createWithImages(new ExcelImageInfo(path, "Header", files))) MessageBox.Show("Успех!"); - //else MessageBox.Show("Ошибка, проверьте консоль"); + if (excelImagesComponent.createWithImages(new ExcelImageInfo(path, "Header", files))) MessageBox.Show("Успех!"); + else MessageBox.Show("Ошибка, проверьте консоль"); } private void buttonExcelTable_Click(object sender, EventArgs e) @@ -167,7 +167,7 @@ namespace WinFormsTest ("boxNumber", "Номер бокса"), ("phoneNumber", "Телефон"), ("isInVacation", "В отпуске"), }; - //if (excelTableComponent.createWithTable(path, "test2", merges, heights, headers, workers)) MessageBox.Show("Успех"); + if (excelTableComponent.createWithTable(path, "test2", merges, heights, headers, workers)) MessageBox.Show("Успех"); } private void buttonExcelDiagram_Click(object sender, EventArgs e) @@ -178,8 +178,8 @@ namespace WinFormsTest departments.Add(new Department("Dep 2", 500)); departments.Add(new Department("Dep 3", 170)); string path = AppDomain.CurrentDomain.BaseDirectory + "test3.xlsx"; - //if (excelDiagramComponent.createWithDiagram(path, "test3", "Продажи", DiagramLegendEnum.TopRight, departments, "name", "sells")) MessageBox.Show("Успех"); - //else MessageBox.Show("Fail :("); + if (excelDiagramComponent.createWithDiagram(path, "test3", "Продажи", DiagramLegendEnum.TopRight, departments, "name", "sells")) MessageBox.Show("Успех"); + else MessageBox.Show("Fail :("); } } diff --git a/COP/WinFormsTest/FormTest.resx b/COP/WinFormsTest/FormTest.resx index e6275bd..3b32ba9 100644 --- a/COP/WinFormsTest/FormTest.resx +++ b/COP/WinFormsTest/FormTest.resx @@ -60,4 +60,13 @@ 17, 17 + + 176, 17 + + + 380, 17 + + + 606, 17 + \ No newline at end of file