home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Products
TV-Server
MP-TvViewer 0.3 - Watch TV on your desktop (2010-01-30)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="CodeMonkey" data-source="post: 632247" data-attributes="member: 10548"><p>Nice little client!</p><p></p><p>There is a problem with the source though, it won't build the TvViewerSetupCore project because it is referencing some gfx (icons etc) files located in your local c:\media directory <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>I have some code change suggestions as well. I was trying to run it at work with no MP installed anywhere so these are almost all error handling changes.</p><p></p><p>In ServerStatusForm.Designer.cs</p><p></p><p>from:</p><p>[code]this.timerRefreshStatus.Interval = 1000;[/code]</p><p></p><p>to:</p><p>[code]this.timerRefreshStatus.Interval = 10000;[/code]</p><p></p><p>The 1 second refresh is a little harsh on the system if you are supposed to be a lightweight client <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p>In ServerStatusForm.cs timerRefreshStatus_Tick():</p><p>Change the exception handling to:</p><p>[code] timerRefreshStatus.Stop();</p><p> MessageBox.Show("Error retrieving server states, maybe connection down. Exception: " + ex.Message);[/code]</p><p></p><p>No point keeping the timer going (particularly at once a second like it was <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> ) if there is no web service to talk to, is there?</p><p></p><p></p><p>In SchedulesForm.cs constructor:</p><p>add a try/catch:</p><p></p><p>[code] public SchedulesForm(ServiceInterface _server)</p><p> {</p><p> InitializeComponent();</p><p> m_server = _server;</p><p> try</p><p> {</p><p> WebSchedule[] schedules = m_server.GetAllSchedules();</p><p> FillScheduleListView(schedules);</p><p> }</p><p> catch (Exception ex)</p><p> {</p><p> MessageBox.Show("Error retrieving schedules, maybe connection down. Exception: " + ex.Message);</p><p> }</p><p> }[/code]</p><p></p><p></p><p>in MainForm.cs</p><p>Add some error handling in ShowTvGuide()</p><p>[code] private void ShowTvGuide()</p><p> {</p><p> int index = m_showAllGroup ? cbGroups.SelectedIndex : cbGroups.SelectedIndex + 1;</p><p> if (m_groups != null)</p><p> {</p><p> WebChannelGroup selectedChannel = m_groups[index];</p><p> EpgForm frmEpg = new EpgForm(m_server, selectedChannel);</p><p> frmEpg.Show();</p><p> }</p><p> else</p><p> {</p><p> MessageBox.Show("Error attempting to show EPG. Check your configuration.");</p><p> }</p><p> }[/code]</p><p></p><p>That's it, nice little client from the looks of it!</p></blockquote><p></p>
[QUOTE="CodeMonkey, post: 632247, member: 10548"] Nice little client! There is a problem with the source though, it won't build the TvViewerSetupCore project because it is referencing some gfx (icons etc) files located in your local c:\media directory :) I have some code change suggestions as well. I was trying to run it at work with no MP installed anywhere so these are almost all error handling changes. In ServerStatusForm.Designer.cs from: [code]this.timerRefreshStatus.Interval = 1000;[/code] to: [code]this.timerRefreshStatus.Interval = 10000;[/code] The 1 second refresh is a little harsh on the system if you are supposed to be a lightweight client :) In ServerStatusForm.cs timerRefreshStatus_Tick(): Change the exception handling to: [code] timerRefreshStatus.Stop(); MessageBox.Show("Error retrieving server states, maybe connection down. Exception: " + ex.Message);[/code] No point keeping the timer going (particularly at once a second like it was :) ) if there is no web service to talk to, is there? In SchedulesForm.cs constructor: add a try/catch: [code] public SchedulesForm(ServiceInterface _server) { InitializeComponent(); m_server = _server; try { WebSchedule[] schedules = m_server.GetAllSchedules(); FillScheduleListView(schedules); } catch (Exception ex) { MessageBox.Show("Error retrieving schedules, maybe connection down. Exception: " + ex.Message); } }[/code] in MainForm.cs Add some error handling in ShowTvGuide() [code] private void ShowTvGuide() { int index = m_showAllGroup ? cbGroups.SelectedIndex : cbGroups.SelectedIndex + 1; if (m_groups != null) { WebChannelGroup selectedChannel = m_groups[index]; EpgForm frmEpg = new EpgForm(m_server, selectedChannel); frmEpg.Show(); } else { MessageBox.Show("Error attempting to show EPG. Check your configuration."); } }[/code] That's it, nice little client from the looks of it! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
TV-Server
MP-TvViewer 0.3 - Watch TV on your desktop (2010-01-30)
Contact us
RSS
Top
Bottom