示例#1
0
        private void ExportGraphs(ArchiveExportData archiveData)
        {
            DateTime finish = DateTimeAxis.ToDateTime(model.Axes[0].ActualMaximum);

            model.Axes[0].Minimum = archiveData.Start.ToOADate();
            DateTime period = archiveData.Start;

            plotter.Model.Title = lbDataBases.SelectedItem.ToString();
            for (int i = 0; true; i++)
            {
                if (i > 0)
                {
                    model.Axes[0].Minimum = period.ToOADate();
                }
                period = period.AddSeconds(archiveData.Interval);
                model.Axes[0].Maximum = period.ToOADate();
                Directory.CreateDirectory(archiveData.PathFolder + Path.DirectorySeparatorChar.ToString() + "archive");

                plotter.SaveBitmap(
                    archiveData.PathFolder +
                    Path.DirectorySeparatorChar.ToString() +
                    "archive" +
                    Path.DirectorySeparatorChar.ToString() +
                    (i.ToString() + ".png"), 1920, 1080, plotter.ActualModel.Background);
                if (period > finish)
                {
                    break;
                }
            }
            plotter.Model.Title = "";
        }
示例#2
0
 public ArchiveExporterWindow(ArchiveExportData archiveExportData)
 {
     InitializeComponent();
     this.archiveExportData = archiveExportData;
     tbPath.Text            = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
     dtpStart.Value         = archiveExportData.Start;
     dtpFinish.Value        = archiveExportData.Finish;
 }
示例#3
0
        private void ExportManyPic_Click(object sender, RoutedEventArgs e)
        {
            ArchiveExportData archiveData = new ArchiveExportData();

            archiveData.Start  = DateTimeAxis.ToDateTime(model.Axes[0].ActualMinimum);
            archiveData.Finish = DateTimeAxis.ToDateTime(model.Axes[0].ActualMaximum);
            ArchiveExporterWindow aew = new ArchiveExporterWindow(archiveData);

            aew.ShowDialog();
            if ((archiveData.PathFolder == null) || (archiveData.PathFolder == ""))
            {
                return;
            }
            else
            {
                ExportGraphs(archiveData);
            }
        }