Ejemplo n.º 1
0
 protected override BaseLayoutItem CreateItemByType(XtraPropertyInfo info, string typeStr)
 {
     if (typeStr == typeof(MyCustomPanel).Name)
     {
         return(((MyDockLayoutManager)Container).CreateCustomPanel());
     }
     return(base.CreateItemByType(info, typeStr));
 }
Ejemplo n.º 2
0
        FileRenameValueReference XtraCreateFileRenameValuesItem(XtraItemEventArgs e)
        {
            XtraPropertyInfo item = e.Item.ChildProperties["FileRenameValueName"];

            if (item == null || item.Value == null)
            {
                return(null);
            }

            string name = item.Value.ToString();
            FileRenameValueBase value = FileRenameManager.Default.GetFileRenameValue(name);

            return(value.CreateReference());
        }
Ejemplo n.º 3
0
        void OnFindCollectionItem(object sender, XtraFindCollectionItemEventArgs e)
        {
            XtraPropertyInfo IdPropertyInfo = e.Item.ChildProperties["ItemID"];
            MyGridColumn     column         = sender as MyGridColumn;
            bool             found          = false;

            foreach (CustomObject item in column.SomeCollection)
            {
                if (string.Equals(item.ItemID, IdPropertyInfo.Value))
                {
                    found            = true;
                    e.CollectionItem = item;
                    break;
                }
            }
            if (!found)
            {
                CustomObject newItem = new CustomObject();
                column.SomeCollection.Add(newItem);
                e.CollectionItem = newItem;
            }
        }