最近遇到了一个需求,就是记录幻灯片放映的时间,目前有个初步的想法,记录一下。后续有可能还需要修改。
int propage = 0;//前一个页面页码
DateTime before ;//前一个时间
//记录相差秒数
public double DiffSeconds(DateTime startTime, DateTime endTime)
{
TimeSpan secondSpan = new TimeSpan(endTime.Ticks - startTime.Ticks);
return secondSpan.TotalSeconds;
}
App = Globals.ThisAddIn.Application;
//幻灯片放映到下一页发生的事件
App.SlideShowNextSlide += new PowerPoint.EApplication_SlideShowNextSlideEventHandler(Application_SlideShowNextSlide);
//幻灯片放映下次单击的事件
//App.SlideShowNextClick += new PowerPoint.EApplication_SlideShowNextClickEventHandler(Application_SlideShowNextClick);
//幻灯片结束放映事件
App.SlideShowEnd += new PowerPoint.EApplication_SlideShowEndEventHandler(Application_SlideShowEnd);
List<Dictionary<string, string>> rlist = new List<Dictionary<string, string>>(