| |||||||
| Development You want to code something for the TV-Server? Share it in here! |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| MP Donator ![]() Join Date: Jun 2007 Location: Berg Age: 35
Posts: 722
Thanks: 7
Thanked 60 Times in 13 Posts
Country: | Hi iam developing a new Plugin for he TV Server witch checks the next upcomings shedules and if the start time in the EPG has changed will change the schedule time too Here in switzerland/germany channels is normal that the show is not coming on the same time everyday , in this case the recording lands in the manuall folder So the plugin works well in a testform, i'm now on the final steps. But: - How to i'am using the Gentle.Config to receive the SQL Connection String? - How do i'am load/save settings from the plugin? Code:
is this correct so?
public void SettingsLoad()
{
TvBusinessLayer layer = new TvBusinessLayer();
txtPreTime.Text = layer.GetSetting("Schedules_Corrector_PreTime", "-20").Value;
txtAfterTime.Text = layer.GetSetting("Schedules_Corrector_AfterTime", "20").Value;
txtIntervall.Text = layer.GetSetting("Schedules_Corrector_Intervall", "60").Value;
}
public void SettingsSave()
{
TvBusinessLayer layer = new TvBusinessLayer();
Setting setting = layer.GetSetting("Schedules_Corrector_PreTime", "-20");
setting.Value = txtPreTime.Text;
setting.Persist();
setting = layer.GetSetting("Schedules_Corrector_AfterTime", "20");
setting.Value = txtAfterTime.Text;
setting.Persist();
setting = layer.GetSetting("Schedules_Corrector_Intervall", "60");
setting.Value = txtIntervall.Text;
setting.Persist();
}
thank you for the help, for me (my wife) is this plugin essantially... maybe for you too? MoPhat |
| | |
| | #2 (permalink) | ||
| Portal Developer Join Date: Apr 2005 Location: Osnabruck
Posts: 2,766
Thanks: 130
Thanked 133 Times in 93 Posts
Country: | Quote:
Quote:
Broce and Bavarian will be the people who know best. Technically it's the same as above. Simply persist your changed Schedule object. | ||
| | |
![]() |
| Bookmarks |
| Tags |
| defaultconnectionstring, gentleconfig, save, settings |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gentle.config file not found | BobbyG | Get Support | 1 | 2008-03-02 14:42 |
| TVService keeps overwriting database connection string in gentle.config | peely | Get Support | 1 | 2007-11-26 14:09 |
| Unable to create/modify gentle.config | phunqe | Get Support | 5 | 2007-11-03 18:43 |
| Failing to read/write gentle.config after tve3 reinstall | Maschine | pre 1.0 RC1 | 1 | 2007-10-28 14:33 |
| Same problems with save config in 0.1.0.4 | fredflintstone | General Development (no feature request here!) | 1 | 2005-01-08 12:07 |