รับรูปแบบไฟล์ของการพรีเซนเทชัน
Contents
[
Hide
]
เพื่อรับรูปแบบไฟล์ โปรดทำตามขั้นตอนด้านล่าง:
- สร้างอินสแตนซ์ของคลาส IPresentationInfo
- รับข้อมูลเกี่ยวกับการพรีเซนเทชัน
ในตัวอย่างที่ให้ด้านล่าง เราได้รับรูปแบบไฟล์แล้ว.
ตัวอย่าง
string FilePath = @"..\..\..\Sample Files\";
string FileName = FilePath + "Getting the format of a file.pptx";
IPresentationInfo info;
info = PresentationFactory.Instance.GetPresentationInfo(FileName);
switch (info.LoadFormat)
{
case LoadFormat.Pptx:
{
break;
}
case LoadFormat.Unknown:
{
break;
}
}