Example #1
0
        public void ShowGraph()
        {
            IEnumerable <FoldChangeBarGraph> barGraphs;

            if (null != DockPanel)
            {
                barGraphs = DockPanel.Contents.OfType <FoldChangeBarGraph>();
            }
            else
            {
                barGraphs = FormUtil.OpenForms.OfType <FoldChangeBarGraph>();
            }
            foreach (var form in barGraphs)
            {
                if (SameBindingSource(form))
                {
                    form.Activate();
                    return;
                }
            }
            var graph = new FoldChangeBarGraph();

            graph.SetBindingSource(FoldChangeBindingSource);
            if (null != Pane)
            {
                graph.Show(Pane, null);
            }
            else
            {
                graph.Show(Owner);
            }
        }
Example #2
0
 public void ShowGraph()
 {
     IEnumerable<FoldChangeBarGraph> barGraphs;
     if (null != DockPanel)
     {
         barGraphs = DockPanel.Contents.OfType<FoldChangeBarGraph>();
     }
     else
     {
         barGraphs = Application.OpenForms.OfType<FoldChangeBarGraph>();
     }
     foreach (var form in barGraphs)
     {
         if (SameBindingSource(form))
         {
             form.Activate();
             return;
         }
     }
     var graph = new FoldChangeBarGraph();
     graph.SetBindingSource(FoldChangeBindingSource);
     if (null != Pane)
     {
         graph.Show(Pane, null);
     }
     else
     {
         graph.Show(Owner);
     }
 }