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);
 }
Beispiel #2
0
        public SaveForm(FileFinder _form, Search _search)
        {
            InitializeComponent();
            this.form = _form;
            this.search = _search;
            this.lblWarning.Visible = false;
            this.rdoFirst.Checked = true;

            this.lbl1.Enabled = false;
            this.lbl2.Enabled = false;
            this.lbl3.Enabled = false;
            this.cmbBegin.Enabled = false;
            this.cmbEnd.Enabled = false;

            for (int i = 1; i <= this.form.PageNums; i++)
            {
                this.cmbBegin.Items.Add(i);
                this.cmbEnd.Items.Add(i);
            }
            this.cmbBegin.SelectedIndex = 0;
            this.cmbEnd.SelectedIndex = 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);
        }