Example #1
0
        private void английскийToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var applicationWord = new Microsoft.Office.Interop.Word.Application();

            applicationWord.Visible = true;
            string      fileName  = rGF.GetFileName();
            List <bool> languages = rGF.GetLanguages();

            string[] file     = fileName.Split('.');
            Document document = applicationWord.Documents.Open(file[0] + "_eng." + file[1]);

            //document.LoadFromFile("test.doct");
            //Application.Documents.Open(@"C:\Test\NewDocument.docx");
        }
Example #2
0
        private void генерацияОтчетаToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportGenForm rGF = new ReportGenForm();

            if (rGF.ShowDialog() == DialogResult.OK)
            {
                string      fileName  = rGF.GetFileName();
                List <bool> languages = rGF.GetLanguages();
                string[]    file      = fileName.Split('.');
                for (int i = 0; i < 3; i++)
                {
                    if (languages[i] == true)
                    {
                        switch (i)
                        {
                        case 0: serverInfoLst[0].ToReport(file[0] + "_eng." + file[1], i); break;

                        case 1: serverInfoLst[0].ToReport(file[0] + "_ua." + file[1], i); break;

                        case 2: serverInfoLst[0].ToReport(file[0] + "_rus." + file[1], i); break;
                        }
                    }
                }
            }
        }