Exemplo n.º 1
0
        public static FileDetailInfoLocalCollect GetInstance()
        {
            if (dataCollect == null)
            {
                dataCollect = new FileDetailInfoLocalCollect();
            }

            return(dataCollect);
        }
Exemplo n.º 2
0
        //绑定界面元素
        private void Binging()
        {
            // 初始化本地文件信息,绑定list
            dcLocal = FileDetailInfoLocalCollect.GetInstance();
            ObservableCollection <FileDetailInfo> localcollection = new ObservableCollection <FileDetailInfo>(LocalRelativeList);

            dcLocal.Collection             = localcollection;
            LocalListView.DataContext      = dcLocal;
            this.LocalListView.ItemsSource = dcLocal.Collection.ToList().OrderByDescending(a => a.IsDir);

            //初始化远端文件信息,绑定list
            dcRemote = FileDetailInfoRemoteCollect.GetInstance();
            ObservableCollection <FileDetailInfo> remotecollection = new ObservableCollection <FileDetailInfo>(RemoteRelativeList);

            dcRemote.Collection             = remotecollection;
            RemoteListView.DataContext      = dcRemote;
            this.RemoteListView.ItemsSource = dcRemote.Collection.ToList().OrderByDescending(a => a.IsDir);
        }