예제 #1
0
        protected override bool OnInitialize(string dir)
        {
            mTimer = new Timer();
            int interval = 0;

            if (!int.TryParse(ConfigFile.ReadConfigAndCreate("AdConfig", "SwitchInterval"), out interval))
            {
                interval = 5;
            }
            mTimer.Interval = interval * 1000;
            mTimer.Tick    += new EventHandler(tmr_Tick);
            mPictures.Clear();
            getAllPicture(dir);
            if (mPictures.Count == 0)
            {
                return(false);
            }
            else
            {
                pictureBox1.Load(mPictures[currpicture]);
                mTimer.Start();
                return(true);
            }
        }
예제 #2
0
 protected string ReadIniFile(string key)
 {
     return(ConfigFile.ReadConfigAndCreate(mSectionName, key));
 }
예제 #3
0
파일: AdManager.cs 프로젝트: lijint/DHRQ
 private static string ReadIniFile(string key)
 {
     return(ConfigFile.ReadConfigAndCreate("AdConfig", key));
 }