old_flsystem/类库/UI.Framework/Controls/SettingControl.cs

48 lines
1.3 KiB
C#
Raw Permalink Normal View History

2022-09-20 03:10:29 +00:00
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
namespace UI.Framework.Controls
{
public partial class SettingControl : DevExpress.XtraEditors.XtraUserControl
{
public SettingControl()
{
InitializeComponent();
}
/// <summary>
/// 绑定对象
/// </summary>
/// <param name="obj"></param>
public void Bind(Object obj, int descriptionHeight = 90)
{
try
{
this.PropertyControl.Height = this.Height - (descriptionHeight + 5);
this.propertyDescriptionControl1.Height = descriptionHeight;
this.PropertyControl.SelectedObject = obj;
}
catch (Exception)
{ }
}
/// <summary>
/// 绑定对象组
/// </summary>
/// <param name="objs"></param>
public void Bind(Object[] objs)
{
labelControl1.Visible = true;
this.PropertyControl.SelectedObjects = objs;
labelControl1.Visible = false;
}
}
}