Example #1
0
 private void UpdatePropertyGrid()
 {
     GraphNodeForm.GetInstance().RefreshUI();
     //GraphViewWindow w = this.ActiveMdiChild as GraphViewWindow;
     //if (w != null)
     //{
     //    GraphNodeForm.GetInstance().View = w.ActiveControl as GoView;
     //}
 }
Example #2
0
        private void LoadSubForm()
        {
            #region GraphViewWindow init
            var views = GraphViewWindow.OpenAll();
            foreach (var item in views)
            {
                LoadUserObject(item);
            }
            #endregion

            int index = -1;
            try
            {
                mdockPanel.LoadFromXml(@".\Config\DockPanel.config", delegate(string persistString)
                {
                    if (persistString == typeof(LogForm).ToString())
                    {
                        return(LogForm.Instance);
                    }
                    if (persistString == typeof(GraphViewWindow).ToString())
                    {
                        index++;
                        if (views.Count > index)
                        {
                            return(views[index]);
                        }
                        return(null);
                    }
                    if (User == UserType.Administrator)
                    {
                        if (persistString == typeof(FlowCharter.PaletteForm).ToString())
                        {
                            return(FlowCharter.PaletteForm.GetInstance());
                        }
                        if (persistString == typeof(GraphNodeForm).ToString())
                        {
                            return(GraphNodeForm.GetInstance());
                        }
                    }
                    return(null);
                });

                for (index++; index < views.Count; index++)
                {
                    views[index].Show(mdockPanel, DockState.Float);
                }
            }
            catch (Exception)
            {
            }
            UpdateFlowInfo();
        }
Example #3
0
        //protected override void OnMdiChildActivate(EventArgs evt)
        //{
        //    base.OnMdiChildActivate(evt);
        //    GraphViewWindow w = dockPanel1.ActiveContent as GraphViewWindow;//this.ActiveMdiChild as GraphViewWindow;
        //    if (w != null)
        //    {
        //        GraphNodeForm.GetInstance().View = w.ActiveControl as GoView;
        //        w.View.UpdateFormInfo();
        //    }
        //}

        private void DockPanel1_ActiveContentChanged(object sender, EventArgs e)
        {
            GraphViewWindow w = mdockPanel.ActiveContent as GraphViewWindow;

            if (w != null /*&& w.ActiveControl as GoView !=null*/)
            {
                GoView goView = w.ActiveControl as GoView;
                if (goView == null)
                {
                    return;
                }
                GraphNodeForm.GetInstance().View = goView;
                w.View.UpdateFormInfo();
            }
        }
Example #4
0
 private void Btn_Param_Click(object sender, EventArgs e)
 {
     GraphNodeForm.GetInstance().Show(mdockPanel, DockState.DockRight);
 }