예제 #1
0
        private void InitCtrlSorting(
            ToolStripMenuItem reverseByIndex,
            ToolStripMenuItem sortBySpeed,
            ToolStripMenuItem sortByDate,
            ToolStripMenuItem sortBySummary,
            ToolStripMenuItem sortByDownloadTotal,
            ToolStripMenuItem sortByUploadTotal)
        {
            sortByDownloadTotal.Click += RunWhenSelectionIsNotEmptyHandler(
                () => servers.SortSelectedByDownloadTotal());

            sortByUploadTotal.Click += RunWhenSelectionIsNotEmptyHandler(
                () => servers.SortSelectedByUploadTotal());

            reverseByIndex.Click += RunWhenSelectionIsNotEmptyHandler(
                () => servers.ReverseSelectedByIndex());

            sortByDate.Click += RunWhenSelectionIsNotEmptyHandler(
                () => servers.SortSelectedByLastModifiedDate());

            sortBySummary.Click += RunWhenSelectionIsNotEmptyHandler(
                () => servers.SortSelectedBySummary());

            sortBySpeed.Click += RunWhenSelectionIsNotEmptyHandler(
                () => servers.SortSelectedBySpeedTest());
        }
예제 #2
0
        private void InitCtrlSorting(
            ToolStripMenuItem sortBySpeed,
            ToolStripMenuItem sortByDate,
            ToolStripMenuItem sortBySummary)
        {
            sortByDate.Click += ApplyActionOnSelectedServers(
                () => servers.SortSelectedByLastModifiedDate());

            sortBySummary.Click += ApplyActionOnSelectedServers(
                () => servers.SortSelectedBySummary());

            sortBySpeed.Click += ApplyActionOnSelectedServers(
                () => servers.SortSelectedBySpeedTest());
        }