Beispiel #1
0
        private void c1Button1_Click(object sender, EventArgs e)
        {
            //print preview gauge
            C1PrintPreviewDialog dlg = new C1PrintPreviewDialog();

            dlg.Text = "C1PrintPreview";
            C1PrintDocument doc = new C1PrintDocument();

            doc.StartDoc();
            doc.AllowNonReflowableDocs            = true;
            doc.PageLayout.PageSettings.Landscape = true;
            string date = (weatherData1.Current as DataRowView)["year"].ToString();

            doc.RenderBlockText("Weather Statistics on " + date);
            doc.RenderBlockImage(c1Gauge1.GetImage());
            doc.EndDoc();
            dlg.Document = doc;
            dlg.Show(this.ParentForm);
        }