コード例 #1
0
 protected virtual void OnPageHeadEvent(PageHeadEventArgs e)
 {
     if (PageHeadEvent != null)
     {
         PageHeadEvent(this, e);
     }
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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);
            }
        }
コード例 #6
0
        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);
            }
        }
コード例 #7
0
        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);
            }
        }
コード例 #8
0
        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);
                }
            }
        }
コード例 #9
0
        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);
                }
            }
        }