Пример #1
0
        public void setDocumentPath(object sender, RoutedEventArgs e)
        {
            DocumentsWindow window = new DocumentsWindow("Zapisz szablon wyrysu i wypisu", "document");

            window.FormClosed += new FormClosedEventHandler(this.Form1_Closing);
            window.Show();
        }
Пример #2
0
        public void setCertificatePath(object sender, RoutedEventArgs e)
        {
            DocumentsWindow window = new DocumentsWindow("Zapisz szablon zaświadczenia", "certificate");

            window.FormClosed += new FormClosedEventHandler(this.Form1_Closing);
            window.Show();
        }
Пример #3
0
        private void Form1_Closing(object sender, FormClosedEventArgs e)
        {
            DocumentsWindow form   = (DocumentsWindow)sender;
            FileStream      stream = File.Open(form.doc + ".rtf", FileMode.OpenOrCreate);

            stream.Write(Encoding.ASCII.GetBytes(form.documentTextBox.Rtf), 0, form.documentTextBox.Rtf.Length);
            stream.Close();
            FileStream footerStream = File.Open(form.doc + "Footer.rtf", FileMode.OpenOrCreate);

            footerStream.Write(Encoding.ASCII.GetBytes(form.footerTextBox.Rtf), 0, form.footerTextBox.Rtf.Length);
            footerStream.Close();
        }