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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 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 private List<IUserControlPlugin> userplugins;
17
18 public List<IUserControlPlugin> UserPlugins
19 {
20 get { return userplugins; }
21 set { userplugins = value; }
22 }
23
24 public FloatingUserControlDock()
25 {
26 InitializeComponent();
27 this.UserPlugins = new List<IUserControlPlugin>();
28 }
29
30 //protected FloatingUserControlDock(List<IUserControlPlugin> plugins) : this()
31 //{
32 // this.UserPlugins = plugins;
33 //}
34
35 private void FloatingUserControlDock_Shown(object sender, EventArgs e)
36 {
37 foreach (var plugin in this.UserPlugins)
38 {
39 plugin.Show(this.dpanel);
40 }
41 }
42
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 }
51 }

  ViewVC Help
Powered by ViewVC 1.1.22