protected virtual void OnPageHeadEvent(PageHeadEventArgs e) { if (PageHeadEvent != null) { PageHeadEvent(this, e); } }
protected virtual void PageHead_PageHeadEvent(object sender, PageHeadEventArgs e) { switch (e.Code) { case 120: SendChangePasswordMessage(); break; case 201: SendLogoutMessage(); break; case 202: Close(); SendNavigateHomeMessage(); break; case PageHeadEventArgs.EVT_DEFAULT_PAGE: SetDefaultPage(); break; case PageHeadEventArgs.EVT_OPENIM: OpenIMPanel(); break; } }
private static void NavigateHomeCommand_Executed(object sender, ExecutedRoutedEventArgs e) { UMPPageHead pageHead = sender as UMPPageHead; if (pageHead != null) { PageHeadEventArgs args = new PageHeadEventArgs(); args.Code = 202; pageHead.OnPageHeadEvent(args); } }
private static void ChangePasswordCommand_Executed(object sender, ExecutedRoutedEventArgs e) { UMPPageHead pageHead = sender as UMPPageHead; if (pageHead != null) { PageHeadEventArgs args = new PageHeadEventArgs(); args.Code = 120; pageHead.OnPageHeadEvent(args); } }
private static void SetDefaultPageCommand_Executed(object sender, ExecutedRoutedEventArgs e) { UMPPageHead pageHead = sender as UMPPageHead; if (pageHead != null) { PageHeadEventArgs args = new PageHeadEventArgs(); args.Code = PageHeadEventArgs.EVT_DEFAULT_PAGE; pageHead.OnPageHeadEvent(args); } }
private static void OpenCloseLeftPanelCommand_Executed(object sender, ExecutedRoutedEventArgs e) { UMPPageHead pageHead = sender as UMPPageHead; if (pageHead != null) { PageHeadEventArgs args = new PageHeadEventArgs(); args.Code = 121; pageHead.OnPageHeadEvent(args); } }
private static void OpenIMCommand_Executed(object sender, ExecutedRoutedEventArgs e) { UMPPageHead pageHead = sender as UMPPageHead; if (pageHead != null) { PageHeadEventArgs args = new PageHeadEventArgs(); args.Code = PageHeadEventArgs.EVT_OPENIM; pageHead.OnPageHeadEvent(args); } }
void mListBoxThemes_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.RemovedItems == null || e.RemovedItems.Count <= 0) { return; } var item = mListBoxThemes.SelectedItem as ThemeInfoItem; if (item != null) { ThemeInfo themeInfo = SessionInfo.SupportThemes.FirstOrDefault(t => t.Name == item.Name); if (themeInfo != null) { ThemeInfo = themeInfo; SessionInfo.ThemeInfo = themeInfo; SessionInfo.ThemeName = themeInfo.Name; PageHeadEventArgs args = new PageHeadEventArgs(); args.Code = 100; args.Data = themeInfo; OnPageHeadEvent(args); } } }
void mListBoxLangs_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.RemovedItems == null || e.RemovedItems.Count <= 0) { return; } var langItem = mListBoxLangs.SelectedItem as LangInfoItem; if (langItem != null) { LangTypeInfo langTypeInfo = SessionInfo.SupportLangTypes.FirstOrDefault(l => l.LangID == langItem.Code); if (langTypeInfo != null) { LangTypeInfo = langTypeInfo; SessionInfo.LangTypeInfo = langTypeInfo; SessionInfo.LangTypeID = langTypeInfo.LangID; ChangeLanguage(); PageHeadEventArgs args = new PageHeadEventArgs(); args.Code = 110; args.Data = langTypeInfo; OnPageHeadEvent(args); } } }