public static IResponsiveClient GetRunningToolkitTypeHelper(ConcurrencyMode mode)
 {
     if (config == null)
     {
         config = ClientConfiguration.GetInstance();
         Console.Out.WriteLine(config.GuiToolkit);
     }
     if (config.GuiToolkit == "WinForms")
     {
         return new WinFormsResponsiveHelper(mode);
     }
     else
     {
         return new ConsoleResponsiveHelper(mode);
     }
 }
        internal static ClientConfiguration BuildFromXmlNode(XmlNode sectionNode)
        {
            ClientConfiguration config = new ClientConfiguration();

            foreach (XmlNode node in sectionNode.ChildNodes)
            {
                switch (node.Name)
                {
                    case "bindableWidgetsPrefix":
                        config.BindableWidgetsPrefix = node.Attributes["prefix"].Value;
                        break;
                    case "guiToolkit":
                        config.GuiToolkit = node.Attributes["name"].Value;
                        break;
                    case "logger":
                        config.Logger = LoggerConfiguration.BuildFromXmlNode(node);
                        break;
                }
            }

            return config;
        }
        /// <summary>
        /// The class is a Singleton and this is the way to access it
        /// </summary>
        /// <returns></returns>
        public static ClientConfiguration GetInstance()
        {
            if (_instance == null)
            {
                _instance = ConfigurationManager.GetSection("boxerp.client") as ClientConfiguration;
            }

            return _instance;
        }
        public static ClientConfiguration GetInstanceFromFile(string path)
        {
            Boxerp.Client.Logger.GetInstance().WriteLine("path:" + path);
            if (_instance == null)
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(path);

                foreach (XmlNode node in doc.GetElementsByTagName("boxerp.client"))
                {
                    Boxerp.Client.Logger.GetInstance().WriteLine("found boxerp.client");
                    _instance = BuildFromXmlNode(node);
                    break;
                }
            }
            return _instance;
        }