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); } }
protected string ReadIniFile(string key) { return(ConfigFile.ReadConfigAndCreate(mSectionName, key)); }
private static string ReadIniFile(string key) { return(ConfigFile.ReadConfigAndCreate("AdConfig", key)); }