예제 #1
0
        protected override void Dispose(bool disposing)
        {
            PerspectiveResultCtrl ctrl = this.Window as PerspectiveResultCtrl;

            // clear?
            base.Dispose(disposing);
        }
예제 #2
0
        private void GraphClick(object sender, EventArgs e)
        {
            ReportQueryItemPathResult graphItem = ((ReportQueryItemPathResult)sender);
            PerspectiveGraphCtrl      viewGraph = null;

            if (_graphWin != null)
            {
                viewGraph = _graphWin.Window as PerspectiveGraphCtrl;
                if (viewGraph != null)
                {
                    viewGraph.SelectedPath = viewGraph.FindPath(graphItem.QueryItem);
                    DrawingHelper.SelectedPathItemUniqueID = graphItem.UniqueID;
                    DrawingHelper.isEdgeSelected           = false;
                    if (viewGraph.MsGalViewer != null)
                    {
                        viewGraph.MsGalViewer.Refresh();
                        viewGraph.MsGalViewer.ResumeLayout();
                        viewGraph.MsGalViewer.Update();
                    }
                    viewGraph.BindData();
                }
            }

            #region [Bind path view]
            if (_pathWin != null)
            {
                IPerspectivePathView viewPath = _pathWin.Window as IPerspectivePathView;
                viewPath.PathButtonClickHandler = PathButtonClick;

                viewPath.QueryItemResult = graphItem.QueryItem;

                viewPath.BindData(graphItem.NodeId);

                showView(_pathWin);
            }
            #endregion

            PerspectiveResultCtrl viewResult = _resultWin.Window as PerspectiveResultCtrl;
            viewResult.MarkRowAsSelected(graphItem.QueryItem.PathId);

            ShowFile(graphItem.FileName, graphItem.Line, graphItem.Column, graphItem.Length);
        }
예제 #3
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
        }