本文整理汇总了C#中XtraForm类的典型用法代码示例。如果您正苦于以下问题:C# XtraForm类的具体用法?C# XtraForm怎么用?C# XtraForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XtraForm类属于命名空间,在下文中一共展示了XtraForm类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ColseForm
public static void ColseForm(XtraForm frm, bool? isAdd, System.Windows.Forms.FormClosingEventArgs e)
{
if (frm.Tag != null && frm.Tag.Equals("Q")) { e.Cancel = false; return; }
if (isAdd == null) { e.Cancel = false; return; }
if (HelpMsgBox.ShowConfirmMessage("Bạn có chắc muốn đóng?") == DialogResult.Yes) e.Cancel = false;
else e.Cancel = true;
}
示例2: DongForm
public static void DongForm(XtraForm frm)
{
if (HelpMsgBox.ShowConfirmMessage("Bạn có chắc muốn đóng ?") == DialogResult.Yes)
{
frm.Close();
}
}
示例3: SetCenterLocation
private static void SetCenterLocation(XtraForm form)
{
Size screenSize = SystemInformation.PrimaryMonitorSize;
int x = (screenSize.Width - form.Width) / 2;
int y = (screenSize.Height - form.Height) / 2;
form.Location = new Point(x, y);
}
示例4: RepositoryPLGridSelect
public RepositoryPLGridSelect(XtraForm frmDanhMuc, string columnField, string tableName, string ValueField, string[] visibleField, string[] caption, string getField, TreeList treeList)
{
init();
plDanhMuc.TreeList = treeList;
plDanhMuc._init(frmDanhMuc ,columnField, tableName , ValueField , visibleField , caption , getField);
treeList.GotFocus += delegate(object sender , EventArgs e)
{
if (treeList.DataSource != null &&
!((DataTable)treeList.DataSource).Columns.Contains(columnField + getField))
{
((DataTable)treeList.DataSource).Columns.Add(new DataColumn(columnField + getField));
}
};
treeList.CellValueChanged += delegate(object sender , CellValueChangedEventArgs e)
{
if (e.Column.FieldName.Equals(columnField+getField))
{
DataRowView rowView = (DataRowView)treeList.GetDataRecordByNode(e.Node);
DataRow row = rowView.Row;
row[columnField] = _getId(e.Value);
}
};
this.Popup += new EventHandler(RepositoryHuyDanhMuc_Popup);
this.Leave += new EventHandler(RepositoryDanhMucAdv_Leave);
}
示例5: SaveSizeForm
private static void SaveSizeForm(XtraForm form)
{
try
{
string path = FrameworkParams.LAYOUT_FOLDER + @"\" + FrameworkParams.currentUser.username + form.Name + @".xml";
CreateFileStroreSize(path);
DataSet ds = new DataSet();
ds.ReadXml(path);
if (ds.Tables.Count == 0)
{
DataTable table = new DataTable();
table.Columns.Add(form.Name);
ds.Tables.Add(table);
}
if (!ds.Tables[0].Columns.Contains(form.Name))
ds.Tables[0].Columns.Add(form.Name);
if (ds.Tables[0].Rows.Count == 0)
ds.Tables[0].Rows.Add(form.Width + "," + form.Height + "," + form.Location.X + "," + form.Location.Y);
else
ds.Tables[0].Rows[0][form.Name] = form.Width + "," + form.Height + "," + form.Location.X + "," + form.Location.Y;
ds.WriteXml(path);
}
catch { }
}
示例6: GetPrintObj
public static _Print GetPrintObj(XtraForm frmMain, long IDs)
{
// _Print print = new _Print();
// DataSet Resume = new DataSet();
// DatabaseFB db = DABase.getDatabase();
// DbCommand cmd = db.GetStoredProcCommand("NEW_PROCEDURE");
// db.AddInParameter(cmd, "@RID", DbType.Int64, IDs);
// db.LoadDataSet(cmd, Resume, "NEW_PROCEDURE");
// DataTable Resume_Ung_Tuyen = DABase.getDatabase().LoadDataSet(
// @"SELECT REUT.R_ID,REUT.VTUT_ID,NAME FROM RESUME_UNG_TUYEN REUT INNER JOIN DM_VI_TRI_UNG_TUYEN VT ON REUT.VTUT_ID=VT.ID
// WHERE REUT.R_ID=" + IDs).Tables[0];
// StringBuilder Str = new StringBuilder("");
// foreach (DataRow row in Resume_Ung_Tuyen.Rows)
// Str.Append(row["NAME"].ToString() + ",");
// if (Str.Length > 0) Str.Remove(Str.Length - 1, 1);
// Resume.Tables[0].Rows[0]["VT_TUYEN_DUNG"] = Str.ToString();
// foreach (DataRow dr in Resume.Tables[0].Rows)
// {
// dr.BeginEdit();
// dr["QTDT"] = HelpByte.BytesToUTF8String((byte[])dr["QUA_TRINH_DAO_TAO"]);
// dr["QTCT"] = HelpByte.BytesToUTF8String((byte[])dr["QUA_TRINH_CONG_TAC"]);
// dr["TTCM"] = HelpByte.BytesToUTF8String((byte[])dr["TRINH_DO_CHUYEN_MON"]);
// dr["TTNN"] = HelpByte.BytesToUTF8String((byte[])dr["TRINH_DO_NGOAI_NGU"]);
// dr.EndEdit();
// }
// print.ReportNameFile = "EMB" + typeof(InThongTinUngVienForm).FullName;
// print.MainForm = frmMain;
// print.MainDataset = Resume;
// print.SubDataset = new DataSet[] { AppReport.HeaderDataSet() };
// return print;
return null;
}
示例7: InitLastestNews
/// <summary>
/// Gắn CurrentNews vào form
/// </summary>
/// <param name="form"></param>
public static CurrentNews InitLastestNews(XtraForm form)
{
CurrentNews ctr = new CurrentNews();
ctr.Dock = DockStyle.Fill;
form.Controls.Add(ctr);
return ctr;
}
示例8: ChangeFormVisibility
private void ChangeFormVisibility(XtraForm form) {
if (form.IsDisposed)
return;
if (form.Visible)
form.Hide();
else
form.Show();
}
示例9: OpenForm
/// <summary>
/// 打开指定的窗口
/// </summary>
/// <param name="winForm"></param>
public void OpenForm(XtraForm winForm)
{
if (!FormAlreadyOpen(winForm.GetType()))
{
winForm.MdiParent = this;
winForm.Show();
}
}
示例10: BindPageTab
private void BindPageTab(XtraTabPage tabPage, XtraForm form)
{
var _tabPage = CreateTabPageControl("零部件列表");
_tabPage.Controls.Add(form);
tabControl.TabPages.Add(_tabPage);
tabPage.Controls.Add(tabControl);
xtraTabControl1.SelectedTabPage = tabPage;
}
示例11: ChangeFormSize
public static void ChangeFormSize(XtraForm form, string form_name, bool is_touch_mode)
{
int width = 0, height = 0;
string[] tmp = CaptionEngine.GetControlCaption(form_name, null, BaseConstant.FORM_SIZE, null).Split('|');
width = Convert.ToInt32(tmp[0]);
height = Convert.ToInt32(tmp[1]);
form.Size = new Size(width, height);
}
示例12: WindowsMessage
public static void WindowsMessage(string title, string message, XtraForm frm)
{
FlyoutAction action = new FlyoutAction();
action.Caption = title;
action.Description = message;
action.Commands.Add(FlyoutCommand.OK);
FlyoutDialog.Show(frm, action);
}
示例13: longProcess
/// <summary>
/// Hiển thị màn hình có ProgressBar tự xây dựng.
/// </summary>
public static void longProcess(XtraForm mainForm, ThreadStart process, long estimateTime)
{
if (estimateTime == -1)
estimateTime = 1;
mainForm.Cursor = Cursors.WaitCursor;
TrialWaitingBox frm = new TrialWaitingBox(process);
frm.estimateTime = estimateTime;
frm.ShowDialog(mainForm);
mainForm.Cursor = Cursors.Default;
}
示例14: check_show_form
bool check_show_form(XtraForm f)
{
for (int i = 0; i < xTabForm.Pages.Count; i++)
{
if (xTabForm.Pages[i].MdiChild.Text == f.Text)
{ xTabForm.Pages[i].MdiChild.Activate(); return false; }
}
commons.ShowFormMdi(f, this);
return true;
}
示例15: PLVietKey
//public PLVietKey(XtraForm frm,VietKeyHandler.InputType kieugo)
//{
// this.dicKeyFunc = new Dictionary<Keys , Func>();
// this.dicKeyFuncArg = new Dictionary<Keys , StructFuncArg>();
// this.frmOwn = frm;
// this.frmOwn.KeyPreview = true;
// this.frmOwn.KeyUp += new KeyEventHandler(frmOwn_KeyUp);
// this.frmOwn.KeyPress += new KeyPressEventHandler(frmOwn_KeyPress);
// vietkey = new VietKeyHandler();
// vietkey.InputMethods = kieugo;
//}
public PLVietKey(XtraForm frm)
{
this.dicKeyFunc = new Dictionary<Keys , Func>();
this.dicKeyFuncArg = new Dictionary<Keys , StructFuncArg>();
this.frmOwn = frm;
this.frmOwn.KeyPreview = true;
this.frmOwn.KeyUp += new KeyEventHandler(frmOwn_KeyUp);
this.frmOwn.KeyPress += new KeyPressEventHandler(frmOwn_KeyPress);
vietkey = new VietKeyHandler();
}