예제 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (video != null)
            {
                txtName.Text = _proxy.GetItemProperty(Convert.ToInt32(video), EngServRef.ServerData.Video, EngServRef.PropertyData.Name);
                txtDesc.Text = _proxy.GetItemProperty(Convert.ToInt32(video), EngServRef.ServerData.Video, EngServRef.PropertyData.Description);
                txtPath.Text = _proxy.GetItemProperty(Convert.ToInt32(video), EngServRef.ServerData.Video, EngServRef.PropertyData.Path);
                txtSubs.Text = _proxy.GetItemProperty(Convert.ToInt32(video), EngServRef.ServerData.Video, EngServRef.PropertyData.SubPath);
                if (_proxy.GetItemProperty(Convert.ToInt32(video), EngServRef.ServerData.Video, EngServRef.PropertyData.Year) != null)
                {
                    txtYear.Text = _proxy.GetItemProperty(Convert.ToInt32(video), EngServRef.ServerData.Video, EngServRef.PropertyData.Year).ToString();
                }
                chCopy.IsChecked = !_proxy.CheckAbsolute(Convert.ToInt32(video), EngServRef.ServerData.Video);
                string imgPath = _proxy.GetItemProperty(Convert.ToInt32(video), EngServRef.ServerData.Video, EngServRef.PropertyData.Imgpath);
                if (imgPath == "WolfV.png")
                {
                    FormData.SetImage("pack://*****:*****@"Temp\VideoImages\{imgPath}"))
                    {
                        FormData.SetImage($@"pack://siteoforigin:,,,/Temp\VideoImages\{imgPath}", imDrag);
                    }
                    else
                    {
                        MessageBox.Show("Image can not be found!", "Something went wrong", MessageBoxButton.OK, MessageBoxImage.Error);
                    }
                }
                lPath.Content = "...";

                stRating.Visibility = Visibility.Collapsed;
                FillCategories(new List <int>(_proxy.GetItemData(Convert.ToInt32(video), EngServRef.ServerData.Video, EngServRef.ServerData.VideoCategory)));
            }
        }