示例#1
0
        public static void Snapshot(GpsFileFormat format, string videoFileName, TimeSpan position, UIElement element)
        {
            string fileName = @"C:\Temp\Screenshot.png";

            if (File.Exists(videoFileName))
            {
                fileName = DashCamFileInfo.GetScreenshotFileName(format, videoFileName);
            }

            fileName = string.Format("{0}_at{1}.png", fileName, position.ToString("hh\\.mm\\.ss"));
            UIElementToPng(element, fileName);
            Process.Start(fileName);
        }
示例#2
0
        public static void Screenshot(GpsFileFormat format, string videoFileName, TimeSpan position, Window mainWindow)
        {
            string fileName = @"C:\Temp\Screenshot.png";

            if (File.Exists(videoFileName))
            {
                fileName = DashCamFileInfo.GetScreenshotFileName(format, videoFileName);
            }

            fileName = string.Format("{0}_at{1}.png", fileName, position.ToString("hh\\.mm\\.ss"));
            SaveWindowScreenshotToFile(mainWindow, fileName);
            Process.Start(fileName);
        }