Esempio n. 1
0
        private void _search()
        {
            string str = mTBSearch.Text.Trim();

            for (++mSearchIndex; mSearchIndex < mList.Count; ++mSearchIndex)
            {
                if (mList[mSearchIndex].PanFile.server_filename.Contains(str))
                {
                    mDGMain.ScrollIntoView(mList[mSearchIndex]);
                    mDGMain.SelectedItem = mList[mSearchIndex];
                    mDGMain.Focus();
                    mSearchIndex = -1;
                    return;
                }
            }
            mSearchIndex = -1;
            NnMessage.ShowMessage("已到达搜索终点,未找到记录!");
        }
Esempio n. 2
0
        /// <summary>
        /// 重新扫描
        /// </summary>
        private void _rescan()
        {
            Dispatcher.Invoke(() => (Application.Current.MainWindow as MainWindow)?.StatusBarState(true, "正在扫描..."));
            Account a = _getSelectedAccount();

            if (a == null)
            {
                return;
            }

            NnPanManager npm = new NnPanManager(a);

            // 清空选择的账号的文件
            int    count = NnReader.Instance.DeleteFIles(a);
            string str   = npm.ScanFile();

            Dispatcher.Invoke(() => (Application.Current.MainWindow as MainWindow)?.StatusBarState());
            NnMessage.ShowMessage("扫描结束");
        }
Esempio n. 3
0
 public static void ShowMessage(string message, bool isError = false)
 {
     Application.Current.Dispatcher.Invoke(() =>
     {
         if (isError)
         {
             if (mMessage == null)
             {
                 mMessage = new NnMessage();
             }
             mMessage._showMessage(message, isError);
             mMessage.Show();
             return;
         }
         NnMessage m = new NnMessage();
         m._showMessage(message, isError);
         m.Show();
     });
 }