예제 #1
0
        public CellEditor GetCellEditor()
        {
            var res = new CellEditor
            {
                Header = Id,
                Source = this
            };

            foreach (var prop in VersionInjector.PropsWar3Obj)
            {
                string propName = prop.Name;
                if (propName != nameof(Id) && propName != nameof(GameBody))
                {
                    string propValue = (string)prop.GetValue(this);
                    if (propValue == null)
                    {
                        continue;
                    }

                    var cell = new CellData()
                    {
                        Key   = propName,
                        Value = propValue,
                        Data  = this,
                    };

                    res.Datas.Add(cell);
                }
            }

            return(res);
        }
예제 #2
0
        public CellEditor GetCellEditor()
        {
            var res = new CellEditor
            {
                Header = RawCode,
                Source = this,
            };

            res.Datas.Add(new CellData
            {
                Key   = "0",
                Value = "dummy",
                Data  = this,
            });

            //foreach (var item in Columns)
            //{
            //    var cell = new CellData
            //    {
            //        Key = item.ColumnId.ToString(),
            //        Value = item.Value,
            //        Data = this,
            //    };
            //    res.Datas.Add(cell);
            //}

            return(res);
        }