예제 #1
0
            private void Render()
            {
                MenuStrip.SuspendLayout();
                MenuStrip.Items.Clear();
                MenuStrip.Items.AddRange(RootNodes.Values.OrderBy(x => x.OrderHint).Select(x => x.MenuMenuItem).OfType <ToolStripItem>().ToArray());
                MenuStrip.ResumeLayout();

                ToolStrip.BeginInit();
                ToolStrip.Controls.Clear();
                foreach (var ts in RootNodes.Values.OrderByDescending(x => x.OrderHint))
                {
                    if (ts.ToolStrip.Items.Count > 0)
                    {
                        ToolStrip.Join(ts.ToolStrip);
                    }
                }
                ToolStrip.EndInit();
            }