private void SetBackgroundImage(object sender, RoutedEventArgs e) { System.Windows.Forms.OpenFileDialog OpenFileDialog1 = new System.Windows.Forms.OpenFileDialog(); OpenFileDialog1.Title = Jvedio.Language.Resources.Choose; OpenFileDialog1.FileName = "background.jpg"; OpenFileDialog1.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory; OpenFileDialog1.Filter = "jpg|*.jpg"; OpenFileDialog1.FilterIndex = 1; OpenFileDialog1.RestoreDirectory = true; if (OpenFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string path = OpenFileDialog1.FileName; if (File.Exists(path)) { //设置背景 GlobalVariable.BackgroundImage = null; GC.Collect(); GlobalVariable.BackgroundImage = ImageProcess.BitmapImageFromFile(path); Properties.Settings.Default.BackgroundImage = path; Main main = ((Main)GetWindowByName("Main")); if (main != null) main.SetSkin(); WindowDetails windowDetails = ((WindowDetails)GetWindowByName("WindowDetails")); if (windowDetails != null) windowDetails.SetSkin(); } } }
private void UpdateDetail() { if (Jvedio.GetWindow.Get("WindowDetails") != null) { WindowDetails windowDetails = Jvedio.GetWindow.Get("WindowDetails") as WindowDetails; windowDetails.vieModel.Query(vieModel.DetailMovie.id); } }
private void UpdateDetail() { if (GetWindowByName("WindowDetails") != null) { WindowDetails windowDetails = GetWindowByName("WindowDetails") as WindowDetails; windowDetails.vieModel.Query(vieModel.DetailMovie.id); } }