本文整理汇总了C#中WaitDialogForm.Show方法的典型用法代码示例。如果您正苦于以下问题:C# WaitDialogForm.Show方法的具体用法?C# WaitDialogForm.Show怎么用?C# WaitDialogForm.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WaitDialogForm
的用法示例。
在下文中一共展示了WaitDialogForm.Show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: showLoading
public bool showLoading(string message)
{
try
{
dlg = new DevExpress.Utils.WaitDialogForm(message, "โปรแกรมกำลังทำงาน");
dlg.Show();
return true;
}
catch
{
return false;
}
}
示例2: btnDelData_Click
/// <summary>
/// 删除数据库
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnDelData_Click(object sender, EventArgs e)
{
if (MessageBox.Show("确定要删除当前数据库吗?(不可恢复,请慎重操作)", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
WaitDialogForm frm = new WaitDialogForm("", "正在删除数据库,请稍后...");
frm.Show();
string connstr1 = " Connection Timeout=2; server=" + txtServerAddress.Text.Trim() + ";database=Master;uid=" + txtServerUser.Text.Trim() + ";pwd=" + txtServerPwd.Text.Trim() + ";";
if (!CheckConn(connstr1))
{
frm.Hide();
SQLDMOHelper.MesShow("无法连接到服务器,请确认服务器信息!");
return;
}
SQLDMOHelper smh = new SQLDMOHelper(txtServerAddress.Text.Trim(), txtServerUser.Text.Trim(), txtServerPwd.Text.Trim());
ArrayList datalist = smh.GetDbList();
if (datalist.Contains(txtServerName.Text.Trim()))
{
if (smh.KillDB(txtServerName.Text.Trim()))
{
frm.Hide();
SQLDMOHelper.MesShow("已成功删除 " + txtServerName.Text.Trim() + " 数据库");
}
}
else
{
frm.Hide();
SQLDMOHelper.MesShow("该服务器中不存在名为 " + txtServerName.Text.Trim() + " 的数据库");
}
frm.Hide();
}
示例3: btnCreateData_Click
/// <summary>
/// 创建数据库
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnCreateData_Click(object sender, EventArgs e)
{
if (!CheckForm())
{
return;
}
string connstr1 = " Connection Timeout=2; Pooling=False ;server=" + txtServerAddress.Text.Trim() + ";database=Master;uid=" + txtServerUser.Text.Trim() + ";pwd=" + txtServerPwd.Text.Trim() + ";";
if (!CheckConn(connstr1))
{
SQLDMOHelper.MesShow("无法连接到服务器,请确认服务器信息!");
return;
}
SQLDMOHelper smh = new SQLDMOHelper(txtServerAddress.Text.Trim(),txtServerUser.Text.Trim(),txtServerPwd.Text.Trim());
ArrayList datalist = smh.GetDbList();
if (datalist.Contains(txtServerName.Text.Trim()))
{
SQLDMOHelper.MesShow("该服务器中已在名为 " + txtServerName.Text.Trim() + " 的数据库");
return;
}
FrmDirTree frmd = new FrmDirTree();
SQLDMO.SQLServer svr = new SQLDMO.SQLServerClass();
svr.Connect(txtServerAddress.Text.Trim(), txtServerUser.Text.Trim(), txtServerPwd.Text.Trim());
frmd.svr=svr;
frmd.Text = txtServerAddress.Text.Trim() + "选择路径";
string FilePath="";
if (frmd.ShowDialog()==DialogResult.OK)
{
FilePath = frmd.SelectPaht;
}
else
{
return;
}
WaitDialogForm frm = new WaitDialogForm("正在创建数据库,请稍后...");
frm.Show();
if (smh.CreateDB(txtServerName.Text.Trim(), FilePath))
{
//读取配置数据表.sql文件
IList<SysDataFiles> sdflist = ServicesSys.BaseService.GetList<SysDataFiles>("SelectSysDataFilesList", "");
if (sdflist.Count==0)
{
frm.Hide();
SQLDMOHelper.MesShow("服务器中创建数据库文件不存在,请管管员先添加该文件! ");
return;
}
SysDataFiles file = sdflist[0];
string path = Application.StartupPath + "\\BlogData";
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
string filepath = path + "\\" + file.FileName;
if (File.Exists(filepath))
{
File.Delete(filepath);
}
getfile(file.Files, filepath);
ArrayList alist = smh.GetSqlFile(filepath, txtServerName.Text.Trim());
if (File.Exists(filepath))
{
File.Delete(filepath);
}
string connstr2 = "Pooling=False ; server=" + txtServerAddress.Text.Trim() + ";database=" + txtServerName.Text.Trim() + ";uid=" + txtServerUser.Text.Trim() + ";pwd=" + txtServerPwd.Text.Trim() + ";";
SqlConnection conn = new SqlConnection(connstr2);
frm.Caption = "正在创建数据表,请稍后...";
if (smh.ExecuteCommand(alist,conn))
{
frm.Caption = "正在初始化数据,请稍后...";
//添加数据
if (CopyData(smh))
{
frm.Hide();
SQLDMOHelper.MesShow("数据库 " + txtServerName.Text.Trim() + " 已成功创建");
}
else
{
frm.Hide();
SQLDMOHelper.MesShow("数据库 " + txtServerName.Text.Trim() + " 已成功创建,初始化数据败");
}
}
else
{
frm.Hide();
SQLDMOHelper.MesShow("创建数据库表失败,请检查服务器中创建数据库文件是否损坏");
}
}
frm.Hide();
}
示例4: btImport_Click_1
private void btImport_Click_1(object sender, EventArgs e)
{
//����
if (checkedListBox1.SelectedItem == null) return;
IEnumerator ie = null;
switch (checkedListBox1.SelectedItem.ToString()) {
case "ĸ��":
ie = importMX();
break;
case "��·":
ie = importXL();
break;
case "�������ѹ��":
ie = importBYQ2();
break;
case "�������ѹ��":
ie = importBYQ3();
break;
case "�����":
ie = importFDJ();
break;
case "����":
ie = importFH();
break;
case "����������":
ie = importBLDR();
break;
}
if (gridControl1.DataSource!=null)
{
ncount = (gridControl1.DataSource as DataTable).Rows.Count;
ncurrent = 0;
if (ie != null)
{
WaitDialogForm msgbox = new WaitDialogForm("", "�������ݣ����Ժ���");
msgbox.Show();
while (ie.MoveNext())
{
msgbox.SetCaption(string.Format("�����{0}/{1}", ncurrent, ncount));
}
Thread.Sleep(1000);
msgbox.Close();
}
}
}