[longomatch] Make the GUI toolkit accessible from a static property



commit 81739f9e50970421fd9224b8b02a13bfb7c7b937
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Mar 17 20:14:21 2013 +0100

    Make the GUI toolkit accessible from a static property

 LongoMatch.GUI/Gui/GUIToolkit.cs |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/GUIToolkit.cs b/LongoMatch.GUI/Gui/GUIToolkit.cs
index f0746d7..11cb4c3 100644
--- a/LongoMatch.GUI/Gui/GUIToolkit.cs
+++ b/LongoMatch.GUI/Gui/GUIToolkit.cs
@@ -37,6 +37,7 @@ namespace LongoMatch.Gui
 {
        public class GUIToolkit: IGUIToolkit
        {
+               static GUIToolkit instance;
                IMainWindow mainWindow;
                
                public GUIToolkit (Version version)
@@ -44,6 +45,13 @@ namespace LongoMatch.Gui
                        Version = version;
                        mainWindow = new MainWindow(this);
                        (mainWindow as MainWindow).Show();
+                       instance = this;
+               }
+               
+               public static GUIToolkit Instance {
+                       get {
+                               return instance;
+                       }
                }
                
                public IMainWindow MainWindow{


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]