Exemple #1
0
        private void exportToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (p_mode == 0)
            {
                FrameMain.SaveContentPlain(m_calendar);
            }
            else if (p_mode == 2)
            {
                SaveFileDialog sfd = new SaveFileDialog();

                string dir;
                string locationFileName = calLocation.GetNameAsFileName();
                sfd.Filter   = "PNG image - current month (*.png)|*.png|HTML pages - whole year (*.html)|*.html";
                sfd.FileName = locationFileName;

                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    dir = Path.GetDirectoryName(sfd.FileName);
                    switch (sfd.FilterIndex)
                    {
                    case 1:
                        CalendarTableDrawer.ExportPng(calLocation, dir, locationFileName, calendarTableView1.CurrentYear, calendarTableView1.CurrentMonth);
                        break;

                    case 2:
                        CalendarTableDrawer.ExportPngYear(calLocation, dir, locationFileName, calendarTableView1.CurrentYear);
                        break;
                    }
                }
            }
        }
Exemple #2
0
 private void exportToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     FrameMain.SaveContentPlain(m_today);
 }