示例#1
0
        protected override void PageHead_PageHeadEvent(object sender, PageHeadEventArgs e)
        {
            base.PageHead_PageHeadEvent(sender, e);

            switch (e.Code)
            {
            //切换主题
            case 100:
                ThemeInfo themeInfo = e.Data as ThemeInfo;
                if (themeInfo != null)
                {
                    ThemeInfo             = themeInfo;
                    App.Session.ThemeInfo = themeInfo;
                    App.Session.ThemeName = themeInfo.Name;
                    ChangeTheme();
                    SendThemeChangeMessage();
                }
                break;

            //切换语言
            case 110:
                LangTypeInfo langType = e.Data as LangTypeInfo;
                if (langType != null)
                {
                    LangTypeInfo             = langType;
                    App.Session.LangTypeInfo = langType;
                    App.Session.LangTypeID   = langType.LangID;
                    MyWaiter.Visibility      = Visibility.Visible;
                    CustomWaiter.Visibility  = Visibility.Visible;
                    mWorker                     = new BackgroundWorker();
                    mWorker.DoWork             += (s, de) => App.InitLanguageInfos();
                    mWorker.RunWorkerCompleted += (s, re) =>
                    {
                        mWorker.Dispose();
                        MyWaiter.Visibility     = Visibility.Hidden;
                        CustomWaiter.Visibility = Visibility.Hidden;
                        ChangeLanguage();
                        PopupPanel.ChangeLanguage();
                        SendLanguageChangeMessage();
                    };
                    mWorker.RunWorkerAsync();
                }
                break;

            //展开或关闭侧边栏
            case 121:
                OpenCloseLeftPanel();
                break;
            }
        }
示例#2
0
 public override void ChangeLanguage()
 {
     base.ChangeLanguage();
     TbPaperName.Text = CurrentApp.GetLanguageInfo("3603T00027", "Paper Name");
     TbPaperNum.Text  = CurrentApp.GetLanguageInfo("3603T00028", "Paper Num");
     TbTestTime.Text  = CurrentApp.GetLanguageInfo("3603T00044", "Test Time");
     TbExplain.Text   = CurrentApp.GetLanguageInfo("3603T00050", "Explain");
     ButOk.Content    = CurrentApp.GetLanguageInfo("3603T00051", "OK");
     ButClose.Content = CurrentApp.GetLanguageInfo("3603T00052", "Close");
     if (PopupPanel != null)
     {
         PopupPanel.ChangeLanguage();
     }
 }
示例#3
0
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            try
            {
                CurrentApp.AppTitle = CurrentApp.GetLanguageInfo("FO4412", "Region Management");

                ExpBasicOpt.Header = CurrentApp.GetLanguageInfo("4412001", "Basic Operations");
                ExpOtherPos.Header = CurrentApp.GetLanguageInfo("4412002", "Other Position");

                for (int i = 0; i < mListUserOperations.Count; i++)
                {
                    var optInfo = mListUserOperations[i];
                    optInfo.Display     = CurrentApp.GetLanguageInfo(string.Format("FO{0}", optInfo.ID), optInfo.ID.ToString());
                    optInfo.Description = optInfo.Display;
                }
                CreateBasicOperations();
                CreateRegionTreeColumns();

                for (int i = 0; i < mListRegionItems.Count; i++)
                {
                    var item = mListRegionItems[i];
                    var info = item.Data as RegionInfo;
                    if (info == null)
                    {
                        continue;
                    }

                    item.StrType = CurrentApp.GetLanguageInfo(string.Format("4412013{0}", info.Type.ToString("000")),
                                                              info.Type.ToString());
                    item.StrState = CurrentApp.GetLanguageInfo(string.Format("4412014{0}", info.State.ToString("000")),
                                                               info.State.ToString());
                    item.StrIsDefault =
                        CurrentApp.GetLanguageInfo(
                            string.Format("4412015{0}", info.IsDefault ? 1.ToString("000") : 0.ToString("000")),
                            info.IsDefault ? "Yes" : "No");
                }

                var child = BorderSeatSetting.Child as UMPUserControl;
                if (child != null)
                {
                    child.ChangeLanguage();
                }

                PopupPanel.ChangeLanguage();
            }
            catch { }
        }
示例#4
0
 //......ing
 #region ChangLanguage
 public override void ChangeLanguage()
 {
     try
     {
         base.ChangeLanguage();
         CurrentApp.AppTitle  = CurrentApp.GetLanguageInfo("FO1111", "UMP Rent Management");
         LabRent.Content      = CurrentApp.GetLanguageInfo("1111L001", "Rent");
         ButtonAdd.Content    = CurrentApp.GetLanguageInfo("1111B001", "Add");
         ButtonDelete.Content = CurrentApp.GetLanguageInfo("1111B002", "Delete");
         if (this.PopupPanel.IsOpen)
         {
             PopupPanel.ChangeLanguage();
         }
         InitListresourceName();
         InitTree();
     }
     catch (Exception ex)
     { }
 }
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            try
            {
                CurrentApp.AppTitle = CurrentApp.GetLanguageInfo("FO4415", "Alarm Management");

                ExpBasicOpt.Header = CurrentApp.GetLanguageInfo("4415001", "Basic Operations");
                ExpOtherPos.Header = CurrentApp.GetLanguageInfo("4415002", "Others Positions");

                for (int i = 0; i < mListUserOperations.Count; i++)
                {
                    var optInfo = mListUserOperations[i];
                    optInfo.Display     = CurrentApp.GetLanguageInfo(string.Format("FO{0}", optInfo.ID), optInfo.ID.ToString());
                    optInfo.Description = optInfo.Display;
                }
                CreateBasicOperations();
                CreateAlarmColumns();

                for (int i = 0; i < mListAlarmMessageItems.Count; i++)
                {
                    var item = mListAlarmMessageItems[i];
                    var info = item.Info;
                    if (info == null)
                    {
                        continue;
                    }

                    item.Type     = CurrentApp.GetLanguageInfo(string.Format("4415015{0}", info.Type.ToString("000")), info.Type.ToString());
                    item.StrState = info.State == 0
                        ? CurrentApp.GetLanguageInfo("4415021000", "Enable")
                        : CurrentApp.GetLanguageInfo("4415021002", "Disable");
                }

                PopupPanel.ChangeLanguage();
            }
            catch { }
        }
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            try
            {
                CurrentApp.AppTitle = CurrentApp.GetLanguageInfo("FO4413", "Seat Management");

                ExpBasicOpt.Header = CurrentApp.GetLanguageInfo("4413001", "Basic Operations");
                ExpOtherPos.Header = CurrentApp.GetLanguageInfo("4413002", "Other Positions");

                for (int i = 0; i < mListUserOperations.Count; i++)
                {
                    var optInfo = mListUserOperations[i];
                    optInfo.Display     = CurrentApp.GetLanguageInfo(string.Format("FO{0}", optInfo.ID), optInfo.ID.ToString());
                    optInfo.Description = optInfo.Display;
                }
                CreateBasicOperations();
                CreateSeatColumns();

                for (int i = 0; i < mListSeatItems.Count; i++)
                {
                    var item = mListSeatItems[i];
                    var info = item.Data as SeatInfo;
                    if (info == null)
                    {
                        continue;
                    }

                    item.StrState =
                        CurrentApp.GetLanguageInfo(string.Format("4413010{0}", info.State.ToString("000")),
                                                   info.State.ToString());
                }

                PopupPanel.ChangeLanguage();
            }
            catch { }
        }
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            try
            {
                CurrentApp.AppTitle = CurrentApp.GetLanguageInfo("FO4411", "Onsite Monitor");

                LbRegionList.Text = CurrentApp.GetLanguageInfo("4411001", "Region List");

                InitToolBtnItems();
                CreateToolBtnItems();

                var child = BorderContent.Child as UMPUserControl;
                if (child != null)
                {
                    child.ChangeLanguage();
                }

                PopupPanel.ChangeLanguage();
            }
            catch { }
        }
        public override void ChangeLanguage()
        {
            try
            {
                base.ChangeLanguage();
                //Operation
                for (int i = 0; i < ListOperations.Count; i++)
                {
                    ListOperations[i].Display = CurrentApp.GetLanguageInfo(string.Format("FO{0}", ListOperations[i].ID), ListOperations[i].ID.ToString());
                }
                CreateOptButtons();

                // Other
                tabOrg.Header   = CurrentApp.GetLanguageInfo("46010001", "Organizition");
                tabSkill.Header = CurrentApp.GetLanguageInfo("46010002", "Skill Group");

                //Columns
                CreateObjcetKPIDetailColumns();

                //记录列(ListView)中的内容
                for (int i = 0; i < mListKpiMapObjectInfoItem.Count; i++)
                {
                    KpiMapObjectInfoItem item = mListKpiMapObjectInfoItem[i];
                    item.StrKPIName    = CurrentApp.GetLanguageInfo(string.Format("4601KPI{0}", item.KpiMapObjectInfo.KpiID), item.KPIName.ToString());
                    item.StrApplyCycle = CurrentApp.GetLanguageInfo(string.Format("4601BP{0}", item.ApplyCycle), item.ApplyCycle.ToString());
                    item.StrIsActive   = CurrentApp.GetLanguageInfo(string.Format("4601IsActive{0}", item.IsActive), item.IsActive.ToString());
                    item.StrDropDown   = CurrentApp.GetLanguageInfo(string.Format("4601BPDropDown{0}", item.DropDown), item.DropDown.ToString());
                    item.StrApplyAll   = CurrentApp.GetLanguageInfo(string.Format("4601BPApplyAll{0}", item.ApplyAll), item.ApplyAll.ToString());
                    item.StrObjectType = CurrentApp.GetLanguageInfo(string.Format("4601BPOBJ{0}", item.ObjectType), item.ObjectType.ToString());
                }

                PopupPanel.ChangeLanguage();
            }
            catch (Exception ex)
            {
            }
        }
示例#9
0
        protected override void App_NetPipeEvent(WebRequest webRequest)
        {
            Dispatcher.Invoke(new Action(() =>
            {
                try
                {
                    var code    = webRequest.Code;
                    var session = webRequest.Session;
                    var strData = webRequest.Data;
                    switch (code)
                    {
                    case (int)RequestCode.SCLanguageChange:
                        LangTypeInfo langTypeInfo =
                            App.Session.SupportLangTypes.FirstOrDefault(l => l.LangID.ToString() == strData);
                        if (langTypeInfo != null)
                        {
                            LangTypeInfo             = langTypeInfo;
                            App.Session.LangTypeInfo = langTypeInfo;
                            App.Session.LangTypeID   = langTypeInfo.LangID;
                            if (MyWaiter != null)
                            {
                                MyWaiter.Visibility = Visibility.Visible;
                            }
                            mWorker                     = new BackgroundWorker();
                            mWorker.DoWork             += (s, de) => App.InitLanguageInfos();
                            mWorker.RunWorkerCompleted += (s, re) =>
                            {
                                mWorker.Dispose();
                                if (MyWaiter != null)
                                {
                                    MyWaiter.Visibility = Visibility.Hidden;
                                }
                                if (PopupPanel != null)
                                {
                                    PopupPanel.ChangeLanguage();
                                }
                                if (PageHead != null)
                                {
                                    PageHead.SessionInfo = App.Session;
                                    PageHead.InitInfo();
                                }
                            };
                            mWorker.RunWorkerAsync();
                        }
                        break;

                    case (int)RequestCode.SCThemeChange:
                        ThemeInfo themeInfo = App.Session.SupportThemes.FirstOrDefault(t => t.Name == strData);
                        if (themeInfo != null)
                        {
                            ThemeInfo             = themeInfo;
                            App.Session.ThemeInfo = themeInfo;
                            App.Session.ThemeName = themeInfo.Name;
                            ChangeTheme();
                            PageHead.SessionInfo = App.Session;
                            PageHead.InitInfo();
                        }
                        break;
                    }
                }
                catch (Exception ex)
                {
                    App.ShowExceptionMessage(ex.Message);
                }
            }));
        }