本文整理汇总了C#中XtraForm.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# XtraForm.GetType方法的具体用法?C# XtraForm.GetType怎么用?C# XtraForm.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XtraForm
的用法示例。
在下文中一共展示了XtraForm.GetType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OpenForm
/// <summary>
/// 打开指定的窗口
/// </summary>
/// <param name="winForm"></param>
public void OpenForm(XtraForm winForm)
{
if (!FormAlreadyOpen(winForm.GetType()))
{
winForm.MdiParent = this;
winForm.Show();
}
}
示例2: AutoInsertIfNonExists
// Hàm tự động insert nếu không tồn tại record form trong db
public static bool AutoInsertIfNonExists(XtraForm form)
{
try
{
string sql = "select name_form from fw_show_form where name_form='" + form.GetType().FullName + "'";
DatabaseFB db = DABase.getDatabase();
DbCommand check = db.GetSQLStringCommand(sql);
if (db.ExecuteScalar(check) == null)
{
db = DABase.getDatabase();
long form_id = db.GetID(HelpGen.G_FW_ID);
sql = "insert into fw_show_form values('" + form_id + "','" + form.GetType().FullName + "','" + form.Text + "','Y')";
DbCommand insert = db.GetSQLStringCommand(sql);
db.ExecuteNonQuery(insert);
}
return true;
}
catch
{
return false;
}
}
示例3: CanShowForm
/// <summary>
/// Kiem tra 1 form co phai la public form
/// trong toan bo he thong dua vao danh sach public form
/// va loai form
/// </summary>
/// <param name="form"></param>
/// <returns></returns>
public static bool CanShowForm(XtraForm form)
{
if (form != null)
{
if (form is IPublicForm) return true;
string formName = form.GetType().FullName;
return CanShowForm(formName);
}
else
{
return false;
}
}
示例4: AddCheckbox
// Hàm add checkbox vào form
private void AddCheckbox(XtraForm mainform, XtraForm form)
{
int w = form.Width;
int h = form.Height;
form.Size = new System.Drawing.Size(w, h + 30);
form.SuspendLayout();
// Khởi tạo checkbox for add
DevExpress.XtraEditors.CheckEdit checkEdit1 = new DevExpress.XtraEditors.CheckEdit();
checkEdit1.Location = new System.Drawing.Point(13, h - 30);//subheader
checkEdit1.Name = "_" + form.GetType().FullName;
checkEdit1.Properties.Caption = "Hiện màn hình này ở các lần sau.";
checkEdit1.Size = new System.Drawing.Size(w, 19);
checkEdit1.TabIndex = 4;
checkEdit1.Checked = true;
checkEdit1.Click += new System.EventHandler(Checkbox_Click);
form.Controls.Add(checkEdit1);
form.ResumeLayout(false);
form.PerformLayout();
}
示例5: IsShow
// Hàm kiểm tra xem có được show form hay không
public bool IsShow(XtraForm mainform, XtraForm form)
{
bool flag = false;
//if (LoadCheckbox(mainform.GetType().FullName) == "Y")
if (LoadCheckbox(form.GetType().FullName) == "Y")
{
AddCheckbox(mainform, form);
flag = true;
}
return flag;
}
示例6: UserForm
public UserForm(XtraForm mainform)
{
if (File.Exists(UserFormHelp.xml))
{
try
{
_Refresh();
if (LoadCheckbox(mainform.GetType().FullName) == "")
{
if(UserFormHelp.AutoInsertIfNonExists(mainform) == false)
return;
Update_XML();
}
}
catch
{
File.Delete(UserFormHelp.xml);
if (UserFormHelp.AutoInsertIfNonExists(mainform) == false)
return;
UserFormHelp.Create_XML_NULL();
}
}
else
{
if (UserFormHelp.AutoInsertIfNonExists(mainform) == false)
return;
UserFormHelp.Create_XML_NULL();
}
}
示例7: pl_wrapper
public static void pl_wrapper(ref XtraForm form, IFormat isFormat, IPermission isPermision)
{
ProtocolForm standard = new ProtocolForm(form);
if (isPermision != null)
standard.applyActions.Add(new ProtocolVN.Framework.Win.ApplyPermissionAction(form.GetType().ToString()));
if (isFormat != null)
standard.applyActions.Add(new ProtocolVN.Framework.Win.ApplyFormatAction());
//PHUOCNC : Thất bại có thể rơi vào chức năng khác
// Nhưng hiện tại chắc chắn thất bại chỉ do phân quyền
if (standard.wrapperForm() == false)
{
form.Close();
form = ApplyPermissionAction.getPermissionFormFail();
}
else
{
}
}