示例#1
0
        public void Reload()
        {
            if (map != null)
            {
                SuspendLayout();
                LinesPanel.SuspendLayout();
                items.Clear();
                LinesPanel.Controls.Clear();

                foreach (List <string> remaps in map.ControlMaps)
                {
                    DraggableTBLine line = new DraggableTBLine();
                    foreach (string remap in remaps)
                    {
                        line.AddItem(remap);
                    }
                    line.Content.ControlAdded   += new ControlEventHandler(Line_ControlAdded);
                    line.Content.ControlRemoved += new ControlEventHandler(line_ControlRemoved);
                    items.Add(line);
                    LinesPanel.Controls.Add(line);
                    line.Dock = DockStyle.Top;
                    line.BringToFront();
                }

                CreateEmptyLine();

                ResumeLayout();
                LinesPanel.ResumeLayout();
            }
        }