示例#1
0
        /// <summary>
        /// 设置MP3艺术家,曲目数列。
        /// </summary>
        private void SetMP3ArtistColumn()
        {
            this.lvwFiles.Columns.Clear();
            this.lvwFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
                this.m_listArtist,
                this.m_songNums
            });

            this.lvStatus = ListViewStatus.MP3Artist;
        }
示例#2
0
        /// <summary>
        /// 设置lvwFiles的列为文件内容。
        /// </summary>
        private void SetFileColumn()
        {
            this.lvwFiles.Columns.Clear();
            this.lvwFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
                this.name,
                this.fullName,
                this.length,
                this.lastWriteTime
            });

            this.lvStatus = ListViewStatus.File;
        }
示例#3
0
 public SaveResult(FileFinder _form, SaveForm _saveForm, Search _serach, string _fullName, 
     PageRange _pageRange)
 {
     this.saveForm = _saveForm;
     this.form = _form;
     this.lvStatus = this.form.LVStatus;
     this.fullName = _fullName;
     this.search = _serach;
     this.pageRange = _pageRange;
     this.setpValue = 100 / (this.pageRange.End - this.pageRange.Begin + 2);
     this.lastValue = 100 - this.setpValue * (this.pageRange.End - this.pageRange.Begin + 1);
 }
示例#4
0
 public SaveResult(FileFinder _form, SaveForm _saveForm, Search _serach, string _fullName,
                   PageRange _pageRange)
 {
     this.saveForm  = _saveForm;
     this.form      = _form;
     this.lvStatus  = this.form.LVStatus;
     this.fullName  = _fullName;
     this.search    = _serach;
     this.pageRange = _pageRange;
     this.setpValue = 100 / (this.pageRange.End - this.pageRange.Begin + 2);
     this.lastValue = 100 - this.setpValue * (this.pageRange.End - this.pageRange.Begin + 1);
 }
示例#5
0
        /// <summary>
        /// 设置lvwFiles的列为MP3内容。
        /// </summary>
        private void SetMP3Column()
        {
            this.lvwFiles.Columns.Clear();
            this.lvwFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
                this.m_fileName,
                this.m_songName,
                this.m_artist,
                this.m_album,
                this.m_pubYear,
                this.m_genre,
                this.m_length,
                this.m_lastWriteTime,
                this.m_fullName
            });

            this.lvStatus = ListViewStatus.MP3;
        }
示例#6
0
        /// <summary>
        /// 初始化设置
        /// </summary>
        private void InitSettings()
        {
            //初始化设置信息
            Static.Settings.ReadSettings();
            Static.FileIndexPath = Static.Settings.FileIndexPath;
            Static.MP3IndexPath  = Static.Settings.MP3IndexPath;
            IndexInfoDB indexInfo = new IndexInfoDB();

            indexInfo.ReadIndexInfoDB();
            Static.MP3Artist   = indexInfo.MP3Artist;
            Static.MP3SongNums = indexInfo.MFileNums;

            this.停止更新ToolStripMenuItem.Enabled = false;
            this.保存结果ToolStripMenuItem.Enabled = false;
            this.tsslLength        = this.statusStrip.Width - 120;
            this.orginalStatusText = "永远别说永远,凡事都有可能。";
            this.tsslStatus.Text   = Deal.LimitStringLength(this.orginalStatusText, this.tsslLength);

            this.modeStatus        = ModeStatus.FILE;
            this.magicMirrorStatus = MagicMirrorStatus.Close;
            this.lvStatus          = ListViewStatus.File;

            this.isSearchWithResult = false;
            this.indexMode          = IndexMode.All;   //默认索引模式为所有
            this.searchMode         = SearchMode.File; //默认搜索模式为文件
            //this.index = new Index(this, this.indexMode);
            this.search      = new Search(this, this.searchMode);
            this.magicMirror = new MagicMirror();
            this.magicMirror.SetProperties(MagicMode.None, null);
            this.pnlMagicMirror.Controls.Add(this.magicMirror);
            this.magicMirror.Dock = DockStyle.Fill;

            this.btnNext.Visible     = false;
            this.btnPrevious.Visible = false;
            this.tsslPages.Visible   = false;

            //加入文件夹图标,未知文件的图标,mp3图标,jpg图标。
            this.imgIcon.Images.Add("f", GetSystemIcon.GetFolderIcon(false));
            this.imgIcon.Images.Add("u", GetSystemIcon.GetUnknownFileIcon(false));
            this.imgIcon.Images.Add(".mp3", GetSystemIcon.GetIconByFileType(".mp3", false));
            this.imgIcon.Images.Add(".jpg", GetSystemIcon.GetIconByFileType(".jpg", false));
            this.imgIcon.Images.Add(".txt", GetSystemIcon.GetIconByFileType(".txt", false));
            this.imgIcon.Images.Add("artist", Properties.Resources.artist);
        }
示例#7
0
        /// <summary>
        /// 设置lvwFiles的列为MP3内容。
        /// </summary>
        private void SetMP3Column()
        {
            this.lvwFiles.Columns.Clear();
            this.lvwFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.m_fileName,
            this.m_songName,
            this.m_artist,
            this.m_album,
            this.m_pubYear,
            this.m_genre,
            this.m_length,
            this.m_lastWriteTime,
            this.m_fullName});

            this.lvStatus = ListViewStatus.MP3;
        }
示例#8
0
        /// <summary>
        /// 设置MP3艺术家,曲目数列。
        /// </summary>
        private void SetMP3ArtistColumn()
        {
            this.lvwFiles.Columns.Clear();
            this.lvwFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.m_listArtist,
            this.m_songNums});

            this.lvStatus = ListViewStatus.MP3Artist;
        }
示例#9
0
        /// <summary>
        /// 设置lvwFiles的列为文件内容。
        /// </summary>
        private void SetFileColumn()
        {
            this.lvwFiles.Columns.Clear();
            this.lvwFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.name,
            this.fullName,
            this.length,
            this.lastWriteTime});

            this.lvStatus = ListViewStatus.File;
        }
示例#10
0
        /// <summary>
        /// 初始化设置
        /// </summary>
        private void InitSettings()
        {
            //初始化设置信息
            Static.Settings.ReadSettings();
            Static.FileIndexPath = Static.Settings.FileIndexPath;
            Static.MP3IndexPath = Static.Settings.MP3IndexPath;
            IndexInfoDB indexInfo = new IndexInfoDB();
            indexInfo.ReadIndexInfoDB();
            Static.MP3Artist = indexInfo.MP3Artist;
            Static.MP3SongNums = indexInfo.MFileNums;

            this.停止更新ToolStripMenuItem.Enabled = false;
            this.保存结果ToolStripMenuItem.Enabled = false;
            this.tsslLength = this.statusStrip.Width - 120;
            this.orginalStatusText = "永远别说永远,凡事都有可能。";
            this.tsslStatus.Text = Deal.LimitStringLength(this.orginalStatusText, this.tsslLength);

            this.modeStatus = ModeStatus.FILE;
            this.magicMirrorStatus = MagicMirrorStatus.Close;
            this.lvStatus = ListViewStatus.File;

            this.isSearchWithResult = false;
            this.indexMode = IndexMode.All;//默认索引模式为所有
            this.searchMode = SearchMode.File;//默认搜索模式为文件
            //this.index = new Index(this, this.indexMode);
            this.search = new Search(this, this.searchMode);
            this.magicMirror = new MagicMirror();
            this.magicMirror.SetProperties(MagicMode.None, null);
            this.pnlMagicMirror.Controls.Add(this.magicMirror);
            this.magicMirror.Dock = DockStyle.Fill;

            this.btnNext.Visible = false;
            this.btnPrevious.Visible = false;
            this.tsslPages.Visible = false;

            //加入文件夹图标,未知文件的图标,mp3图标,jpg图标。
            this.imgIcon.Images.Add("f", GetSystemIcon.GetFolderIcon(false));
            this.imgIcon.Images.Add("u", GetSystemIcon.GetUnknownFileIcon(false));
            this.imgIcon.Images.Add(".mp3", GetSystemIcon.GetIconByFileType(".mp3", false));
            this.imgIcon.Images.Add(".jpg", GetSystemIcon.GetIconByFileType(".jpg", false));
            this.imgIcon.Images.Add(".txt", GetSystemIcon.GetIconByFileType(".txt", false));
            this.imgIcon.Images.Add("artist", Properties.Resources.artist);
        }