예제 #1
0
        /// <summary>
        /// sortuje po czasie utworzenia druga liste
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonSoryByCreationTimeList2_Click(object sender, RoutedEventArgs e)
        {
            listBoxNumber2.Items.Clear();
            MyDirectory mydir = new MyDirectory(textBoxPathNum2.Text);
            IOrderedEnumerable <ElementsOfDisc> result = mydir.GetFilesAndDirectoriesSoryByCreationTime();

            foreach (ElementsOfDisc file in result)
            {
                ViewOfListItems discElementView = new ViewOfListItems(file);
                listBoxNumber2.Items.Add(discElementView);
                discElementView.refreshlist   += RefreshListAfterDelete;
                discElementView.AfterOpenNum2 += WindowAfterOpen;
                discElementView.CopyFileNum2  += GetPathAfterClick;
            }
        }