示例#1
0
        public void CorrectData(int width, int height, string toString)
        {
            GraphSizes testObject = new GraphSizes(width, height);

            Assert.Equal(width, testObject.Width);
            Assert.Equal(height, testObject.Height);
            Assert.Equal(toString, testObject.ToString());
        }
        public void CorrectData(string graphTitle, GraphSizes graphSizes, Color graphColor, GraphAxis graphAxis, string toString)
        {
            GraphSettings testObject = new GraphSettings(graphTitle, graphSizes, graphColor, graphAxis);

            Assert.Equal(graphTitle, testObject.Title);
            Assert.Equal(graphSizes, testObject.Sizes);
            Assert.Equal(graphColor, testObject.GraphColor);
            Assert.Equal(graphAxis, testObject.Axis);
            Assert.Equal(toString, testObject.ToString());
        }
示例#3
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            int width  = 0;
            int height = 0;

            DA.GetData(0, ref width);
            DA.GetData(1, ref height);

            GraphSizes graphSizes = new GraphSizes(width, height);

            DA.SetData(0, graphSizes);
        }
示例#4
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            string     graphTitle = string.Empty;
            GraphSizes graphSizes = null;
            Color      graphColor = Color.Empty;
            GraphAxis  graphAxis  = null;

            DA.GetData(0, ref graphTitle);
            DA.GetData(1, ref graphSizes);
            DA.GetData(2, ref graphColor);
            DA.GetData(3, ref graphAxis);

            GraphSettings graphSettings = new GraphSettings(graphTitle, graphSizes, graphColor, graphAxis);

            DA.SetData(0, graphSettings);
        }