Exemplo n.º 1
0
        public static String GetString(String Name)
        {
            String moduleSettings = ModuleConfig.GetSettings();
            Fpp.Data.Config config = new Fpp.Data.Config(moduleSettings);
            DataSet ds = config.GetValue(Name);
            String res = "";
            if (ds.Tables.Count > 1 && ds.Tables[0].Rows.Count > 1)
            {
                res = ds.Tables[0].Rows[0].ToString();
            }

            return res;
        }
Exemplo n.º 2
0
        public static bool GetBoolean(String Name)
        {
            String moduleSettings = ModuleConfig.GetSettings();
            Fpp.Data.Config config = new Fpp.Data.Config(moduleSettings);
            DataSet ds = config.GetValue(Name);
            bool res = false;
            if (ds.Tables[0].Rows.Count > 0)
            {
                res = ( Convert.ToInt32(ds.Tables[0].Rows[0]["Value"]) == 1 );
            }

            return res;
        }
Exemplo n.º 3
0
        public static int GetInt(String Name)
        {
            String moduleSettings = ModuleConfig.GetSettings();
            Fpp.Data.Config config = new Fpp.Data.Config(moduleSettings);
            DataSet ds = config.GetValue(Name);
            int res = 0;
            if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                res = Convert.ToInt32(ds.Tables[0].Rows[0]["Value"]);
            }

            return res;
        }
Exemplo n.º 4
0
 public Config()
     : base()
 {
     _config = new Fpp.Data.Config(ModuleSettings);
 }