Example #1
0
        private async Task StartPreviewAsync(StorageFolder folder)
        {
            try
            {
                VerifyCanvas.Children.Remove(gVerifyDV);

                DeviceModel dm = await DeviceModel.GetDeviceModel(folder);

                gVerifyDV             = new DeviceView();
                gVerifyDV.DataContext = dm;
                VerifyCanvas.Children.Add(gVerifyDV);

                var allzones = dm.AllZones;
                SortByZIndex(allzones);
                SetMouseDectectedRegion(new Point(dm.PixelLeft, dm.PixelTop), allzones);

                VerifyStatus.Text = "";
            }
            catch
            {
                VerifyStatus.Text = "輸入錯誤!";
            }
        }