Ejemplo n.º 1
0
 private Bridge(MainForm gui)
 {
     _gui = gui;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// This function will return always the same bridge.
        /// </summary>
        /// <param name="gui">gui only needs to be set on the first call!</param>
        /// <returns>returns (the one and only) bridge</returns>
        public static Bridge GetBridge(MainForm gui = null)
        {
            if (_b == null)
                if (gui != null)
                {
                    _b = new Bridge(gui);
                    InitBridge();
                }
                else
                    throw new Exception("need GUI to initialize bridge");

            return _b;
        }