void Login_Loaded(object sender, RoutedEventArgs e) { DrawingBackground.DrawWindowsBackgond(this); #region Init InitLanguageMenu(); #endregion #region 关联事件 MouseLeftButtonDown += (s, be) => DragMove(); ButtonApplicationMenu.Click += ButtonApplicationMenu_Click; ButtonCloseWindow.Click += ButtonCloseWindow_Click; ButtonCloseLogin.Click += ButtonCloseWindow_Click; ButtonLogin.Click += ButtonLogin_Click; #endregion bIsloaded = true; ChangeLanguage(App.gStrCurrLang); BeginLoading(); }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { LabelApplicationTitle.Content = "UMP Service Pack " + App.updateInfo.Version; SetBusy(true); DrawingBackground.DrawWindowsBackgond(this); InitLanguage(); UC_UpdateContent uc_UpdateContent = new UC_UpdateContent(); borderUpdater.Child = uc_UpdateContent; uc_UpdateContent.main = this; InitLanguageMenu(); #region 绑定事件 MouseLeftButtonDown += (s, be) => DragMove(); ButtonApplicationMenu.Click += ButtonApplicationMenu_Click; ButtonCloseApp.Click += ButtonCloseApp_Click; ButtonMinimized.Click += ButtonMinimized_Click; ButtonMaximized.Click += ButtonMaximized_Click; #endregion ChangeLanguage(App.gStrCurrLang); }
/// <summary> /// 画窗口背景图片 /// </summary> /// <param name="AWindowTarget">目标窗口</param> public static void DrawWindowsBackGround(Window AWindowTarget) { DrawingBackground.DrawWindowsBackgond(AWindowTarget); }
public static void DrawWindowsBackGround(System.Windows.Controls.UserControl AWindowTarger, string strImagePath) { DrawingBackground.DrawWindowsBackgond(AWindowTarger, strImagePath); }
/// <summary> /// 画窗口背景 /// </summary> /// <param name="AWindowTarger"></param> public static void DrawWindowsBackGround(Window AWindowTarger, string strImagePath) { DrawingBackground.DrawWindowsBackgond(AWindowTarger, strImagePath); }
/// <summary> /// Raises the <see cref="DrawingBackground"/> event. /// </summary> /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Draw(UltravioletTime)"/>.</param> /// <param name="spriteBatch">The <see cref="SpriteBatch"/> with which the panel is being drawn.</param> protected virtual void OnDrawingBackground(UltravioletTime time, SpriteBatch spriteBatch) => DrawingBackground?.Invoke(this, time, spriteBatch);