Exemple #1
0
 private void BT_Regresar_Click(object sender, EventArgs e)
 {
     if (F_Base.Proyecto.Edificio.PisoSelect.Nervios != null)
     {
         if (F_Base.PropiedadesPrograma.DeshacerRehacer)
         {
             F_Base.EnviarEstado(F_Base.Proyecto);
         }
         List <cNervio> NerviosSelects = F_Base.Proyecto.Edificio.PisoSelect.Nervios.FindAll(x => x.SelectPlantaEnumeracion == true).ToList();
         List <int>     IDsAEliminar;
         if (NerviosSelects != null)
         {
             IDsAEliminar = NerviosSelects.Select(x => x.ID).ToList();
             NerviosSelects.ForEach(x => x.Lista_Objetos.ForEach(y => { F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.FindAll(z => z.Nombre == y.Line.Nombre && y.Soporte == eSoporte.Vano).ForEach(m => { m.isSelect = true; }); }));
             foreach (int ID in IDsAEliminar)
             {
                 F_Base.Proyecto.Edificio.PisoSelect.Nervios.Remove(F_Base.Proyecto.Edificio.PisoSelect.Nervios.Find(x => x.ID == ID));
             }
             int IDaRenombrar = 1;
             F_Base.Proyecto.Edificio.PisoSelect.Nervios.ForEach(y => { y.ID = IDaRenombrar; IDaRenombrar += 1; });
             cFunctionsProgram.RenombrarNervios(F_Base.Proyecto.Edificio.PisoSelect.Nervios, F_Base.Proyecto.Nomenclatura_Hztal, F_Base.Proyecto.Nomenclatura_Vert);
         }
     }
     PB_ElementosNoEnumerados.Invalidate();
     PB_ElementosEnumerados.Invalidate();
 }
Exemple #2
0
 private void LV_Stories_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (LV_Stories.SelectedItems.Count > 0)
     {
         F_Base.Proyecto.DatosEtabs.PisoSelect = F_Base.Proyecto.DatosEtabs.Lista_Pisos.Find(x => x.Nombre == LV_Stories.SelectedItems[0].Text);
         F_Base.Proyecto.Edificio.PisoSelect   = F_Base.Proyecto.Edificio.Lista_Pisos.Find(x => x.Nombre == LV_Stories.SelectedItems[0].Text);
         LB_Title.Text = $"Enumeración de Elementos  | {F_Base.Proyecto.DatosEtabs.PisoSelect.Nombre}";
         PB_ElementosNoEnumerados.Invalidate(); PB_ElementosEnumerados.Invalidate();
     }
 }
Exemple #3
0
        private void BT_Enumerar_Click(object sender, EventArgs e)
        {
            if (F_Base.PropiedadesPrograma.DeshacerRehacer)
            {
                F_Base.EnviarEstado(F_Base.Proyecto);
            }

            F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.ForEach(x => x.IndiceConjuntoSeleccion = 0);
            List <cLine> LineasSeleccionadas = F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.FindAll(x => x.Select == true).ToList();

            CreaNervios(TB_Prefijo.Text, LineasSeleccionadas, TB_Nombre.Text);
            PB_ElementosEnumerados.Invalidate();
            PB_ElementosNoEnumerados.Invalidate();
        }
Exemple #4
0
 private void PB_ElementosNoEnumerados_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Middle && e.Clicks == 2)
     {
         Zoom = 1;
         Dx   = 0; Dy = 0;
         PB_ElementosNoEnumerados.Invalidate();
     }
     if (e.Button == MouseButtons.Middle)
     {
         DesXButton = e.X;
         DesYButton = e.Y;
     }
 }
Exemple #5
0
        private void BT_CrtierioFC_Click(object sender, EventArgs e)
        {
            cFunctionsProgram.Notificar("Cargando, Creando Nervios.");
            if (F_Base.PropiedadesPrograma.DeshacerRehacer)
            {
                F_Base.EnviarEstado(F_Base.Proyecto);
            }
            F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.ForEach(x => { x.IndiceConjuntoSeleccion = 0; x.isSelect = true; });
            F_Base.Proyecto.Edificio.Lista_Pisos.Find(x => x.Nombre == F_Base.Proyecto.DatosEtabs.PisoSelect.Nombre).Nervios = new List <cNervio>();
            List <cLine> LineasSeleccionadas = F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.FindAll(x => x.Type == eType.Beam && x.Seccion != null && x.Seccion.Nombre.Contains("N")).ToList();

            CreaNervios("N-", LineasSeleccionadas);
            PB_ElementosEnumerados.Invalidate();
            PB_ElementosNoEnumerados.Invalidate();
            cFunctionsProgram.Notificar("Listo.");
        }
Exemple #6
0
        private void PB_ElementosNoEnumerados_MouseWheel(object sender, MouseEventArgs e)
        {
            int vueltas = e.Delta;

            if (vueltas > 0)
            {
                Zoom += 0.5f;
                PB_ElementosNoEnumerados.Invalidate();
            }
            else
            {
                if (Zoom > 1)
                {
                    Zoom -= 0.5f;
                    PB_ElementosNoEnumerados.Invalidate();
                }
            }
        }
Exemple #7
0
        private void PB_ElementosNoEnumerados_MouseDown2(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                int IndiceMaximo = F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.Max(x => x.IndexSelect);
                F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.ForEach(y => { if (y.Type == eType.Beam)
                                                                                 {
                                                                                     y.MouseDownSelectLineEtabs(e, IndiceMaximo);
                                                                                 }
                                                                          });
                int   MaximoIndice = F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.Max(x => x.IndexSelect);
                cLine UltimaSelect = F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.Find(x => x.MouseInLineEtabs(e.Location));

                if (UltimaSelect != null && SeleccionInteligente)
                {
                    cFunctionsProgram.SeleccionInteligente(UltimaSelect, F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.FindAll(x => x.Type == eType.Beam).ToList(), UltimaSelect.IndexSelect, UltimaSelect.Select);
                }
            }
            PB_ElementosNoEnumerados.Invalidate();
        }
Exemple #8
0
        private void PB_ElementosNoEnumerados_MouseMove(object sender, MouseEventArgs e)
        {
            Cursor CursorArraste = new Cursor(Properties.Resources.Arrastre16x16.Handle);
            //Cursor CursorDefault = new Cursor(Properties.Resources.DefaultCursor2x16.Handle);
            Cursor CursorDefault = Cursors.Default;
            Cursor cursor        = CursorDefault;

            if (e.Button == MouseButtons.Middle)
            {
                float DesplazX = (Dx) + (e.X - DesXButton);
                float DesplazY = (Dy) + (e.Y - DesYButton);
                Dx         = DesplazX;
                Dy         = DesplazY;
                DesXButton = e.X;
                DesYButton = e.Y;
                cursor     = CursorArraste;
                PB_ElementosNoEnumerados.Invalidate();
            }
            PB_ElementosNoEnumerados.Cursor = cursor;
        }
Exemple #9
0
 private void F_EnumeracionPortico_Paint(object sender, PaintEventArgs e)
 {
     CargarListView();
     PB_ElementosNoEnumerados.Invalidate();
     PB_ElementosEnumerados.Invalidate();
 }
Exemple #10
0
 private void limpirarSeleccionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     F_Base.Proyecto.DatosEtabs.PisoSelect.Lista_Lines.ForEach(x => { x.Select = false; x.IndexSelect = 0; });
     PB_ElementosNoEnumerados.Invalidate();
 }