コード例 #1
0
        public void ExecuteInitObserver()
        {
            State = "解析中...";

            Task.Factory.StartNew(() =>
            {
                try
                {
                    InitAndroidFileExtractor();

                    Observer = new AndroidFileObserver()
                    {
                        androidFileExtracter = androidFileExtracter,
                        androidDevice        = androidDevice,
                        ObservePath          = ObserverPath
                    };
                    Observer.Init();
                    DataSource = new ObservableCollection <FilePropertyItem>(
                        Observer.NewFileProperties.Select(c => FilePropertyItem.Load(c)));

                    State = "解析完成!";
                }
                catch (Exception e)
                {
                    State = "解析出现异常";
                    Error = e.Message;
                }
            });
        }
コード例 #2
0
        public void ExecuteUpdateObsever()
        {
            State = "解析中...";

            Task.Factory.StartNew(() =>
            {
                try
                {
                    Observer.Update();
                    DataSource = new ObservableCollection <FilePropertyItem>(
                        Observer.NewFileProperties.Select(c => FilePropertyItem.Load(c)));

                    State = "解析完成!";
                }
                catch (Exception e)
                {
                    State = "解析出现异常";
                    Error = e.Message;
                }
            });
        }