Esempio n. 1
0
        public static LineByEquation CreateLineByEquation(Drawing drawing, string a, string b, string c)
        {
            var result = new LineByEquation()
            {
                Drawing = drawing
            };
            var equation = new GeneralFormLineEquation(result, a, b, c);

            result.Equation = equation;
            equation.Recalculate();
            return(result);
        }
Esempio n. 2
0
        public static LineByEquation CreateLineByEquation(Drawing drawing, string m, string b)
        {
            var result = new LineByEquation()
            {
                Drawing = drawing
            };
            var equation = new SlopeInterseptLineEquation(result, m, b);

            result.Equation = equation;
            equation.Recalculate();
            return(result);
        }
Esempio n. 3
0
        public static ILineEquation Read(LineByEquation parent, XElement element)
        {
            var m = element.ReadString("m");
            var b = element.ReadString("b");
            var A = element.ReadString("A");
            var B = element.ReadString("B");
            var C = element.ReadString("C");

            ILineEquation result = null;

            if (!m.IsEmpty() && !b.IsEmpty())
            {
                result = new SlopeInterseptLineEquation(parent, m, b);
            }
            else if (!A.IsEmpty() && !B.IsEmpty() && !C.IsEmpty())
            {
                result = new GeneralFormLineEquation(parent, A, B, C);
            }

            return(result);
        }
Esempio n. 4
0
 public static LineByEquation CreateLineByEquation(Drawing drawing, string a, string b, string c)
 {
     var result = new LineByEquation() { Drawing = drawing };
     var equation = new GeneralFormLineEquation(result, a, b, c);
     result.Equation = equation;
     equation.Recalculate();
     return result;
 }
Esempio n. 5
0
 public static LineByEquation CreateLineByEquation(Drawing drawing, string m, string b)
 {
     var result = new LineByEquation() { Drawing = drawing };
     var equation = new SlopeInterseptLineEquation(result, m, b);
     result.Equation = equation;
     equation.Recalculate();
     return result;
 }
Esempio n. 6
0
        public static ILineEquation Read(LineByEquation parent, XElement element)
        {
            var m = element.ReadString("m");
            var b = element.ReadString("b");
            var A = element.ReadString("A");
            var B = element.ReadString("B");
            var C = element.ReadString("C");

            ILineEquation result = null;

            if (!m.IsEmpty() && !b.IsEmpty())
            {
                result = new SlopeInterseptLineEquation(parent, m, b);
            }
            else if (!A.IsEmpty() && !B.IsEmpty() && !C.IsEmpty())
            {
                result = new GeneralFormLineEquation(parent, A, B, C);
            }

            return result;
        }