DVDClass.h
上传用户:asa1698
上传日期:2022-01-15
资源大小:8015k
文件大小:1k
- // DVDClass.h是定义类的文件
- //
- class DVDDish
- {
- public:
- int ProgressRate; //播放进度
- int Volume ; //音量
- int Dishware ; //选择碟片
- int Rate; //进度变量
- char *str;
- int pos;
- DVDDish()
- {
- ProgressRate = 0;
- Volume = 50;
- Dishware = 1;
- Rate = 100;
- }
- int Begin() // 开始放映,选择碟片,决定总进度
- {
- switch (Dishware)
- {
- case 1 : Rate = 50;
- case 2 : Rate = 60;
- case 3 : Rate = 70;
- case 4 : Rate = 80;
- case 5 : Rate = 90;
- default : Rate = 100;
- }
- return Rate;
- }
- void VolumeAdd() //增加音量
- {
- if (Volume >= 90 && Volume <=100)
- Volume = 100;
- else
- Volume = Volume + 10;
- }
- void VolumeReduce()//减小音量
- {
- if (Volume <=10 )
- Volume = 0;
- else
- Volume = Volume - 10;
- }
- void ProgressRateAdd()//进度增加
- {
- if (ProgressRate >= 90 && ProgressRate <= 100)
- ProgressRate = 100;
- else
- ProgressRate = ProgressRate + 10;
- }
- void ProgressRateReduce()
- {
- if (ProgressRate <= 90 )
- ProgressRate = 0;
- else
- ProgressRate = ProgressRate - 10;
- }
- ~DVDDish() {}
- };