Ejemplo n.º 1
0
 public string GetFullName()
 {
     return(Modificators.GetMethodModificators(methodInfo) + GetSignature(this));;
 }
Ejemplo n.º 2
0
 public string GetFullName()
 {
     return(Modificators.GetClassModificators(type) + Name);
 }
Ejemplo n.º 3
0
 public string GetFullName()
 {
     return(Modificators.GetFieldModificators(fieldInfo) + Type + " " + Name);
 }
Ejemplo n.º 4
0
 public ModificatorsManager(Modificators modificators, InputKey inputKey, bool isUp)
 {
     _modificators = modificators;
     _inputKey     = inputKey;
     _isUp         = isUp;
 }
Ejemplo n.º 5
0
 void Awake()
 {
     instance = this;
 }
Ejemplo n.º 6
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (pc.Group.CountFigures == 2)
            {
                var f1 = pc.Group.Figures[0].Verteces;
                var f2 = pc.Group.Figures[1].Verteces;

                var t1 = pc.Group.Figures[0].Triangles;
                var t2 = pc.Group.Figures[1].Triangles;

                if (pc.IsAttenton)
                {
                    Modificators modificators = new Modificators(f1, f2);
                    modificators.Operation = Operations.Interset;

                    pc.res = modificators.Result();

                    Color fill   = pc.Group.Figures[1].FillColor;
                    Color border = pc.Group.Figures[1].BorderColor;

                    pc.Group.Clear();

                    if (pc.res.Count > 0)
                    {
                        Figure f = new Figure();

                        helper.DeleteDuplicats(pc.res);

                        f.Edges  = Helper.ConvertToEdges(pc.res);
                        f.Type   = TypeFigures.Polygon;
                        f.Center = helper.CalcCenter(pc.res);
                        f.TranslateToCenterCoordinates();
                        f.ReCalc();

                        f.FillColor   = fill;
                        f.BorderColor = border;

                        f.Id   = _core.Ids.ToString();
                        f.Name = "BoolenResult " + f.Id;
                        SetProperties(f);
                        _core.Add(f);

                        treeView1.Nodes.Clear();
                        treeView1.Nodes.AddRange(_core.NodesForTree());
                        treeView1.ExpandAll();

                        glControl1.Invalidate();
                    }
                }
                else
                {
                    trianglesBool = new TrianglesBool(t1, t2, f1, f2, Operations.Interset);
                    pc.res        = trianglesBool.Result();

                    Color fill   = pc.Group.Figures[1].FillColor;
                    Color border = pc.Group.Figures[1].BorderColor;

                    pc.Group.Clear();

                    if (pc.res.Count > 0)
                    {
                        Figure f = new Figure();

                        helper.DeleteDuplicats(pc.res);

                        f.Edges  = Helper.ConvertToEdges(pc.res);
                        f.Type   = TypeFigures.Polygon;
                        f.Center = helper.CalcCenter(pc.res);
                        f.TranslateToCenterCoordinates();
                        f.ReCalc();

                        f.FillColor   = fill;
                        f.BorderColor = border;

                        f.Id   = _core.Ids.ToString();
                        f.Name = "TriangleBoolenResult " + f.Id;
                        SetProperties(f);
                        _core.Add(f);

                        treeView1.Nodes.Clear();
                        treeView1.Nodes.AddRange(_core.NodesForTree());
                        treeView1.ExpandAll();

                        glControl1.Invalidate();
                    }
                }
            }
        }
Ejemplo n.º 7
0
 public string GetFullName()
 {
     return(Type + " " + Name + " { " + Modificators.GetPropertyGetSetModificators(propInfo) + " }");
 }