示例#1
0
        public MobaRow CopyTo()
        {
            MobaRow mobaRow = new MobaRow();

            foreach (KeyValuePair <string, MobaColumn> current in this.RowItem)
            {
                mobaRow.Add(current.Key, current.Value.MobaColumnText);
            }
            return(mobaRow);
        }
示例#2
0
 public void CopyToDictionaryAndParms(Dictionary <byte, object> dic)
 {
     if (dic.Count > 0)
     {
         this.Refresh();
         this.deleteRows.Clear();
         this.Clear();
         foreach (KeyValuePair <byte, object> current in dic)
         {
             if (current.Key == 0)
             {
                 Dictionary <string, string> dictionary = (Dictionary <string, string>)current.Value;
                 this.tableName = dictionary["TableName"];
                 this.tableKey  = dictionary["TableKey"];
             }
             else if (current.Key == 1)
             {
                 this.mParms = (Dictionary <byte, object>)current.Value;
             }
             else
             {
                 string[] array   = (string[])current.Value;
                 int      num     = 0;
                 string   rowName = string.Empty;
                 string[] array2  = array;
                 for (int i = 0; i < array2.Length; i++)
                 {
                     string text = array2[i];
                     if (num == 0)
                     {
                         rowName = text;
                     }
                     else if (this.rows.Count < num)
                     {
                         MobaRow mobaRow = new MobaRow();
                         mobaRow.Add(rowName, text);
                         this.rows.Add(mobaRow);
                     }
                     else
                     {
                         this.rows[num - 1].Add(rowName, text);
                     }
                     num++;
                 }
             }
         }
     }
 }