Beispiel #1
0
        public void DoResetListBoxData()
        {
            string _DownloadDIR = (string.IsNullOrEmpty(Properties.Settings.Default.DownloadDir)) ? _DOWNLOAD_DIR : Properties.Settings.Default.DownloadDir;

            string[] _strFiles = Directory.GetFiles(_DownloadDIR);

            ArrayList downloadFiles = new ArrayList();

            foreach (string file in _strFiles)
            {
                downloadFiles.Add(file);
            }
            //downloadFiles.Sort();

            this.listBox_Download.Items.Clear();

            foreach (string file in downloadFiles)
            {
                this.listBox_Download.Items.Add(file);
            }

            WinCommon.sortListBoxItems(ref this.listBox_Download, SortListOption_ToolStripMenuItem.Checked);
        }
Beispiel #2
0
 /// <summary>
 /// オプションのチェック状態が変更された場合、ListBoxを整列しなおす
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SortListOption_ToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
 {
     Properties.Settings.Default.DownloadListboxSortMethod = SortListOption_ToolStripMenuItem.Checked;
     Properties.Settings.Default.Save();
     WinCommon.sortListBoxItems(ref this.listBox_Download, SortListOption_ToolStripMenuItem.Checked);
 }