Ejemplo n.º 1
0
        void RefreshLocalListView()
        {
            var filePath = textBox1.Text;

            List <ListInfo> listInfos = new List <ListInfo>();

            if (!string.IsNullOrEmpty(filePath) && filePath != "我的电脑")
            {
                try
                {
                    var dir = new DirectoryClass()
                    {
                        FullName = filePath
                    };
                    _driverHelper.GetDirectoryAndFile(dir);
                }
                catch (Exception ex)
                {
                    Log("访问本地目录:" + filePath, ex.Message);
                }
            }
            else
            {
                try
                {
                    _driverHelper.GetLocalDriver();
                }
                catch (Exception ex)
                {
                    Log("访问本地目录:" + filePath, ex.Message);
                }
            }
        }