コード例 #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;
        }
コード例 #2
0
ファイル: FTPEditor.cs プロジェクト: tdhieu/iSpy
        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;
            
        }