Issue Details (XML | Word | Printable)

Key: RAD-46
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Douglas R Miles
Reporter: Mojito Sorbet
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Radegast

Need an event on window open/close

Created: 12/Oct/09 04:20 PM   Updated: 08/Nov/09 05:43 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.12

File Attachments: 1. Text File RadegastFormCreationEvent.patch (4 kB)



 Description  « Hide
My plugin needs an open/close event to detect when the smaller windows (profile, group, notecard, etc) open and close. On getting the Form reference, I may want to add menu items as well, but I think I can find that if the menubars are in a standard place.

 All   Comments   Change History   Subversion Commits   Patches      Sort Order: Ascending order - Click to sort in descending order
Douglas R Miles added a comment - 12/Oct/09 04:34 PM - edited
So here is one simple idea for RadegastForm

make these subclasses

(35,37) public partial class frmAbout : RadegastForm
    (36,43) public partial class frmDetachedTab : RadegastForm
    (37,41) public partial class frmGroupInfo : RadegastForm
    (48,36) public partial class frmMain : RadegastForm
    (38,35) public partial class frmPay : RadegastForm
    (47,44) public partial class frmPrimWorkshop : RadegastForm
    (39,39) public partial class frmProfile : RadegastForm
    (44,40) public partial class frmSettings : RadegastForm
    (39,40) public partial class frmTeleport : RadegastForm

Add event to RadegastInstnace

public  event Action<RadegastForm> RadegastFormCreated;

Adding To the base constructor of RadegastForm

if (inst.RadegastFormCreated!=null)  inst.RadegastFormCreated(this);

From there. it be up to the plugin startup

instance.RadegastFormCreated += Plug_RadegastFormCreated;
void Plug_RadegastFormCreated(RadegastForm  radForm) {
   radForm.Shown +=
   radForm.Disposing +=
 .. etc
}

What does everyone think?


Mojito Sorbet added a comment - 12/Oct/09 04:43 PM
Keeping creation separate from Showing is good. I can't accidentally add my menu actions multiple times if a Form is reused.

Douglas R Miles made changes - 08/Nov/09 05:15 AM
Field Original Value New Value
Assignee Douglas R Miles [ dmiles@users.sourceforge.net ]
Douglas R Miles made changes - 08/Nov/09 08:22 AM
Status Open [ 1 ] In Progress [ 3 ]
Douglas R Miles made changes - 08/Nov/09 08:32 AM
Attachment RadegastFormCreationEvent.patch [ 10477 ]
dmiles@users.sourceforge.net - 2009-11-08 08:32:35.0
Douglas R Miles added a comment - 08/Nov/09 05:39 PM
Fixed in r412 . Thanks Mojito

Douglas R Miles made changes - 08/Nov/09 05:39 PM
Status In Progress [ 3 ] Closed [ 6 ]
Fix Version/s 1.10 [ 10133 ]
Resolution Fixed [ 1 ]
Douglas R Miles added a comment - 08/Nov/09 05:43 PM
Oops Fixed in r442 . Thanks Mojito

Repository Revision Date User Message
Radegast #442 Sun Nov 08 20:37:28 EST 2009 logicmoo RAD-46: Need an event on window open/close
Files Changed
MODIFY /trunk/Radegast/GUI/Dialogs/Teleport.cs
MODIFY /trunk/Radegast/Core/Types/RadegastForm.cs
MODIFY /trunk/Radegast/GUI/Dialogs/Pay.cs
MODIFY /trunk/Radegast/Core/RadegastInstance.cs
MODIFY /trunk/Radegast/GUI/Dialogs/Reconnect.cs
MODIFY /trunk/Radegast/GUI/Dialogs/Settings.cs
MODIFY /trunk/Radegast/GUI/Dialogs/KeyboardShortcuts.cs
MODIFY /trunk/Radegast/GUI/Dialogs/DetachedTab.cs
MODIFY /trunk/Radegast/GUI/Dialogs/PrimWorkshop.cs

Latif Khalifa made changes - 04/Aug/10 02:42 PM
Workflow jira [ 11400 ] Radegast [ 11824 ]