コード例 #1
0
ファイル: PlotsForm.cs プロジェクト: wangyakai01/APSIMClassic
        /// <summary>
        /// constructor
        /// </summary>
        public PlotsForm(GraphUI2 C)
        {
            InitializeComponent();

            UserChange = false;
            Chart      = C;
            foreach (DataTable Table in C.DataSources)
            {
                DataList.Items.Add(Table.TableName);
            }
            CreateGalleryOnPage("Standard", Standard);
            CreateGalleryOnPage("Extended", Extended);
            CreateGalleryOnPage("Financial", Financial);
            CreateGalleryOnPage("Other", Other);

            // Select the first data item.
            if (DataList.Items.Count > 0)
            {
                DataList.SelectedItem = DataList.Items[0];
                FillDataGrid();
            }

            // Make the X list box the current listbox.
            CurrentListBox           = X;
            CurrentListBox.BackColor = SystemColors.Highlight;
            CurrentListBox.ForeColor = SystemColors.HighlightText;
            UserChange = true;

            OnGalleryChartChange(null, null);
        }
コード例 #2
0
 public AddSeriesForm(TChart c, DataTable D, GraphUI2 parentGraph)
 {
     // Constructor
     InitializeComponent();
     Chart             = c;
     Data              = D;
     ParentGraph       = parentGraph;
     Series            = c.Series.Add(new Line());
     Series.DataSource = Data;
 }
コード例 #3
0
        public override void OnRefresh()
        {
            base.OnRefresh();

            XmlDocument Doc = new XmlDocument();

            Doc.LoadXml(Controller.Selection.FullXML());
            AllData = Doc.DocumentElement;

            Panel.Controls.Clear();
            foreach (XmlNode GraphNode in XmlHelper.ChildNodes(AllData, ""))
            {
                string GraphNodePath     = NodePath + "/" + XmlHelper.Name(GraphNode);
                ApsimFile.Component Comp = Controller.ApsimData.Find(GraphNodePath);

                if (GraphNode.Name == "Graph")
                {
                    GraphUI Graph = new GraphUI();
                    Graph.Parent = Panel;
                    Graph.OnLoad(Controller, GraphNodePath, Comp.Contents);
                }
                if (GraphNode.Name == "Graph2")
                {
                    GraphUI2 Graph = new GraphUI2();
                    Graph.Parent = Panel;
                    Graph.OnLoad(Controller, GraphNodePath, Comp.Contents);
                }
                if (GraphNode.Name == "RegressionGraph")
                {
                    RegressionGraphUI Graph = new RegressionGraphUI();
                    Graph.Parent = Panel;
                    Graph.OnLoad(Controller, GraphNodePath, Comp.Contents);
                }
            }

            PositionAndRefreshGraphs();
        }
コード例 #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="C"></param>
 public GraphPropertyForm(GraphUI2 C)
 {
     InitializeComponent();
     Chart = C;
 }