Exemplo n.º 1
0
        public void glOnLeftMouseDown(object sender, MouseEventArgs e)
        {
            isLeftDrag = true;
            PO pt = Map_to_Space(e.X, e.Y);

            p_tags = pt;
            this.PlotGLKey();
            if (ADD_MODEL_vwell)
            {
                Clear();
                c.Create_Vertical_Well(pt);
                c.START_form(this);
                ADD_MODEL_vwell = false;
                Delaunay_2D de = new Delaunay_2D();
                de.GetOGL(this);
                de.Get_initialpl(c.initial_pl);
                de.Get_initial_center(c.center);
                de.GetPL(c.Get_p_l());
                de.Start();
                this.PlotGLKey();
            }
            else if (ADD_MODEL_fault)
            {
                ;
            }
            else if (ADD_MODEL_hwell)
            {
                ;
            }
            else
            {
                Seek_Special_PO(pt);
            }
        }
Exemplo n.º 2
0
        public void glOnLeftMouseUp(object sender, MouseEventArgs e)
        {
            isLeftDrag = false;
            PO pt = Map_to_Space(e.X, e.Y);

            if (p_tags != null)
            {
                if (ADD_MODEL_vwell)
                {
                    Clear();
                    c.Create_Vertical_Well(pt);
                    c.START_form(this);
                    ADD_MODEL_vwell = false;
                    Delaunay_2D de = new Delaunay_2D();
                    de.GetOGL(this);
                    de.Get_initialpl(c.initial_pl);
                    de.Get_initial_center(c.center);
                    de.GetPL(c.Get_p_l());
                    de.Start();
                    this.PlotGLKey();
                    return;
                }
                else if (ADD_MODEL_fault)
                {
                    LINE l0 = new LINE(p_tags, pt);
                    Clear();
                    c.Create_fault(l0);
                    c.START_form(this);
                    p_tags          = null;
                    ADD_MODEL_fault = false;
                    l_tag           = null;
                    Delaunay_2D de = new Delaunay_2D();
                    de.GetOGL(this);
                    de.Get_initialpl(c.initial_pl);
                    de.Get_initial_center(c.center);
                    de.GetPL(c.Get_p_l());
                    de.Start();
                    this.PlotGLKey();
                    return;
                }
                else if (ADD_MODEL_hwell)
                {
                    LINE l0 = new LINE(p_tags, pt);
                    Clear();
                    c.Create_h_well2d(l0);
                    c.START_form(this);
                    p_tags          = null;
                    ADD_MODEL_hwell = false;
                    l_tag           = null;
                    Delaunay_2D de = new Delaunay_2D();
                    de.GetOGL(this);
                    de.Get_initialpl(c.initial_pl);
                    de.Get_initial_center(c.center);
                    de.GetPL(c.Get_p_l());
                    de.Start();
                    this.PlotGLKey();
                    return;
                }
                else if (p_tags.key == 1 || p_tags.key == 2)
                {
                    p_tags.x = pt.x;
                    p_tags.y = pt.y;
                    Clear();
                    c.START_form(this);
                    Delaunay_2D de = new Delaunay_2D();
                    de.GetOGL(this);
                    de.Get_initialpl(c.initial_pl);
                    de.Get_initial_center(c.center);
                    de.GetPL(c.Get_p_l());
                    de.Start();
                    this.PlotGLKey();
                }
            }
        }