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(); } } }
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)); }
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(); }