protected override void Dispose(bool disposing)
        {
            PerspectiveGraphCtrl ctrl = this.Window as PerspectiveGraphCtrl;

            ctrl.ClearGraphView();
            base.Dispose(disposing);
        }
Beispiel #2
0
        private void ShowProblemFile(CxViewerAction.Entities.WebServiceEntity.TreeNodeData treeNode)
        {
            #region [Bind graph view]

            try
            {
                PerspectiveGraphCtrl viewGraph = null;
                if (_graphWin != null)
                {
                    viewGraph = _graphWin.Window as PerspectiveGraphCtrl;
                    if (viewGraph != null)
                    {
                        viewGraph.ClearGraphView();
                        viewGraph.Graph        = null;
                        viewGraph.SelectedPath = null;
                        viewGraph.Graph        = new Graph(treeNode);
                        viewGraph.MsGalViewer.Refresh();
                        viewGraph.MsGalViewer.ResumeLayout();
                        viewGraph.MsGalViewer.Update();
                        viewGraph.BindData();
                        viewGraph.PathItemClick = GraphClick;
                    }

                    showView(_graphWin);
                }

                #endregion

                #region [Bind result view]
                if (_resultWin != null)
                {
                    PerspectiveResultCtrl viewResult = _resultWin.Window as PerspectiveResultCtrl;

                    viewResult.SelectedNode = treeNode;
                    //if (!_resultWin.Visible || viewResult.IsActive)
                    //{
                    if (!wasInit)
                    {
                        viewResult.SelectedRowChanged += new EventHandler(viewResult_SelectedRowChanged);
                        viewResult.Refresh            += new EventHandler(viewResult_Refresh);
                        wasInit = true;
                    }
                    // _resultWin.Visible = true;
                    viewResult.IsActive = false;
                    viewResult.SelectRow();
                    //}

                    showView(_resultWin);
                }
            }
            catch (Exception ex)
            {
                if (ex is System.Net.WebException)
                {
                    Logger.Create().Error(ex.ToString());
                    TopMostMessageBox.Show(ex.Message, "Error");
                }
                else
                {
                    Logger.Create().Error(ex.ToString());
                    TopMostMessageBox.Show("General error occured, please check the log", "Error");
                }
            }
            #endregion
        }