示例#1
0
        void OnMenuItemExportClick(object sender, EventArgs e)
        {
            var saveWindow = new SaveFileDialog
            {
                FileName = $"Personal Activity Monitor ({DateTime.Now.ToShortDateString()}).xml",
                Filter   = "Xml file (.xml)|*.xml"
            };

            //saveWindow.FileName = "pamResult.xml";

            if (saveWindow.ShowDialog() != true)
            {
                return;
            }
            var exporter = new DataExporter(monitor.Data);

            exporter.SaveToXml(saveWindow.OpenFile());
        }