示例#1
0
 /// <summary>
 /// 向程序添加功能
 /// </summary>
 /// <param name="func"></param>
 public void AddFunction(AppFunction function)
 {
     functions.Add(function);
 }
示例#2
0
 /// <summary>
 /// 向程序添加功能
 /// </summary>
 /// <param name="func"></param>
 public void AddFunction(AppFunction function)
 {
     functions.Add(function);
 }
示例#3
0
 /// <summary>
 /// 获取已配置的程序的功能项集合
 /// </summary>
 /// <param name="AppCommand">将要获取功能项集合的程序对应的命令</param>
 /// <returns>功能的集合</returns>
 public List<AppFunction> GetFunctions(int AppCommand)
 {
     string sql = string.Format("select * from [Func] where App={0}", AppCommand);
     List<AppFunction> funcs = new List<AppFunction>();
     DataSet ds = ExecuteQuery(sql);
     DataTable dt = ds.Tables[0];
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         DataRow row = dt.Rows[i];
         AppFunction func = new AppFunction();
         func.Command = int.Parse(row["Command"].ToString());
         func.Description = row["Desc"].ToString();
         func.AppCmd = int.Parse(row["App"].ToString());
         func.SKeys = row["Keys"].ToString();
         funcs.Add(func);
     }
     return funcs;
 }