/[RomCheater]/trunk/RomCheater/Docking/FloatingUserControlDock.cs
ViewVC logotype

Annotation of /trunk/RomCheater/Docking/FloatingUserControlDock.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 678 - (hide annotations) (download)
Mon Jun 17 07:01:41 2013 UTC (8 years, 3 months ago) by william
File size: 1391 byte(s)
+ add OnActived/OnDeactivated support to notify all DockedContent that the form is closing

1 william 439 using System;
2     using System.Collections.Generic;
3     using System.ComponentModel;
4     using System.Data;
5     using System.Drawing;
6     using System.Linq;
7     using System.Text;
8     using System.Windows.Forms;
9     using WeifenLuo.WinFormsUI.Docking;
10     using RomCheater.PluginFramework.Interfaces;
11    
12     namespace RomCheater.Docking
13     {
14     public partial class FloatingUserControlDock : DockContent
15     {
16 william 440 private List<IUserControlPlugin> userplugins;
17 william 639
18     public List<IUserControlPlugin> UserPlugins
19 william 439 {
20 william 639 get { return userplugins; }
21     set { userplugins = value; }
22 william 439 }
23    
24 william 639 public FloatingUserControlDock()
25 william 439 {
26 william 639 InitializeComponent();
27     this.UserPlugins = new List<IUserControlPlugin>();
28 william 439 }
29 william 440
30 william 639 //protected FloatingUserControlDock(List<IUserControlPlugin> plugins) : this()
31     //{
32     // this.UserPlugins = plugins;
33     //}
34    
35 william 440 private void FloatingUserControlDock_Shown(object sender, EventArgs e)
36     {
37 william 639 foreach (var plugin in this.UserPlugins)
38 william 440 {
39     plugin.Show(this.dpanel);
40     }
41     }
42 william 678
43     private void FloatingUserControlDock_Deactivate(object sender, EventArgs e)
44     {
45     foreach (var t in this.dpanel.Contents)
46     {
47     t.OnDeactivate(e);
48     }
49     }
50 william 439 }
51     }

  ViewVC Help
Powered by ViewVC 1.1.22