Example #1
0
 private void SetEmergencyLinkageList_FormClosing(object sender, FormClosingEventArgs e)
 {
     StaticClass.SystemOut = true;
     if (groupControlForm.Controls.Count > 0)
     {
         GraphDrawingRefresh itemForm = groupControlForm.Controls[0] as GraphDrawingRefresh;
         itemForm.Close();
         itemForm.Dispose();
     }
 }
Example #2
0
        private void listBoxControlLargedataModule_Click(object sender, EventArgs e)
        {
            DevExpress.Utils.WaitDialogForm wdf = new DevExpress.Utils.WaitDialogForm("正在打开应急联动展示窗口...", "请等待...");
            try
            {
                var selectitem = this.listBoxControlLargedataModule.SelectedValue;

                ListBoxControl ctlListBox = sender as ListBoxControl;
                if (selectitem != null)
                {
                    selectid = selectitem.ToString();
                    if (selectid != null)
                    {
                        var jsonStr = RefreshRealPoint();

                        if (graphDrawingRefresh == null)
                        {
                            graphDrawingRefresh = null;
                            graphDrawingRefresh = new GraphDrawingRefresh(jsonStr.ToString(), selectid);
                            graphDrawingRefresh.FormBorderStyle = FormBorderStyle.None;
                            graphDrawingRefresh.MaximizeBox     = false;
                            graphDrawingRefresh.MinimizeBox     = false;
                            graphDrawingRefresh.TopLevel        = false;
                            graphDrawingRefresh.ControlBox      = false;
                            graphDrawingRefresh.WindowState     = FormWindowState.Normal;
                            graphDrawingRefresh.Visible         = true;
                            graphDrawingRefresh.Dock            = DockStyle.Fill;
                        }
                        else
                        {
                            graphDrawingRefresh.GraphOpt.refPointssz.SysEmergencyLinkageInfoId = selectid;
                            graphDrawingRefresh.RefreshEmergencyLinkMap(jsonStr);
                            graphDrawingRefresh.RefreshEmergencyLinkMap();
                        }

                        if (groupControlForm.Controls.Count == 0)
                        {
                            groupControlForm.Controls.Add(graphDrawingRefresh);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Info(string.Format("加载应急联动展示窗口出错, 错误消息:{0}", ex.Message));
                XtraMessageBox.Show("加载应急联动展示窗口出错, 错误消息:\n" + ex.Message, "加载窗口", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            finally
            {
                wdf.Close();
            }
        }