Inheritance: System.Windows.Forms.Panel
Esempio n. 1
0
        public void SetControlLayouts()
        {
            int w     = Width - 4;
            int count = Controls.Count;

            int yofs  = 0;
            int ysize = 4;

            foreach (LPanel lp in Controls)
            {
                ysize += lp.Height - 1;
            }
            if (ysize > Height)
            {
                w -= SystemInformation.VerticalScrollBarWidth - 2;
            }
            for (int i = 0; i < count; i++)
            {
                LPanel lp = (LPanel)Controls[i];
                lp.Size     = new Size(w, lp.Size.Height);
                lp.Location = new Point(2, yofs);
                yofs       += lp.Size.Height - 1;
                if (ysize > Height)
                {
                    lp.AdjustForScroll();
                }
            }
        }
Esempio n. 2
0
        public void SelectForWrite()
        {
            if (Write == true)
            {
                return;
            }
            Write  = true;
            Render = true;

            if (Global.ActiveMap != null)
            {
                Global.ActiveMap.UIState[LayerRef].bRender = true;
            }

            if (Global.lpSelection != null)
            {
                LPanel lp = ((LPanel)Global.lpSelection);
                lp.Write = false;
                lp.Invalidate();
            }
            Global.lpSelection = this;
            Global.FireWriteEvent(new Global.LEventArgs(LayerRef));
        }
Esempio n. 3
0
 public void lpAddLayer(MapLayer ml, bool IsRendered, bool IsWrite, int layer)
 {
     LPanel lw = new LPanel(lPanel, ml, IsRendered, IsWrite, layer);
     lwLayers.Add(lw);
     lPanel.Controls.Add(lw);
     lPanel.SetControlLayouts();
 }