示例#1
0
        private void onTableFileSelected(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }

            string fullPath = listView1.SelectedItems[0].Tag.ToString();
            string key      = Path.GetFileNameWithoutExtension(fullPath);

            if (!mTableStore.Tables.ContainsKey(key))
            {
                mTableStore.Tables[key] = BuildInitTableInfo(key, fullPath);
                mTableStore.FixFieldIndex();
                mDirty = true;
            }

            var tableInfo = mTableStore.Tables[key];

            mTablePanel.EditTable(tableInfo);
        }
示例#2
0
        private void LoadConfigFile()
        {
            if (string.IsNullOrEmpty(Settings.Default.DataPath))
            {
                return;
            }

            string configText = File.ReadAllText(Settings.Default.DataPath);

            mTableStore = LitJson.JsonMapper.ToObject <TableStore>(configText, false);
            mTableStore.FixFieldIndex();

            RefreshTables();
        }