当前位置: 首页>>代码示例>>C#>>正文


C# WaitDialogForm.Hide方法代码示例

本文整理汇总了C#中WaitDialogForm.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# WaitDialogForm.Hide方法的具体用法?C# WaitDialogForm.Hide怎么用?C# WaitDialogForm.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WaitDialogForm的用法示例。


在下文中一共展示了WaitDialogForm.Hide方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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();
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:38,代码来源:FrmSysDataAdd.cs

示例2: barButtonItem5_ItemClick_1

        //更新区域
        private void barButtonItem5_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            string conn = "ProjectID='" + GetProjectID + "' and ParentID='0'";
            IList<Ps_Table_220Result> list = Common.Services.BaseService.GetList<Ps_Table_220Result>("SelectPs_Table_220ResultByConn", conn);
            Hashtable AreaTable = new Hashtable();
            for (int i = 0; i < list.Count; i++)
            {
                AreaTable.Add(list[i].Title, list[i].Title);
            }
            string connarea = "ProjectID='" + Itop.Client.MIS.ProgUID + "'order by Sort";
            IList<PS_Table_AreaWH> listarea = Common.Services.BaseService.GetList<PS_Table_AreaWH>("SelectPS_Table_AreaWHByConn", connarea);
            int m = 0;
            WaitDialogForm frm = new WaitDialogForm("","正在更新区域,请稍后...");
            foreach (PS_Table_AreaWH area in listarea)
            {
                m++;
                if (!AreaTable.Contains(area.Title))
                {

                    AddArea(area.Title);
                }
                double complete = m * 100 / listarea.Count ;
                frm.Caption = "已完成" + Math.Round(complete, 0) + "%";
            }
            frm.Hide();
            LoadData1();
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:28,代码来源:Frm220ResultSH.cs

示例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();
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:100,代码来源:FrmSysDataAdd.cs

示例4: barButtonItem15_ItemClick

        //更新变电站
        private void barButtonItem15_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //更新第2 5,8,11项

            string conn = "ProjectID='" + GetProjectID + "' and ParentID='0'";
            IList<Ps_Table_220Result> list = Common.Services.BaseService.GetList<Ps_Table_220Result>("SelectPs_Table_220ResultByConn", conn);
            int m = 0;
            WaitDialogForm frm = new WaitDialogForm("", "正在更新电源及变电站,请稍后...");
            foreach (Ps_Table_220Result pt in list)
            {
                m++;
                UpdataDY(pt.ID);
                UpDataRL(pt.ID);
                UpDataBDZ(pt.ID);
                UpData(pt.ID);
                double complete = m * 100 / list.Count;
                frm.Caption = "已完成" + Math.Round(complete, 0) + "%";
            }
            frm.Hide();
            LoadData1();
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:22,代码来源:Frm220ResultSH.cs


注:本文中的WaitDialogForm.Hide方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。