private void Button_Click(object sender, RoutedEventArgs e) { TaskWindow taskWindow = new TaskWindow(); taskWindow.ViewModel = "ViewModel"; taskWindow.Owner = this; taskWindow.Show(); foreach (Window window in App.Current.Windows) { window.Background = new SolidColorBrush(Colors.Red); // если окно - объект TaskWindow if (window is TaskWindow) { window.Title = "Новый заголовок!"; } } //foreach (Window window in this.OwnedWindows) //{ // window.Background = new SolidColorBrush(Colors.Red); // if (window is TaskWindow) // window.Title = "Новый заголовок!"; //} }
public static void Theme3_action_taskwindow(TaskWindow w) { w.LeftStackpanel.Background = Brushes.LightSalmon; w.RightStackpanel.Background = Brushes.LightSalmon; w.CenterStackpanel.Background = Brushes.PeachPuff; w.Taskwindow.WindowTitleBrush = Brushes.Firebrick; w.cryptobutton1.Background = Brushes.Tomato; w.cryptobutton2.Background = Brushes.Tomato; w.cryptobutton3.Background = Brushes.Tomato; w.cryptobutton4.Background = Brushes.Tomato; w.fiatbutton1.Background = Brushes.Tomato; w.fiatbutton2.Background = Brushes.Tomato; w.fiatbutton3.Background = Brushes.Tomato; w.fiatbutton4.Background = Brushes.Tomato; w.cryptobutton1.Foreground = Brushes.White; w.cryptobutton2.Foreground = Brushes.White; w.cryptobutton3.Foreground = Brushes.White; w.cryptobutton4.Foreground = Brushes.White; w.fiatbutton1.Foreground = Brushes.White; w.fiatbutton2.Foreground = Brushes.White; w.fiatbutton3.Foreground = Brushes.White; w.fiatbutton4.Foreground = Brushes.White; w.ActionButton.Background = Brushes.DarkSalmon; w.ActionButton.Foreground = Brushes.White; w.currency.Background = Brushes.DarkSalmon; w.currency.Foreground = Brushes.White; w.Arrow.Source = BitmapFrame.Create(new Uri(System.IO.Path.GetFullPath(@"..\..\") + @"Resources\arrow3.png")); }
//----------------------- //-----------------------TASK WINDOW public static void Theme1_action_taskwindow(TaskWindow w) { w.LeftStackpanel.Background = Brushes.Lavender; w.RightStackpanel.Background = Brushes.Lavender; w.CenterStackpanel.Background = Brushes.LightGray; w.Taskwindow.WindowTitleBrush = Brushes.DeepSkyBlue; w.cryptobutton1.Background = Brushes.White; w.cryptobutton2.Background = Brushes.White; w.cryptobutton3.Background = Brushes.White; w.cryptobutton4.Background = Brushes.White; w.fiatbutton1.Background = Brushes.White; w.fiatbutton2.Background = Brushes.White; w.fiatbutton3.Background = Brushes.White; w.fiatbutton4.Background = Brushes.White; w.cryptobutton1.Foreground = Brushes.Black; w.cryptobutton2.Foreground = Brushes.Black; w.cryptobutton3.Foreground = Brushes.Black; w.cryptobutton4.Foreground = Brushes.Black; w.fiatbutton1.Foreground = Brushes.Black; w.fiatbutton2.Foreground = Brushes.Black; w.fiatbutton3.Foreground = Brushes.Black; w.fiatbutton4.Foreground = Brushes.Black; w.ActionButton.Background = Brushes.White; w.ActionButton.Foreground = Brushes.Black; w.currency.Background = Brushes.White; w.currency.Foreground = Brushes.Black; w.Arrow.Source = BitmapFrame.Create(new Uri(System.IO.Path.GetFullPath(@"..\..\") + @"Resources\arrow1.png")); }
public static void Theme2_action_taskwindow(TaskWindow w) { w.LeftStackpanel.Background = Brushes.PaleGoldenrod; w.RightStackpanel.Background = Brushes.PaleGoldenrod; w.CenterStackpanel.Background = Brushes.LemonChiffon; w.Taskwindow.WindowTitleBrush = Brushes.OliveDrab; w.cryptobutton1.Background = Brushes.LightGreen; w.cryptobutton2.Background = Brushes.LightGreen; w.cryptobutton3.Background = Brushes.LightGreen; w.cryptobutton4.Background = Brushes.LightGreen; w.fiatbutton1.Background = Brushes.LightGreen; w.fiatbutton2.Background = Brushes.LightGreen; w.fiatbutton3.Background = Brushes.LightGreen; w.fiatbutton4.Background = Brushes.LightGreen; w.cryptobutton1.Foreground = Brushes.Black; w.cryptobutton2.Foreground = Brushes.Black; w.cryptobutton3.Foreground = Brushes.Black; w.cryptobutton4.Foreground = Brushes.Black; w.fiatbutton1.Foreground = Brushes.Black; w.fiatbutton2.Foreground = Brushes.Black; w.fiatbutton3.Foreground = Brushes.Black; w.fiatbutton4.Foreground = Brushes.Black; w.ActionButton.Background = Brushes.LightGreen; w.ActionButton.Foreground = Brushes.Black; w.currency.Background = Brushes.LightGreen; w.currency.Foreground = Brushes.Black; w.Arrow.Source = BitmapFrame.Create(new Uri(System.IO.Path.GetFullPath(@"..\..\") + @"Resources\arrow2.png")); }
private void exchange_rates(object sender, RoutedEventArgs e) { TaskWindow taskWindow = new TaskWindow(); taskWindow.Owner = this; if (TaskWindow.WindowOpened && MiningSpace.WindowOpened && OptionWindow.WindowOpened && MiningCalc.WindowOpened) { taskWindow.Show(); TaskWindow.WindowOpened = false; } }
public static void Language4_action_taskwindow(TaskWindow w) { w.Taskwindow.Title = "货币汇率窗口"; w.ActionButton.Content = "获得实际价格"; }
public static void Language3_action_taskwindow(TaskWindow w) { w.Taskwindow.Title = "Wechselkurse Fenster"; w.ActionButton.Content = "Erhalten Sie die tatsächlichen Preise"; }
public static void Language2_action_taskwindow(TaskWindow w) { w.Taskwindow.Title = "Окно с курсами криптовалют"; w.ActionButton.Content = "Получить актуальные курсы"; }
//task window public static void Language1_action_taskwindow(TaskWindow w) { w.Taskwindow.Title = "Currency rates window"; w.ActionButton.Content = "Get actual rates"; }