Example #1
0
        private void buttonPreview_Click(object sender, EventArgs e)
        {
            if (System.IO.File.Exists(this.textBoxXMLInfoFile.Text))
            {
                string XmlInfoFile = textBoxXMLInfoFile.Text;

                Serializer    ser    = new Serializer();
                GeneralObject genObj = Utils.getHouseInfo(XmlInfoFile);

                string imagePath = @"\\dsk2.picompany.ru\project\CAD_Settings\Revit_server\13. Settings\02_RoomManager\00_PNG_ПИК1";

                string ExcelDataPath = @"C:\Users\fazleevaa\Desktop\БД_Параметрические данные квартир ПИК1.xlsx";

                ImageCombiner ic = new ImageCombiner(genObj, ExcelDataPath, imagePath, 72);

                Bitmap previewImage = ic.generateGeneralObject();

                pictureBoxPreview.Image = previewImage;

                this.Height = 500;
            }
            else
            {
                MessageBox.Show("Проверьте задание пути файла XML", "Ошибка");
            }
        }
Example #2
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (System.IO.File.Exists(this.textBoxXMLInfoFile.Text))
            {
                string XmlInfoFile = this.textBoxXMLInfoFile.Text;

                // string imagePath = @"C:\Users\fazleevaa\Desktop\Новая папка\";

                // string imageOutputPath = imagePath + @"Тесты\";



                string imageOutputPath = Path.GetDirectoryName(XmlInfoFile) + "\\" + Path.GetFileNameWithoutExtension(XmlInfoFile) + "\\";

                string imagePath = @"\\dsk2.picompany.ru\project\CAD_Settings\Revit_server\13. Settings\02_RoomManager\00_PNG_ПИК1";



                string ExcelDataPath = @"C:\Users\fazleevaa\Desktop\БД_Параметрические данные квартир ПИК1.xlsx";

                ImageCombiner ic = new ImageCombiner(XmlInfoFile, ExcelDataPath, imagePath, 72);
                //ic.CombineImages(imageOutputPath);
                ic.generateGeneralObject(imageOutputPath);
                MessageBox.Show("Генерация изображений завершена");
            }
            else
            {
                MessageBox.Show("Проверьте задание пути файла XML", "Ошибка");
            }
        }