Exemplo n.º 1
0
        public static TreeNode CrearNodoPuntoAcceso(PuntoAcceso p)
        {
            TreeNode n0;

            n0      = new TreeNode();
            n0.Tag  = p;
            n0.Name = p.Nombre;
            n0.Text = p.Nombre;
            return(n0);
        }
Exemplo n.º 2
0
        public controlPropiedadesUGE(PuntoAcceso puntoAcceso, IUnidadGeoEstadistica uge, object restriccion)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            this._puntoAcceso = puntoAcceso;
            this._uge         = uge;
            this._restriccion = restriccion;
            this.lstPropiedades.SmallImageList   = this.lstPropiedades.LargeImageList = this.imageList1;
            this.lstPropiedades.ShowItemToolTips = true;
            this.lstPropiedades.BackColor        = System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.InactiveCaption);
            this.lstPropiedades.Items.Add(_lviWait);
        }
Exemplo n.º 3
0
        public controlArbolEspacios(TreeNode n)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            ToolTip tt = new ToolTip();

            tt.AutoPopDelay = 5000;
            tt.InitialDelay = 1000;
            tt.ReshowDelay  = 500;
            tt.ShowAlways   = true;
            tt.SetToolTip(this.txDesc, "Presiona 'Esc' para recuperar la descripción inicial");
            tt.SetToolTip(this.txComent, "Presiona 'Esc' para recuperar el comentario inicial");

            this._nodo         = n;
            this._puntoAcceso  = (PuntoAcceso)n.Tag;
            this.txDesc.Text   = descInicial = _puntoAcceso.Descripcion;
            this.txComent.Text = docInicial = _puntoAcceso.Doc;

            this.lProps.DataSource    = this._puntoAcceso.Propiedades.Items;
            this.lProps.DisplayMember = "Titulo";
            this.lProps.ValueMember   = "Titulo";

            if (this._puntoAcceso.Propiedades.Items.Count == 0)
            {
                this.splitContainer1.Panel2.Enabled = false;
            }
            else
            {
                this.BindProperty(this._puntoAcceso.Propiedades.Items[0]);
                this.lProps.SelectedItem = this._puntoAcceso.Propiedades.Items[0];
            }

            //=============================================================
            this.tsbCopiarProp.Enabled = false;
            this.tsbPegarProp.Enabled  = (PaginaPropiedades.ItemsEnBuffer.Count > 0);
            //=============================================================
        }
Exemplo n.º 4
0
        private void ReOrdenar(PuntoAcceso p, int posInicial, int desplazamiento)
        {
            _s.PuntosAcceso.RemoveAt(posInicial);
            _s.PuntosAcceso.Insert(posInicial + desplazamiento, p);
            BindingManagerBase bm = this.lPuntosAcceso.BindingContext[_s.PuntosAcceso];
            CurrencyManager    cm = (CurrencyManager)bm;

            if (cm != null)
            {
                cm.Refresh();
            }
            TreeNode hijo;

            _n.Nodes.Clear();
            foreach (PuntoAcceso prt in _s.PuntosAcceso)
            {
                hijo = GUIUtils.CrearNodoPuntoAcceso(prt);
                _n.Nodes.Add(hijo);
                _n.Expand();
            }
        }