GUI/SensorGadget.cs
changeset 244 99f16e21cdc8
parent 243 07a9329cd87c
child 252 e62afa69214f
     1.1 --- a/GUI/SensorGadget.cs	Tue Nov 16 21:48:26 2010 +0000
     1.2 +++ b/GUI/SensorGadget.cs	Sun Nov 21 12:28:31 2010 +0000
     1.3 @@ -194,6 +194,10 @@
     1.4          settings.SetValue("sensorGadget.Width", Size.Width);
     1.5          Redraw();
     1.6        };
     1.7 +
     1.8 +      MouseDoubleClick += delegate(object obj, MouseEventArgs args) {
     1.9 +        SendHideShowCommand();
    1.10 +      };
    1.11      }
    1.12  
    1.13      public override void Dispose() {
    1.14 @@ -304,6 +308,13 @@
    1.15        Resize();
    1.16      }
    1.17  
    1.18 +    public event EventHandler HideShowCommand;
    1.19 +
    1.20 +    public void SendHideShowCommand() {
    1.21 +      if (HideShowCommand != null)
    1.22 +        HideShowCommand(this, null);
    1.23 +    }
    1.24 +
    1.25      private Font CreateFont(float size, FontStyle style) {
    1.26        try {
    1.27          return new Font(SystemFonts.MessageBoxFont.FontFamily, size, style);