Exemplo n.º 1
0
        private void RenderServerList()
        {
            flpServers.Controls.Clear();
            int vertScrollWidth = SystemInformation.VerticalScrollBarWidth;

            var w = flpServers.Width - 2;


            if (Servers != null)
            {
                if (Servers.Length * ServerEventRow.Height >= flpServers.Height)
                {
                    w = flpServers.Width - vertScrollWidth - 2;
                }
                int i = 0;
                foreach (var e in Servers)
                {
                    var c = new ServerEventRow(e, i)
                    {
                        Width = w
                    };
                    c.EntryDelete += CDirectoryEntryDelete;
                    c.EntryEdit   += CDirectoryEntryEdit;
                    c.MouseOver   += CMouseOver;
                    flpServers.Controls.Add(c);
                    flpServers.SetFlowBreak(c, true);
                    i++;
                }
            }

            flpServers.PerformLayout();
            flpServers.HorizontalScroll.Visible = flpServers.HorizontalScroll.Enabled = false;
        }
Exemplo n.º 2
0
        void RenderServerList()
        {
            flpServers.Controls.Clear();
            int vertScrollWidth = SystemInformation.VerticalScrollBarWidth;

            var w = flpServers.Width - 2;


            if (Servers != null)
            {
                if (Servers.Length * ServerEventRow.Height >= flpServers.Height)
                    w = flpServers.Width - vertScrollWidth - 2;
                int i = 0;
                foreach (var e in Servers)
                {
                    var c = new ServerEventRow(e, i) {Width = w};
                    c.EntryDelete += CDirectoryEntryDelete;
                    c.EntryEdit += CDirectoryEntryEdit;
                    c.MouseOver += CMouseOver;
                    flpServers.Controls.Add(c);
                    flpServers.SetFlowBreak(c, true);
                    i++;
                }
            }
            
            flpServers.PerformLayout();
            flpServers.HorizontalScroll.Visible = flpServers.HorizontalScroll.Enabled = false;
            
        }