From: <ste...@us...> - 2011-02-15 15:54:10
|
Revision: 4115 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4115&view=rev Author: steve44src Date: 2011-02-15 15:54:04 +0000 (Tue, 15 Feb 2011) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs Modified: trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs =================================================================== --- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-15 15:48:50 UTC (rev 4114) +++ trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-15 15:54:04 UTC (rev 4115) @@ -90,6 +90,12 @@ { if( scannedPage ) { IPSWindowManager.getIPSWindowManager().getMsgListener().register(this); + // refresh everything that has an observer + foreach( int i in observers.Keys ) { + foreach( Observer o in observers[i] ) { + o.OnUpdateVar(i); + } + } return; } Log.Debug( "scanning controls"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-02-15 16:04:42
|
Revision: 4116 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4116&view=rev Author: steve44src Date: 2011-02-15 16:04:36 +0000 (Tue, 15 Feb 2011) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs Modified: trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs =================================================================== --- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-15 15:54:04 UTC (rev 4115) +++ trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-15 16:04:36 UTC (rev 4116) @@ -59,8 +59,6 @@ return r; } - HashMap<int, List<Observer>> observers = new HashMap<int, List<Observer>>(); - public List<Observer> getObservers(int id) { List<Observer> res = observers[id]; return res; @@ -77,8 +75,9 @@ observer.OnUpdateVar(id); // initial state } + HashMap<int, List<Observer>> observers = new HashMap<int, List<Observer>>(); + HashMap<int, ClickHandler> buttons = new HashMap<int, ClickHandler>(); - HashMap<int, ClickHandler> buttons = new HashMap<int, ClickHandler>(); bool scannedPage = false; protected void unregisterEventHandler() { @@ -98,6 +97,10 @@ } return; } + // clear maps + foreach( int i in observers.Keys ) observers.Remove(i); + foreach( int i in buttons.Keys ) buttons.Remove(i); + Log.Debug( "scanning controls"); foreach (GUIControl control in this.Children) { @@ -199,7 +202,7 @@ Log.Error("caught unexpected exception, while scanning control {0} {1}", control.GetID, e ); } }//for - scannedPage = true; + //scannedPage = true; IPSWindowManager.getIPSWindowManager().getMsgListener().register(this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-02-15 16:07:36
|
Revision: 4117 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4117&view=rev Author: steve44src Date: 2011-02-15 16:07:30 +0000 (Tue, 15 Feb 2011) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs Modified: trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs =================================================================== --- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-15 16:04:36 UTC (rev 4116) +++ trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-15 16:07:30 UTC (rev 4117) @@ -15,7 +15,7 @@ using MediaPortal.GUI.Pictures; using MediaPortal.Util; using MediaPortal.Configuration; -using GCollections; +//using GCollections; namespace MP4IPSymcon { @@ -75,8 +75,8 @@ observer.OnUpdateVar(id); // initial state } - HashMap<int, List<Observer>> observers = new HashMap<int, List<Observer>>(); - HashMap<int, ClickHandler> buttons = new HashMap<int, ClickHandler>(); + Dictionary<int, List<Observer>> observers = new Dictionary<int, List<Observer>>(); + Dictionary<int, ClickHandler> buttons = new Dictionary<int, ClickHandler>(); bool scannedPage = false; @@ -98,8 +98,8 @@ return; } // clear maps - foreach( int i in observers.Keys ) observers.Remove(i); - foreach( int i in buttons.Keys ) buttons.Remove(i); + observers.Clear(); + buttons.Clear(); Log.Debug( "scanning controls"); foreach (GUIControl control in this.Children) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-02-15 16:11:37
|
Revision: 4118 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4118&view=rev Author: steve44src Date: 2011-02-15 16:11:30 +0000 (Tue, 15 Feb 2011) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs Modified: trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs =================================================================== --- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-15 16:07:30 UTC (rev 4117) +++ trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-15 16:11:30 UTC (rev 4118) @@ -67,7 +67,7 @@ protected void registerObserver(int id, Observer observer) { Log.Debug("Register Observer for {0}", id ); - if (observers[id] == null) + if(!observers.ContainsKey(id) ) { observers[id] = new List<Observer>(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-02-17 12:22:30
|
Revision: 4125 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4125&view=rev Author: steve44src Date: 2011-02-17 12:22:24 +0000 (Thu, 17 Feb 2011) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs Modified: trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs =================================================================== --- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-17 12:22:00 UTC (rev 4124) +++ trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-17 12:22:24 UTC (rev 4125) @@ -77,9 +77,20 @@ Dictionary<int, List<Observer>> observers = new Dictionary<int, List<Observer>>(); Dictionary<int, ClickHandler> buttons = new Dictionary<int, ClickHandler>(); + Dictionary<int, GUIGroup> groups = new Dictionary<int, GUIGroup>(); bool scannedPage = false; + public void showGroup( int idToShow ) { + foreach( int id in groups.Keys ) { + if( id != idToShow ) { + groups[id].Visible = false; + } else { + groups[id].Visible = true; + } + } + } + protected void unregisterEventHandler() { IPSWindowManager.getIPSWindowManager().getMsgListener().unregister(this); } @@ -156,6 +167,9 @@ control.Disabled = true; } } + else if (cmd[0] == "SHOWGROUP") { + buttons.Add( control.GetID, new GroupClickHandler( oid, this )); + } else { int switchcmd = 0; // toggle default @@ -191,6 +205,8 @@ } else if( control.Type == "spincontrol" || control.Type == "selectbutton" ) { buttons.Add(control.GetID, new SpinControl(oid,control,fmt,GetID) ); + } else if( control.Type == "group" ) { + groups.Add( control.GetID, (GUIGroup)control ); } } catch ( Exception e ) { Log.Error("caught unexpected exception, while scanning control {0} {1}", control.GetID, e ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-02-17 12:40:14
|
Revision: 4126 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4126&view=rev Author: steve44src Date: 2011-02-17 12:40:08 +0000 (Thu, 17 Feb 2011) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs Modified: trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs =================================================================== --- trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-17 12:22:24 UTC (rev 4125) +++ trunk/plugins/MP4IPSymcon/MP4IPSymcon/IPSWindow.cs 2011-02-17 12:40:08 UTC (rev 4126) @@ -58,6 +58,7 @@ Log.Debug("IPSWindow::Init loading skin {0}, success {1}", this.skin, r ); return r; } + public List<Observer> getObservers(int id) { List<Observer> res = observers[id]; @@ -84,13 +85,22 @@ public void showGroup( int idToShow ) { foreach( int id in groups.Keys ) { if( id != idToShow ) { - groups[id].Visible = false; + setVisibility( groups[id], false ); } else { - groups[id].Visible = true; + setVisibility( groups[id], true ); } } } + protected void setVisibility( GUIGroup group, bool visible ) { + foreach( GUIControl c in group.Children ) { + c.Visible = visible; + if( c is GUIGroup ) { + setVisibility( (GUIGroup) c, visible ); + } + } + } + protected void unregisterEventHandler() { IPSWindowManager.getIPSWindowManager().getMsgListener().unregister(this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |