namespace PRSDesktop { } //class FactoryTemplateAttributesGrid : DynamicGrid //{ // public List Attributes { get; set; } // public FactoryTemplateAttributesGrid() : base() // { // Options = new DynamicGridOptions[] { DynamicGridOptions.RecordCount, DynamicGridOptions.AddRows, DynamicGridOptions.EditRows, DynamicGridOptions.DeleteRows }; // ActionColumns.Add(new DynamicRowMovementColumn(DynamicRowMovement.Up, SwapRows)); // ActionColumns.Add(new DynamicRowMovementColumn(DynamicRowMovement.Down, SwapRows)); // } // private bool SwapRows(int arg1, int arg2) // { // var item = Attributes[arg1]; // Attributes.Remove(item); // Attributes.Insert(arg2, item); // return true; // } // protected override DynamicGridColumns LoadColumns() // { // DynamicGridColumns columns = new DynamicGridColumns() // { // new DynamicGridColumn() { ColumnName = "Name", Width = 0 }, // new DynamicGridColumn() { ColumnName = "Editor", Width = 100 } // }; // return columns; // } // //public override void ConfigureColumns(DynamicGridColumns columns) // //{ // // base.ConfigureColumns(columns); // // columns[1].Lookups = new Dictionary() // // { // // { typeof(String), "String" }, // // { typeof(Int32), "Integer" }, // // { typeof(Boolean), "Boolean" } // // }; // //} // #region Save / Load // protected override void Reload(Filters criteria, Columns columns, SortOrder sort, Action action) // { // CoreTable result = new CoreTable(); // result.LoadColumns(typeof(FactoryTemplateAttribute)); // result.LoadRows(Attributes); // return result; // } // protected override FactoryTemplateAttribute LoadItem(CoreRow row) // { // int index = Data.Rows.IndexOf(row); // return Attributes[index]; // } // public override void SaveItem(FactoryTemplateAttribute item) // { // if (!Attributes.Contains(item)) // Attributes.Add(item); // } // protected override void DeleteItem(CoreRow row) // { // int index = Data.Rows.IndexOf(row); // Attributes.RemoveAt(index); // } // protected override FactoryTemplateAttribute CreateItem() // { // return base.CreateItem(); // } // #endregion //}