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
MediaPortal 1
Development
General Development (no feature request here!)
Plugin Development Question
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="hardcorehire" data-source="post: 544536" data-attributes="member: 71522"><p>Still haven't figured out how to pass button click from one class to another. Please see attachement from post 4. I want to be able to store the control id of the button that was pressed from public class MyRolodexMainMenu : GUIWindow, ISetupForm</p><p> { </p><p></p><p>protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)</p><p> { </p><p> switch (controlId)</p><p> {</p><p> case 2: <strong><span style="color: Blue">// this is the button A I need to store or pass this control id to the next class that gets loaded from this statement</span></strong></p><p> <strong><span style="color: Blue"> THIS IS WHERE I NEED CODE TO STORE THE CONTROL ID AND BE ABLE TO RETRIEVE IT FROM THE NEXT PAGE THAT GETS LOADED</span></strong> GUIWindowManager.ActivateWindow(13002); <strong><span style="color: Blue">// This is the ModifyContact class and xml file that gets loaded CAN I SEND PROPERTY WITH THIS STATEMENT???</span></strong> break;</p><p></p><p><strong><span style="color: Blue">THIS IS PART OF THE PAGE 13002 MODIFY CONTACT CLASS WHERE I WANT TO RETREIVE THE LAST BUTTON CLICEKD</span></strong></p><p></p><p>public class MyRolodexModifyContact : GUIWindow</p><p> {</p><p></p><p>public string GetScreenChoice()</p><p> {</p><p> <strong> HERE IS THE CODE I NEED TO BE ABLE TO PULL THE BUTTON THAT WAS CLICKED IN THE MAINMENU WAS IT A,B,C... SO I CAN FILL IN THE CONTACT INFORMATION PROPERLY</strong></p><p> }</p><p></p><p></p><p> Also how do you add animations in code? I set a couple buttons properties to visible when one of the buttons is clicked but I want them to slide when the button is clicked also. I tried setting the visible animation in the xml file, but when the button is set to visible in code the action doesn't happen from the xml file. That is why I would like to add animation through the code. For Example:</p><p></p><p>onclicked(...)</p><p> Switch (controlid)</p><p> case 80: // this is the btnFirstContactA_M clicked</p><p> EditFirstContactA_M.isvisible = true;</p><p> DeleteFirstContactA_M.isvisible = true;</p><p> <strong><span style="color: Blue">HERE IS WHERE I WANT TO ADD ANIMATION AND SAY ONCE THEY ARE VISIBLE HAVE THEM SLIDE FROM X POSITION TO NEW X POSITION IN TIME=500.</span></strong></p><p><strong><span style="color: Blue"></span></strong></p><p></p><p>Getting real close to having this plugin ready to go. Just need to figure out these last couple issues should be ready for Christmas. I don't know how many people would use it, but it is pretty nice to store and edit contact information into a database. Maybe I'll post some screenshots if I can get some help.</p><p></p><p>THANKS</p></blockquote><p></p>
[QUOTE="hardcorehire, post: 544536, member: 71522"] Still haven't figured out how to pass button click from one class to another. Please see attachement from post 4. I want to be able to store the control id of the button that was pressed from public class MyRolodexMainMenu : GUIWindow, ISetupForm { protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { switch (controlId) { case 2: [B][COLOR="Blue"]// this is the button A I need to store or pass this control id to the next class that gets loaded from this statement[/COLOR][/B] [B][COLOR="Blue"] THIS IS WHERE I NEED CODE TO STORE THE CONTROL ID AND BE ABLE TO RETRIEVE IT FROM THE NEXT PAGE THAT GETS LOADED[/COLOR][/B] GUIWindowManager.ActivateWindow(13002); [B][COLOR="Blue"]// This is the ModifyContact class and xml file that gets loaded CAN I SEND PROPERTY WITH THIS STATEMENT???[/COLOR][/B] break; [B][COLOR="Blue"]THIS IS PART OF THE PAGE 13002 MODIFY CONTACT CLASS WHERE I WANT TO RETREIVE THE LAST BUTTON CLICEKD[/COLOR][/B] public class MyRolodexModifyContact : GUIWindow { public string GetScreenChoice() { [B] HERE IS THE CODE I NEED TO BE ABLE TO PULL THE BUTTON THAT WAS CLICKED IN THE MAINMENU WAS IT A,B,C... SO I CAN FILL IN THE CONTACT INFORMATION PROPERLY[/B][COLOR="Blue"][/COLOR] } Also how do you add animations in code? I set a couple buttons properties to visible when one of the buttons is clicked but I want them to slide when the button is clicked also. I tried setting the visible animation in the xml file, but when the button is set to visible in code the action doesn't happen from the xml file. That is why I would like to add animation through the code. For Example: onclicked(...) Switch (controlid) case 80: // this is the btnFirstContactA_M clicked EditFirstContactA_M.isvisible = true; DeleteFirstContactA_M.isvisible = true; [B][COLOR="Blue"]HERE IS WHERE I WANT TO ADD ANIMATION AND SAY ONCE THEY ARE VISIBLE HAVE THEM SLIDE FROM X POSITION TO NEW X POSITION IN TIME=500. [/COLOR][/B] Getting real close to having this plugin ready to go. Just need to figure out these last couple issues should be ready for Christmas. I don't know how many people would use it, but it is pretty nice to store and edit contact information into a database. Maybe I'll post some screenshots if I can get some help. THANKS [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Plugin Development Question
Contact us
RSS
Top
Bottom