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


C# WaitDialogForm.Close方法代码示例

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


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

示例1: SaveFile

        /// <summary>
        /// 下载文件
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static bool SaveFile(byte[] byt,string type)
        {
            bool result = false;
            SaveFileDialog sfd = new SaveFileDialog();
            sfd.Filter = "文件类型|*" + type;
            if (sfd.ShowDialog() == DialogResult.OK)
            {

                WaitDialogForm wait = new WaitDialogForm("", "正在下载数据, 请稍候...");
                try
                {
                    GetFile(byt, sfd.FileName);
                    wait.Close();
                    if (MsgBox.ShowAskMessageBox("下载已完成,是否打开文件?") == DialogResult.OK)
                    {
                        try
                        {
                            System.Diagnostics.Process.Start(sfd.FileName);
                        }
                        catch { System.Diagnostics.Process.Start(sfd.FileName); }
                    }

                }
                catch
                {
                    wait.Close();
                }
            }
            return result;
        }
开发者ID:s7loves,项目名称:mypowerscgl,代码行数:35,代码来源:CommentHelper.cs

示例2: ValidateConnection

 public bool ValidateConnection(XlsFileConnection conn, string fileNamePath, WaitDialogForm wait)
 {
     if (conn.Open() == null)
     {
         if (wait != null) wait.Close();
         if (conn.ConnectionError == XlsFileErrorCode.NOT_EXCEL_FORMATED)
         {
             HelpMsgBox.ShowNotificationMessage("Tập tin \"" + fileNamePath + "\" không phải định dạng excel!");
         }
         else if (conn.ConnectionError == XlsFileErrorCode.PASSWORD_PROTECTED)
         {
             HelpMsgBox.ShowNotificationMessage("Tập tin \"" + new FileInfo(fileNamePath).Name + "\" đã được bảo vệ bằng mật khẩu!");
         }
         else
         {
             HelpMsgBox.ShowNotificationMessage("Truy cập vào tập tin \"" + fileNamePath + "\" không thành công!");
         }
         return false;
     }
     return true;
 }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:21,代码来源:frmInLPSKeToan.cs

示例3: IsSave

        private void IsSave()
        {
            if (!editrights)
                return;

            if (MsgBox.ShowYesNo("�����Ѿ������ı䣬�Ƿ񱣴棿") != DialogResult.Yes)
            {
                return;
            }

            WaitDialogForm wait = null;
            EconomyAnalysis obj = Services.BaseService.GetOneByKey<EconomyAnalysis>(uid1);
            System.IO.MemoryStream ms = new System.IO.MemoryStream();

            try
            {
                wait = new WaitDialogForm("", "���ڱ�������, ���Ժ�...");
                fpSpread1.Save(ms, false);

                obj.Contents = ms.GetBuffer();
                Services.BaseService.Update("UpdateEconomyAnalysisByContents", obj);
                wait.Close();
                MsgBox.Show("����ɹ�");
                excelstate = false;
            }
            catch
            {
                wait.Close();
                MsgBox.Show("����ʧ��");

            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:32,代码来源:FrmEconomyAnalysisSH.cs

示例4: dotNetBarManager1_ItemClick

        private void dotNetBarManager1_ItemClick(object sender, EventArgs e)
        {
            DevComponents.DotNetBar.ButtonItem btItem = sender as DevComponents.DotNetBar.ButtonItem;
            //Layer layer1 = (Layer)LayerBox.ComboBoxEx.SelectedItem;
            if (btItem != null)
            {
                switch (btItem.Name)
                {
                    #region 文件操作
                    case "mNew":

                        //NewFile(fileType, this.Text);
                        frmNewProject frmprojectDLG = new frmNewProject();
                        frmprojectDLG.Name = "";
                        frmprojectDLG.FileType = "短路";
                        if (frmprojectDLG.ShowDialog() == DialogResult.OK)
                        {
                            tlVectorControl1.NewFile();
                            PSP_ELCPROJECT pd = new PSP_ELCPROJECT();
                            pd.Name = frmprojectDLG.Name;
                            pd.FileType = frmprojectDLG.FileType;
                            pd.Class = System.DateTime.Now.ToString();
                            pd.ProjectID = this.ProjectUID;
                            tlVectorControl1.SVGDocument.SvgdataUid = pd.ID;
                            SvgDocument.currentLayer = Layer.CreateNew("默认层", tlVectorControl1.SVGDocument).ID;
                            Layer la = tlVectorControl1.SVGDocument.GetLayerByID(SvgDocument.currentLayer);
                            la.SetAttribute("layerType", "电网规划层");
                            Services.BaseService.Create<PSP_ELCPROJECT>(pd);
                            if (pd.ID != null)
                            {
                                Open(pd.ID);
                                intdata(pd.ID);
                                this.Text = frmname + "-" + pd.Name;
                            }
                            this.Show();
                            jxtbar2(2);
                            LoadShape("symbol23.xml");
                        }
                        break;
                    case "mOpen":
                        if (tlVectorControl1.IsModified == true)
                        {
                            DialogResult a;
                            a = MessageBox.Show("图形已修改,是否保存?", "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);

                            if (a == DialogResult.Yes)
                            {
                                Save();
                            }
                            else if (a == DialogResult.No)
                            {
                            }
                            else if (a == DialogResult.Cancel)
                            {
                                return;
                            }

                        }
                        OpenProject op = new OpenProject();
                        op.ProjectID = this.ProjectUID;
                        op.Initdata(true);
                        if (op.ShowDialog() == DialogResult.OK)
                        {
                            if (op.FileSUID != null)
                            {
                                Open(op.FileSUID);
                                intdata(op.FileSUID);
                                this.Text = frmname + "-" + op.FileName;
                            }
                            this.Show();
                            jxtbar2(2);
                            LoadShape("symbol23.xml");
                        }
                        break;
                    case "btExSymbol":
                        tlVectorControl1.ExportSymbol();
                        break;
                    case "mjxt"://导入接线图

                        break;
                    case "mSave":
                        Save();
                        //tlVectorControl1.Save();
                        //frmElementName dlg = new frmElementName();
                        //dlg.TextInput = tlVectorControl1.SVGDocument.FileName;
                        //if (dlg.ShowDialog() == DialogResult.OK)
                        //{
                        //    tlVectorControl1.SVGDocument.FileName = dlg.TextInput;
                        //    Save();
                        //}
                        break;
                    case "mExit":
                        this.Close();
                        break;
                    case "bt1":
                        //InitTK();
                        break;
                    case "bt2":
                        break;
                    case "mPriSet":
//.........这里部分代码省略.........
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:101,代码来源:frmTLpspShortGraphical.cs

示例5: InitData1

        private void InitData1()
        {
            if (excelstate)
            {
                IsSave();
            }

            if (treeList1.FocusedNode == null)
                return;

            if (treeList1.FocusedNode.ParentNode == null)
            {
                barEdititem.Enabled=false;
                barDelitem.Enabled = false;
                barCS.Enabled = false;
                barButtonItem5.Enabled = false;
                barSave.Enabled = false;
            }
            else
            {
                barEdititem.Enabled = true ;
                barDelitem.Enabled = true;
                barCS.Enabled = true;
                barButtonItem5.Enabled = true;
                barSave.Enabled = true;
            }

            excelstate = false;

            if (!isloadstate)
                return;

            string uid = treeList1.FocusedNode["UID"].ToString();
            uid1 = uid;
            EconomyAnalysis obj = Services.BaseService.GetOneByKey<EconomyAnalysis>(uid);

            WaitDialogForm wait = null;
            try
            {
                wait = new WaitDialogForm("", "���ڼ�������, ���Ժ�...");
                System.IO.MemoryStream ms = new System.IO.MemoryStream(obj.Contents);
                by1 = obj.Contents;
                fpSpread1.Open(ms);

                try
                {
                    fpSpread1.Sheets[0].Cells[0, 0].Text = "����1 " + treeList1.FocusedNode["Title"].ToString() + "��������";
                }
                catch { }

                wait.Close();

                try
                {
                    nianshu1 = int.Parse(fpSpread1.Sheets[8].GetValue(10, 3).ToString());
                }
                catch { }

                try
                {
                    kaishinian = int.Parse(fpSpread1.Sheets[8].GetValue(9, 3).ToString());
                    xiangmunian1 = int.Parse(fpSpread1.Sheets[8].GetValue(13, 3).ToString());
                    lixinian1 = int.Parse(fpSpread1.Sheets[8].GetValue(2, 1).ToString());
                }
                catch { }

            }
            catch { wait.Close(); }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:69,代码来源:FrmEconomyAnalysisSH.cs

示例6: barBtnRefreshData_ItemClick


//.........这里部分代码省略.........
            fpSpread1.Sheets[15].ColumnCount = 0;
            sh310_5.Build(fpSpread1.Sheets[15], year, ProjID, area_key_id, SxXjName);
            //更新表3-11
            fpSpread1.Sheets[16].RowCount = 0;
            fpSpread1.Sheets[16].ColumnCount = 0;
            sh311.Build(fpSpread1.Sheets[16], year, ProjID, SxXjName);
            //更新表3-11附表9
            fpSpread1.Sheets[17].RowCount = 0;
            fpSpread1.Sheets[17].ColumnCount = 0;
            sh311_9.Build(fpSpread1.Sheets[17], year, ProjID, area_key_id, SxXjName);
            //更新表3-12
            fpSpread1.Sheets[18].RowCount = 0;
            fpSpread1.Sheets[18].ColumnCount = 0;
            sh312.Build(fpSpread1.Sheets[18], year, ProjID, SxXjName);
            //更新表3-12附表10
            fpSpread1.Sheets[19].RowCount = 0;
            fpSpread1.Sheets[19].ColumnCount = 0;
            sh312_10.Build(fpSpread1.Sheets[19],year,ProjID,area_key_id,SxXjName);
            //更新表3-13
            fpSpread1.Sheets[20].RowCount = 0;
            fpSpread1.Sheets[20].ColumnCount = 0;
            sh313.Build(fpSpread1.Sheets[20], year, ProjID, SxXjName);
            //更新表3-13附表11
            fpSpread1.Sheets[21].RowCount = 0;
            fpSpread1.Sheets[21].ColumnCount = 0;
            sh313_11.Build(fpSpread1.Sheets[21], year, ProjID, area_key_id, SxXjName);
            //更新表3-14
            sh314.SaveData(fpSpread1.Sheets[22]);
            fpSpread1.Sheets[22].RowCount = 0;
            fpSpread1.Sheets[22].ColumnCount = 0;
            sh314.Build(fpSpread1.Sheets[22], year, ProjID, SxXjName);
            sh314.WriteData(fpSpread1.Sheets[22]);
            //更新表3-14附表12
            sh314_12.SaveData(fpSpread1.Sheets[23]);
            fpSpread1.Sheets[23].RowCount = 0;
            fpSpread1.Sheets[23].ColumnCount = 0;
            sh314_12.Build(fpSpread1.Sheets[23], year, ProjID, area_key_id, SxXjName);
            sh314_12.WriteData(fpSpread1.Sheets[23]);
            //更新表3-15
            fpSpread1.Sheets[24].RowCount = 0;
            fpSpread1.Sheets[24].ColumnCount = 0;
            sh315.Build(fpSpread1,fpSpread1.Sheets[24], year, ProjID, SxXjName);
            //更新表3-15附表14
            fpSpread1.Sheets[25].RowCount = 0;
            fpSpread1.Sheets[25].ColumnCount = 0;
            sh315_14.Build(fpSpread1.Sheets[25], year, ProjID, area_key_id, SxXjName);
            //更新表3-16
            fpSpread1.Sheets[26].RowCount = 0;
            fpSpread1.Sheets[26].ColumnCount = 0;
            sh316.Build(fpSpread1.Sheets[26], year, ProjID, SxXjName);
            //更新表3-16附表16
            fpSpread1.Sheets[27].RowCount = 0;
            fpSpread1.Sheets[27].ColumnCount = 0;
            sh316_16.Build(fpSpread1.Sheets[27], year, ProjID, area_key_id, SxXjName);
            //更新表3-17
            sh317.SaveData(fpSpread1.Sheets[28]);
            fpSpread1.Sheets[28].RowCount = 0;
            fpSpread1.Sheets[28].ColumnCount = 0;
            sh317.Build(fpSpread1.Sheets[28], year, ProjID, SxXjName);
            sh317.WriteData(fpSpread1.Sheets[28]);
            //更新表3-17附表17
            sh317_17.SaveData(fpSpread1.Sheets[29]);
            fpSpread1.Sheets[29].RowCount = 0;
            fpSpread1.Sheets[29].ColumnCount = 0;
            sh317_17.Build(fpSpread1.Sheets[29], year, ProjID, area_key_id, SxXjName);
            sh317_17.WriteData(fpSpread1.Sheets[29]);
            //更新表3-18全部手写,无电压等级,表格固定无需更新
            //表为fpSpread1.Sheets[30]
            //更新表3-18附表19(分区有可能更新,所以要保存原数据更新后写回)
            sh318_19.SaveData(fpSpread1.Sheets[31]);
            fpSpread1.Sheets[31].RowCount = 0;
            fpSpread1.Sheets[31].ColumnCount = 0;
            sh318_19.Build(fpSpread1.Sheets[31], year, ProjID, area_key_id, SxXjName);
            sh318_19.WriteData(fpSpread1.Sheets[31]);
            //更新表3-19
            fpSpread1.Sheets[32].RowCount = 0;
            fpSpread1.Sheets[32].ColumnCount = 0;
            sh319.Build(fpSpread1.Sheets[32], year, ProjID, SxXjName);
            //更新表3-19附表20
            fpSpread1.Sheets[33].RowCount = 0;
            fpSpread1.Sheets[33].ColumnCount = 0;
            sh319_20.Build(fpSpread1.Sheets[33], year, ProjID, area_key_id, SxXjName);
            //更新表3-20全部手写,无电压等级,表格固定无需更新
            //表为fpSpread1.Sheets[34]
            //更新表3-20附表21(分区有可能更新,所以要保存原数据更新后写回)
            sh320_21.SaveData(fpSpread1.Sheets[35]);
            fpSpread1.Sheets[35].RowCount = 0;
            fpSpread1.Sheets[35].ColumnCount = 0;
            sh320_21.Build(fpSpread1.Sheets[35], year, ProjID, area_key_id, SxXjName);
            sh320_21.WriteData(fpSpread1.Sheets[35]);

            //移除空表
            fpSpread1.Sheets.Remove(activesheet);
            //还原当前表
            fpSpread1.ActiveSheet = obj_sheet;
            //设文本自动换行
            fc.Sheet_Colautoenter(fpSpread1);
            newwait.Close();
            MessageBox.Show("更新数据完成!");
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:101,代码来源:FrmPDWXZ.cs

示例7: AddData

        /// <summary>
        /// 加载数据同时保存数据到指定位置
        /// </summary>
        /// <param name="obj"></param>
        private void AddData(FarPoint.Win.Spread.FpSpread obj)
        {
            wait = new WaitDialogForm("", "正在加载数据, 请稍候...");
            try
            {
                //打开Excel表格
                //清空工作表

                fpSpread1.Sheets.Clear();
                obj.OpenExcel(System.Windows.Forms.Application.StartupPath + "\\xls\\附表30 本地区“十二五”规划项目资金需求表.xls");
                PF.SpreadRemoveEmptyCells(obj);
                //this.AddCellChanged();
                //this.barEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                //S4_2_1.AddBarEditItems(this.barEditItem2, this.barEditItem1, this);
            }
            catch (System.Exception e)
            {
                //如果打开出错则重新生成并保存
                LoadData();
                //判断文件夹是否存在,不存在则创建
                if (!Directory.Exists(System.Windows.Forms.Application.StartupPath + "\\xls"))
                {
                    Directory.CreateDirectory(System.Windows.Forms.Application.StartupPath + "\\xls");
                }
                //保存EXcel文件
                obj.SaveExcel(System.Windows.Forms.Application.StartupPath + "\\xls\\附表30 本地区“十二五”规划项目资金需求表.xls", FarPoint.Excel.ExcelSaveFlags.NoFlagsSet);
                // 定义要使用的Excel 组件接口
                // 定义Application 对象,此对象表示整个Excel 程序
                Microsoft.Office.Interop.Excel.Application excelApp = null;
                // 定义Workbook对象,此对象代表工作薄
                Microsoft.Office.Interop.Excel.Workbook workBook;
                // 定义Worksheet 对象,此对象表示Execel 中的一张工作表
                Microsoft.Office.Interop.Excel.Worksheet ws = null;
                Microsoft.Office.Interop.Excel.Range range = null;
                excelApp = new Microsoft.Office.Interop.Excel.Application();
                string filename = System.Windows.Forms.Application.StartupPath + "\\xls\\附表30 本地区“十二五”规划项目资金需求表.xls";
                workBook = excelApp.Workbooks.Open(filename, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
                for (int i = 1; i <= workBook.Worksheets.Count; i++)
                {

                    ws = (Microsoft.Office.Interop.Excel.Worksheet)workBook.Worksheets[i];
                    //取消保护工作表

                    ws.Unprotect(Missing.Value);
                    //有数据的行数
                    int row = ws.UsedRange.Rows.Count;
                    //有数据的列数
                    int col = ws.UsedRange.Columns.Count;
                    //创建一个区域

                    range = ws.get_Range(ws.Cells[1, 1], ws.Cells[row, col]);
                    //设区域内的单元格自动换行
                    range.WrapText = true;
                    //保护工作表

                    ws.Protect(Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
                }
                //保存工作簿

                workBook.Save();
                //关闭工作簿

                excelApp.Workbooks.Close();
            }
            wait.Close();
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:70,代码来源:FrmPlannedProjectAmount.cs

示例8: barButtonItem30_ItemClick

        private void barButtonItem30_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            WaitDialogForm wait = null;
            WordBuilder wb = new WordBuilder();
            wb.InsertFromFile("Very.doc");

            //TONLI.BZH.UI.DSOFramerWordControl wb = new DSOFramerWordControl();
            try
            {
                wait = new WaitDialogForm("", "���ڵ���, ���Ժ�...");

                IList<LayoutContent> ls = Services.BaseService.GetList<LayoutContent>("SelectLayoutContentByLayoutIDBlogData", layoutUID);
                System.Data.DataTable dts = DataConverter.ToDataTable((IList)ls, typeof(LayoutContent));

                //IList<byte[]> lbt = new List<byte[]>();

                IList<LayoutContent> lbt = new List<LayoutContent>();

                InitExe("", dts, lbt);
                GetTop(layoutUID + "|1", wb);

                object obj = "���� 1";

                Style testStyle = wb.wordApp.Application.ActiveDocument.Styles.get_Item(ref obj);
                object listObject = testStyle;
                wb.wordApp.Selection.set_Style(ref listObject);

                InitAdd(lbt, wb);
                GetTop(layoutUID + "|2", wb);

                //IList<LayoutContent> lbt = new List<LayoutContent>();
                //InitExe("", dts, lbt);
                //GetTop(layoutUID + "|1", wb);
                //InitAdd(lbt, wb);
                //GetTop(layoutUID + "|2", wb);
            }
            catch
            {
                wb.Dispose();
                wait.Close();
                MsgBox.Show("����ʧ��");
                return;
            }
            wait.Close();

            string fname = "";
            saveFileDialog1.Filter = "Microsoft word (*.doc)|*.doc";
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {

                fname = saveFileDialog1.FileName;
                wb.Save(fname, true);
                wb.Dispose();
                if (MsgBox.ShowYesNo("�����ɹ����Ƿ�򿪸��ĵ���") != DialogResult.Yes)
                    return;
                try
                {
                    System.Diagnostics.Process.Start(fname);
                }
                catch { }
            }
            else
            {

            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:66,代码来源:FrmLayoutContents.cs

示例9: treeList1_FocusedNodeChanged

        private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
        {
            if (treeList1.FocusedNode == null)
                return;

            string uid = treeList1.FocusedNode["UID"].ToString();
            LayoutContent obj = Services.BaseService.GetOneByKey<LayoutContent>(uid);
            WaitDialogForm wait=null;

            WordBuilder wb = new WordBuilder();
            //if (fb != null)
            //    wb.InsertFromStreamGzip(fb);

            try
            {
                wait = new WaitDialogForm("", "������������, ���Ժ�...");

                if (obj.Contents != null && obj.Contents.Length > 0)
                {
                    if (fb != null)
                    {
                        wb.InsertFromStreamGzip(obj.Contents);
                        dsoFramerWordControl1.FileData = wb.FileData;
                    }
                    else
                    {
                        dsoFramerWordControl1.FileDataGzip = obj.Contents;
                    }
                }
                else
                {
                    dsoFramerWordControl1.FileNew();
                }
                dsoFramerWordControl1.AxFramerControl.Menubar = true;
                wait.Close();
            }
            catch (Exception ex)
            {
                wait.Close();
            MessageBox.Show(ex.Message);

            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:43,代码来源:FrmLayoutContents.cs

示例10: barButtonItem12_ItemClick

        private void barButtonItem12_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            TreeListNode focusedNode = treeList1.FocusedNode;

            if (focusedNode == null)
            {
                return;
            }

            FormAddInfo_LangFang frm = new FormAddInfo_LangFang();
            frm.Text = "增加" + focusedNode.GetValue("L3") + "的子项目";
            frm.FlagId = typeFlag2;
            frm.ParentID = focusedNode.GetValue("ID").ToString();
            frm.Isupdate = false;
            if (frm.ShowDialog() == DialogResult.OK)
            {

                obj = frm.OBJ;
                TreeListColumn column = treeList1.Columns["L10"];
                CalculateSum(focusedNode, column, obj.L10, false);
              ////      LoadData();
              ////      FoucsLocation(psp_Type.ID, treeList1.Nodes);
                    //treeList1.RefreshDataSource();
                    //dataTable.Rows.Add(Itop.Common.DataConverter.ObjectToRow(psp_Type, dataTable.NewRow()));
                WaitDialogForm wait = null;

                try
                {
                    wait = new WaitDialogForm("", "正在计算数据, 请稍候...");
                    LoadDatadata();
                    wait.Close();
                   // MsgBox.Show("计算成功");

                }
                catch
                {
                    wait.Close();
                }

               //treeList1.FocusedNode.SetValue(treeList1.FocusedColumn.FieldName, lastEditValue);
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:42,代码来源:Form9_LangFang.cs

示例11: barButtonItem13_ItemClick

        private void barButtonItem13_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (treeList1.FocusedNode == null)
            {
                return;
            }

            //if (treeList1.FocusedNode.ParentNode == null)
            //{
            //    MsgBox.Show("一级项目名称不能修改!");
            //    return;
            //}
            if (treeList1.FocusedNode.HasChildren)
            {
                MsgBox.Show("此项目下有子项目,不允许修改此记录!");
                return;
            }
            FormAddInfo_LangFang frm = new FormAddInfo_LangFang();
            frm.FlagId = typeFlag2;
            frm.PowerUId =this.treeList1.FocusedNode.GetValue("ID").ToString();
            frm.Text = "修改项目";
            frm.Isupdate = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                int i = this.treeList1.FocusedNode.Id;

                WaitDialogForm wait = null;

                try
                {
                    wait = new WaitDialogForm("", "正在计算数据, 请稍候...");
                    LoadDatadata();
                    wait.Close();
                    //MsgBox.Show("计算成功");

                }
                catch
                {
                    wait.Close();
                }

                //obj = frm.OBJ;
                TreeListColumn column = treeList1.Columns["L10"];
                CalculateSum(treeList1.FindNodeByID(i).ParentNode, column, 0,true);

                ////try
                ////{
                ////    string id = treeList1.FocusedNode["ID"].ToString();
                ////    string flag22 = typeFlag2;

                ////    PSP_PowerProValues_LangFang pptss = new PSP_PowerProValues_LangFang();
                ////    pptss.ID = id;
                ////    pptss.Flag2 = flag22;

                ////    PSP_PowerProValues_LangFang psp_Type = Services.BaseService.GetOneByKey<PSP_PowerProValues_LangFang>(pptss);
                ////    psp_Type.L3 = frm.TypeTitle;
                ////psp_Type.Flag = frm.PowerType;
                ////Common.Services.BaseService.Update<PSP_PowerProValues_LangFang>(psp_Type);

                ////    if (psp_Type.Code != "")
                ////    {
                ////        LineInfo li3 = Services.BaseService.GetOneByKey<LineInfo>(psp_Type.Code);
                ////        if (li3 != null)
                ////        {
                ////            li3.LineName = psp_Type.L3;
                ////            Common.Services.BaseService.Update<LineInfo>(li3);
                ////        }

                ////        substation sb3 = Services.BaseService.GetOneByKey<substation>(psp_Type.Code);
                ////        if (sb3 != null)
                ////        {
                ////            sb3.EleName = psp_Type.L3;
                ////            Common.Services.BaseService.Update<substation>(sb3);
                ////        }
                ////    }

                ////    treeList1.FocusedNode.SetValue("L3", frm.TypeTitle);
                ////    FoucsLocation(id, treeList1.Nodes);
                ////}
                ////catch (Exception ex)
                ////{
                ////    //MsgBox.Show("修改出错:" + ex.Message);
                ////}
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:85,代码来源:Form9_LangFang.cs

示例12: treeList1_DoubleClick

        private void treeList1_DoubleClick(object sender, EventArgs e)
        {
            if (!EditRight)
                return;
            if (treeList1.FocusedNode == null)
                return;
            FormAddInfo_LangFang frm = new FormAddInfo_LangFang();
            frm.FlagId = typeFlag2;
            frm.PowerUId =this.treeList1.FocusedNode.GetValue("ID").ToString();
            frm.Text = "修改项目";
            frm.Isupdate = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                int i = this.treeList1.FocusedNode.Id;
                WaitDialogForm wait = null;

                try
                {
                    wait = new WaitDialogForm("", "正在计算数据, 请稍候...");
                    LoadDatadata();
                    wait.Close();
                   // MsgBox.Show("计算成功");

                }
                catch
                {
                    wait.Close();
                }
                TreeListColumn column = treeList1.Columns["L10"];
                CalculateSum(treeList1.FindNodeByID(i).ParentNode, column, 0, true);
            }
            //FormAddInfo_LangFang fep = new FormAddInfo_LangFang();
            //fep.FlagId = typeFlag2;
            //fep.PowerUId = treeList1.FocusedNode["ID"].ToString();
            //string uid1 = treeList1.FocusedNode["ID"].ToString();
            //LineInfo li = Common.Services.BaseService.GetOneByKey<LineInfo>(treeList1.FocusedNode["Code"].ToString());
            //if (li != null)
            //    fep.IsLine = true;
            //substation li1 = Common.Services.BaseService.GetOneByKey<substation>(treeList1.FocusedNode["ID"].ToString());
            //if (li1 != null)
            //    fep.IsPower = true;

            //if (fep.ShowDialog() == DialogResult.OK)
            //{
            //    LoadData();
            //    treeList1.ExpandAll();
            //    FoucsLocation(uid1, treeList1.Nodes);
            //}
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:49,代码来源:Form9_LangFang.cs

示例13: barButtonItem11_ItemClick

        private void barButtonItem11_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormAddInfo_LangFang fep = new FormAddInfo_LangFang();
            fep.FlagId = typeFlag2;
            fep.ParentID = "0";
            fep.Text = "增加项目";
            fep.Isupdate = false;
            if (fep.ShowDialog() == DialogResult.OK)
            {
                WaitDialogForm wait = null;

                try
                {
                    wait = new WaitDialogForm("", "正在计算数据, 请稍候...");
                    LoadDatadata();
                    wait.Close();
                  //  MsgBox.Show("计算成功");

                }
                catch
                {
                    wait.Close();
                }
            }
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:25,代码来源:Form9_LangFang.cs

示例14: ReLoadData

        private void ReLoadData()
        {
            if (this.ctrlPowerEachList1.FocusedObject == null)
                return;

            typeFlag2 = this.ctrlPowerEachList1.FocusedObject.UID;

            this.Cursor = Cursors.WaitCursor;
            treeList1.BeginUpdate();
            WaitDialogForm wait = null;
            updat = "true";
            try
            {
                wait = new WaitDialogForm("", "正在计算数据, 请稍候...");
                LoadDatadata();
                wait.Close();
                //MsgBox.Show("计算成功");

            }
            catch
            {
                wait.Close();
            }
            //LoadData();
            treeList1.EndUpdate();
            this.Cursor = Cursors.Default;
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:27,代码来源:Form9_LangFang.cs

示例15: GridView_FocusedRowChanged

        void GridView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            if (this.ctrlPowerEachList1.FocusedObject == null)
                return;

            typeFlag2 = this.ctrlPowerEachList1.FocusedObject.UID;
            ddd = DateTime.Now;
            sss = "1:" + ddd.ToString();
            this.Cursor = Cursors.WaitCursor;
            treeList1.BeginUpdate();
            WaitDialogForm wait = null;

            try
            {
                wait = new WaitDialogForm("", "正在计算数据, 请稍候...");
                InitSodata();
                wait.Close();
               // MsgBox.Show("计算成功");

            }
            catch
            {
                wait.Close();
            }
            //LoadData();
            treeList1.EndUpdate();
            this.Cursor = Cursors.Default;
        }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:28,代码来源:Form9_LangFang.cs


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