Beispiel #1
0
 private void BtnConfirm_Click(object sender, RoutedEventArgs e)
 {
     if (selTaskRecord.TaskType == "4" || selTaskRecord.TaskType == "3")
     {
         if (selScoreSheet.ScoreSheetID != oldTemplateID)
         {
             var confirmResult = MessageBox.Show(CurrentApp.GetLanguageInfo("3103T00184", "The score sheet don not be used for the last time,continue?"),
                                                 CurrentApp.AppTitle, MessageBoxButton.YesNo, MessageBoxImage.Question);
             if (confirmResult != MessageBoxResult.Yes)
             {
                 return;
             }
         }
     }
     ParentPage.ScoreTaskRecord(selScoreSheet);
 }
Beispiel #2
0
        private void Init()
        {
            ChangeLanguage();
            ButSearchCategroy.Children.Clear();
            Button        btn;
            OperationInfo opt;

            btn                   = new Button();
            btn.Click            += SearchCategory_Click;
            opt                   = new OperationInfo();
            opt.Icon              = "Images/search.png";
            TbSearchCategroy.Text = CurrentApp.GetLanguageInfo("3602T00153", "Search Category");
            btn.DataContext       = opt;
            btn.SetResourceReference(StyleProperty, "OptButtonStyle");
            ButSearchCategroy.Children.Add(btn);
        }
        public override void GetNameAndDescription()
        {
            base.GetNameAndDescription();

            //[主/备] HostAddress
            if (IsMaster)
            {
                Name        = string.Format("[{0}] {1}", CurrentApp.GetLanguageInfo("1110110", "Master"), HostAddress);
                Description = string.Format("[{0}] {1}\r\n{2}", CurrentApp.GetLanguageInfo("1110110", "Master"), HostAddress, ObjectID);
            }
            else
            {
                Name        = string.Format("[{0}] {1}", CurrentApp.GetLanguageInfo("1110111", "Slaver"), HostAddress);
                Description = string.Format("[{0}] {1}\r\n{2}", CurrentApp.GetLanguageInfo("1110111", "Slaver"), HostAddress, ObjectID);
            }
        }
Beispiel #4
0
        private void BtnConfirm_Click(object sender, RoutedEventArgs e)
        {
            DateTime DTBeginStr = (DateTime)UC_DateTime_Begin.Value;
            DateTime DTEndStr   = (DateTime)UC_DateTime_End.Value;
            int      sec        = (DTEndStr - DTBeginStr).Seconds;

            if (sec < 0)
            {
                CurrentApp.ShowInfoMessage(CurrentApp.GetLanguageInfo("6101N0010", "The time setting error"));
            }
            else
            {
                CollectData();
                SaveQueryCondition();
            }
        }
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            MainPage.PopupPanel.Title = CurrentApp.GetLanguageInfo("1110301", "Add PBXDevices");
            this.LabelBaseExt.Content = CurrentApp.GetLanguageInfo("1110307", "Base PBX Device:");
            this.LabelCTIType.Content = CurrentApp.GetLanguageInfo("1110302", "CTI Type:");
            this.LabelCount.Content   = CurrentApp.GetLanguageInfo("1110202", "Count:");
            this.LabelExt.Content     = CurrentApp.GetLanguageInfo("1110304", "Name:");
            this.LabelWay.Content     = CurrentApp.GetLanguageInfo("1110303", "Add Way:");
            this.RadBatch.Content     = CurrentApp.GetLanguageInfo("1110306", "Batch");
            this.RadSyn.Content       = CurrentApp.GetLanguageInfo("1110305", "同步设备");

            this.BtnClose.Content   = CurrentApp.GetLanguageInfo("11100", "Close");
            this.BtnConfirm.Content = CurrentApp.GetLanguageInfo("11101", "Confirm");
        }
Beispiel #6
0
        void BasicOpt_Click(object sender, RoutedEventArgs e)
        {
            var btn = e.Source as Button;

            if (btn != null)
            {
                var optItem = btn.DataContext as OperationInfo;
                if (optItem == null)
                {
                    return;
                }
                switch (optItem.ID)
                {
                case S5100Const.OPT_KeyWorldAdd:
                    UC_KeyWorldEdit ucKeyWorldEdit = new UC_KeyWorldEdit();
                    ucKeyWorldEdit.CurrentApp   = CurrentApp;
                    ucKeyWorldEdit.iAddOrModify = OperationType.Add;
                    ucKeyWorldEdit.ParentPage   = this;
                    PopupPanel.Content          = ucKeyWorldEdit;
                    PopupPanel.Title            = CurrentApp.GetLanguageInfo("5102004", "Add a new key world");
                    PopupPanel.IsOpen           = true;
                    break;

                case S5100Const.OPT_KeyWroldModify:
                    ucKeyWorldEdit              = new UC_KeyWorldEdit();
                    ucKeyWorldEdit.CurrentApp   = CurrentApp;
                    ucKeyWorldEdit.iAddOrModify = OperationType.Modify;
                    KeyWorldsEntityInList item = lvKeyWorldsObject.SelectedItem as KeyWorldsEntityInList;
                    ucKeyWorldEdit.keyWorldInModify = item;
                    ucKeyWorldEdit.ParentPage       = this;
                    PopupPanel.Content = ucKeyWorldEdit;
                    PopupPanel.Title   = CurrentApp.GetLanguageInfo("5102011", "Change the label level of keywords");
                    PopupPanel.IsOpen  = true;
                    break;

                case S5100Const.OPT_KeyWorldDelete:
                    string           strConfirm  = CurrentApp.GetLanguageInfo("5102013", "Confirm");
                    string           strPopupMsg = CurrentApp.GetLanguageInfo("5102010", "Are you sure you delete this item?");
                    MessageBoxResult result      = MessageBox.Show(strPopupMsg, strConfirm, MessageBoxButton.YesNo, MessageBoxImage.Warning);
                    if (result == MessageBoxResult.Yes)
                    {
                        DeleteKeyworld();
                    }
                    break;
                }
            }
        }
Beispiel #7
0
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            try
            {
                var parent = Parent as PopupPanel;
                if (parent != null)
                {
                    if (IsModify)
                    {
                        parent.Title = CurrentApp.GetLanguageInfo("4415004", "Modify Alarm");
                    }
                    else
                    {
                        parent.Title = CurrentApp.GetLanguageInfo("4415003", "Add Alarm");
                    }
                }

                BtnConfirm.Content = CurrentApp.GetLanguageInfo("COM001", "Confirm");
                BtnClose.Content   = CurrentApp.GetLanguageInfo("COM002", "Close");

                LbName.Text          = CurrentApp.GetLanguageInfo("4415005", "Alarm Name");
                LbType.Text          = CurrentApp.GetLanguageInfo("4415006", "Type");
                LbState.Text         = CurrentApp.GetLanguageInfo("4415020", "Alarm Type");
                LbRank.Text          = CurrentApp.GetLanguageInfo("4415008", "Rank");
                LbColor.Text         = CurrentApp.GetLanguageInfo("4415009", "Color");
                LbIcon.Text          = CurrentApp.GetLanguageInfo("4415010", "Icon");
                LbHoldTime.Text      = CurrentApp.GetLanguageInfo("4415011", "Hold Time");
                LbRelativeState.Text = CurrentApp.GetLanguageInfo("4415012", "Relative State");
                LbValue.Text         = CurrentApp.GetLanguageInfo("4415013", "Value");
                LbContent.Text       = CurrentApp.GetLanguageInfo("4415014", "Content");

                RadioStateEnable.Content  = CurrentApp.GetLanguageInfo("4415021000", "Enable");
                RadioStateDisable.Content = CurrentApp.GetLanguageInfo("4415021002", "Disable");

                for (int i = 0; i < mListTypeItems.Count; i++)
                {
                    var item     = mListTypeItems[i];
                    int intValue = item.IntValue;

                    item.Display = CurrentApp.GetLanguageInfo(string.Format("4415015{0}", intValue.ToString("000")),
                                                              intValue.ToString());
                }
            }
            catch (Exception ex) { }
        }
Beispiel #8
0
 private void ProcessApproval()
 {
     try
     {
         CurrentFocusReCheckData = new CCheckData();
         CurrentFocusReCheckData = (CCheckData)LvReCheck.SelectedItem;
         AgentID = CurrentFocusReCheckData.AgentID;
         if (S3105App.ListScoreParam.Where(p => p.ParamID == 31010404).Count() != 0)
         {
             DateTime dealTime = Convert.ToDateTime(CurrentFocusReCheckData.AppealDatetime).AddHours(Convert.ToInt32((S3105App.ListScoreParam.Where(p => p.ParamID == 31010404).First().ParamValue.Substring(9, 4))));//申诉后任务处理截至日期
             if (S3105App.ListScoreParam.Where(p => p.ParamID == 31010404).First().ParamValue.Substring(8, 1) == "1" && DateTime.Compare(dealTime, DateTime.Now) < 0)
             {
                 ShowInformation(CurrentApp.GetLanguageInfo("3105T00116", "Has exceeded the task processing time.")); return;
             }
         }
         if (!string.IsNullOrWhiteSpace(CurrentFocusReCheckData.RecoredReference) && CurrentFocusReCheckData != null)
         {
             if (S3105App.AppealProcess == "N")
             {
                 PopupPanel.Title = CurrentApp.GetLanguageInfo("3105T00011", "Re-assessment");
                 ProcessReCheck popProcessCheck = new ProcessReCheck();
                 popProcessCheck.CurrentApp   = CurrentApp;
                 popProcessCheck.SelCheckData = CurrentFocusReCheckData;
                 popProcessCheck.ParentPage   = this;
                 PopupPanel.Content           = popProcessCheck;
                 PopupPanel.IsOpen            = true;
             }
             else
             {
                 PopupPanel.Title = CurrentApp.GetLanguageInfo("3105T00011", "Re-assessment");
                 ProcessReCheck popProcessCheck = new ProcessReCheck();
                 popProcessCheck.CurrentApp   = CurrentApp;
                 popProcessCheck.SelCheckData = CurrentFocusReCheckData;
                 popProcessCheck.ParentPage   = this;
                 PopupPanel.Content           = popProcessCheck;
                 PopupPanel.IsOpen            = true;
             }
         }
         else
         {
             ShowInformation(CurrentApp.GetLanguageInfo("3105T00052", "Please select one record at least."));
         }
     }
     catch (Exception)
     {
     }
 }
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            try
            {
                var parent = Parent as PopupPanel;
                if (parent != null)
                {
                    if (IsModify)
                    {
                        parent.Title = CurrentApp.GetLanguageInfo("4414004", "Modify State");
                    }
                    else
                    {
                        parent.Title = CurrentApp.GetLanguageInfo("4414003", "Add State");
                    }
                }

                BtnConfirm.Content = CurrentApp.GetLanguageInfo("COM001", "Confirm");
                BtnClose.Content   = CurrentApp.GetLanguageInfo("COM002", "Close");

                LbName.Text  = CurrentApp.GetLanguageInfo("4414005", "State Name");
                LbType.Text  = CurrentApp.GetLanguageInfo("4414006", "Type");
                LbState.Text = CurrentApp.GetLanguageInfo("4414007", "State");
                LbColor.Text = CurrentApp.GetLanguageInfo("4414008", "Color");
                //LbIcon.Text = CurrentApp.GetLanguageInfo("4414009", "Icon");
                //LbIsWorkTime.Text = CurrentApp.GetLanguageInfo("4414010", "Is work time");
                LbValue.Text       = CurrentApp.GetLanguageInfo("4414011", "Value");
                LbDescription.Text = CurrentApp.GetLanguageInfo("4414012", "Description");

                for (int i = 0; i < mListStateTypeItems.Count; i++)
                {
                    var item     = mListStateTypeItems[i];
                    int intValue = item.Value;

                    item.Display = CurrentApp.GetLanguageInfo(string.Format("4414013{0}", intValue.ToString("000")),
                                                              intValue.ToString());
                }

                RadioStateEnable.Content  = CurrentApp.GetLanguageInfo("4414014001", "Enable");
                RadioStateDisable.Content = CurrentApp.GetLanguageInfo("4414014000", "Disable");
                //RadioIsWorkTimeYes.Content = CurrentApp.GetLanguageInfo("4414015001", "Yes");
                //RadioIsWorkTimeNo.Content = CurrentApp.GetLanguageInfo("4414015000", "No");
            }
            catch { }
        }
Beispiel #10
0
        private void DeleteKeyworld()
        {
            Service510011Client client = null;

            try
            {
                KeyWorldsEntityInList keyWorld   = lvKeyWorldsObject.SelectedItem as KeyWorldsEntityInList;
                WebRequest            webRequest = new WebRequest();
                webRequest.Code    = (int)S5100RequestCode.DeleteKeyWorld;
                webRequest.Session = CurrentApp.Session;
                webRequest.ListData.Add(keyWorld.KeyWorldID);
                client = new Service510011Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session),
                                                 WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service51001"));
                WebReturn webReturn = client.DoOperation(webRequest);
                CurrentApp.MonitorHelper.AddWebReturn(webReturn);
                client.Close();
                if (!webReturn.Result)
                {
                    if (webReturn.Code != Defines.RET_FAIL)
                    {
                        ShowException(CurrentApp.GetLanguageInfo(((int)webReturn.Code).ToString(), string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message)));
                        return;
                    }
                    else
                    {
                        ShowException(string.Format("WSFail.\t{0}\t{1}", webReturn.Code, webReturn.Message));
                        return;
                    }
                }
                CurrentApp.ShowInfoMessage(CurrentApp.GetLanguageInfo("OPR1", "Success"));
                UpdateListView(keyWorld, OperationType.Delete);
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
            finally
            {
                if (client != null)
                {
                    if (client.State == System.ServiceModel.CommunicationState.Opened)
                    {
                        client.Close();
                    }
                }
            }
        }
Beispiel #11
0
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            try
            {
                var parent = Parent as PopupPanel;
                if (parent != null)
                {
                    if (IsModify)
                    {
                        parent.Title = CurrentApp.GetLanguageInfo("4412004", "Modify Region");
                    }
                    else
                    {
                        parent.Title = CurrentApp.GetLanguageInfo("4412003", "Modify Region");
                    }
                }

                BtnConfirm.Content = CurrentApp.GetLanguageInfo("COM001", "Confirm");
                BtnClose.Content   = CurrentApp.GetLanguageInfo("COM002", "Close");

                LbRegionName.Text   = CurrentApp.GetLanguageInfo("4412005", "Region Name");
                LbRegionType.Text   = CurrentApp.GetLanguageInfo("4412006", "Region Type");
                LbRegionState.Text  = CurrentApp.GetLanguageInfo("4412007", "State");
                LbIsDefault.Text    = CurrentApp.GetLanguageInfo("4412008", "Is Default");
                LbRegionWidth.Text  = CurrentApp.GetLanguageInfo("4412009", "Width");
                LbRegionHeight.Text = CurrentApp.GetLanguageInfo("4412010", "Height");
                LbBgColor.Text      = CurrentApp.GetLanguageInfo("4412011", "Background Color");
                LbBgImage.Text      = CurrentApp.GetLanguageInfo("4412012", "Background Image");

                for (int i = 0; i < mListRegionTypes.Count; i++)
                {
                    var item     = mListRegionTypes[i];
                    int intValue = item.Value;

                    item.Display = CurrentApp.GetLanguageInfo(string.Format("4412013{0}", intValue.ToString("000")),
                                                              intValue.ToString());
                }

                RadioStateEnable.Content  = CurrentApp.GetLanguageInfo("4412014001", "Enable");
                RadioStateDisable.Content = CurrentApp.GetLanguageInfo("4412014000", "Disable");
                RadioDefaultYes.Content   = CurrentApp.GetLanguageInfo("4412015001", "Yes");
                RadioDefaultNo.Content    = CurrentApp.GetLanguageInfo("4412015000", "No");
            }
            catch { }
        }
        private bool CheckAgentInfo()
        {
            string agentID = this.TextBoxAgentID.Text.Trim();

            if (agentID == string.Empty)
            {
                CurrentApp.ShowInfoMessage(CurrentApp.GetLanguageInfo("S1103022", "AgentID is empty"));
                return(false);
            }
            int AgentNum = 0;

            foreach (DataRow dr in S1103App.IDataTable11101.Rows)
            {
                if (agentID == dr["C017"].ToString())
                {
                    AgentNum++;
                }
            }
            if (ModelID == "E")
            {
                if (strAgentNameID == agentID)
                {
                    if (AgentNum > 1)
                    {
                        CurrentApp.ShowInfoMessage(CurrentApp.GetLanguageInfo("S1103034", "AgentID is not available"));
                        return(false);
                    }
                }
                else
                {
                    if (AgentNum > 0)
                    {
                        CurrentApp.ShowInfoMessage(CurrentApp.GetLanguageInfo("S1103034", "AgentID is not available"));
                        return(false);
                    }
                }
            }
            else
            {
                if (AgentNum == 1)
                {
                    CurrentApp.ShowInfoMessage(CurrentApp.GetLanguageInfo("S1103034", "AgentID is not available"));
                    return(false);
                }
            }
            return(true);
        }
Beispiel #13
0
        private void GetAllPaperInfos()
        {
            try
            {
                _mListPaperInfos.Clear();
                var webRequest            = new WebRequest();
                Service36031Client client = new Service36031Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service36031"));
                //var client = new Service36031Client();
                webRequest.Session = CurrentApp.Session;
                webRequest.Code    = (int)S3603Codes.OptGetPapers;

                WebReturn webReturn = client.UmpTaskOperation(webRequest);
                client.Close();
                if (!webReturn.Result)
                {
                    ShowException(CurrentApp.GetLanguageInfo("3603T00015", "Insert data failed"));
                    return;
                }

                if (webReturn.ListData.Count <= 0)
                {
                    return;
                }
                foreach (string strDate in webReturn.ListData)
                {
                    OperationReturn optReturn = XMLHelper.DeserializeObject <CPaperParam>(strDate);
                    if (!optReturn.Result)
                    {
                        ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                        continue;
                    }
                    var cExamPapers = optReturn.Data as CPaperParam;
                    if (cExamPapers == null)
                    {
                        ShowException("Fail. filesItem is null");
                        return;
                    }

                    _mListPaperInfos.Add(cExamPapers);
                }
                SetObservableCollection(_mListPaperInfos);
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Beispiel #14
0
        public override void ChangeLanguage()
        {
            try
            {
                base.ChangeLanguage();

                CreateOperationButton();
                InitTaskDetailColumns();

                SetPageContentLanguage();

                //给换语言包
                ExpanderBasic.Header = CurrentApp.GetLanguageInfo("3103T00052", "Basic Operations");
                ExpanderOther.Header = CurrentApp.GetLanguageInfo("3103T00053", "Other Position");
            }
            catch { }
        }
        private void CreateAlarmMessageItems()
        {
            try
            {
                mListAlarmMessageItems.Clear();
                for (int i = 0; i < mListAlarmMessageInfos.Count; i++)
                {
                    var info = mListAlarmMessageInfos[i];

                    AlarmMessageItem item = new AlarmMessageItem();
                    item.Info       = info;
                    item.CurrentApp = CurrentApp;
                    item.SerialID   = info.SerialID;
                    item.Name       = info.Name;
                    item.Type       = info.Type.ToString();
                    item.Rank       = info.Rank.ToString();
                    item.Value      = info.Value;
                    item.Color      = info.Color;
                    item.Icon       = info.Icon;
                    item.HoldTime   = info.HoldTime.ToString();

                    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");
                    item.BrushColor = GetBrushFromColorString(info.Color);

                    string strState = string.Empty;
                    if (info.StateID > 0)
                    {
                        var agentState = mListAgentStateInfos.FirstOrDefault(s => s.ObjID == info.StateID);
                        if (agentState != null)
                        {
                            strState = agentState.Name;
                        }
                    }
                    item.RelativeState = strState;

                    mListAlarmMessageItems.Add(item);
                }
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
        private void LoadUserOperations()
        {
            try
            {
                mListUserOperations.Clear();
                WebRequest webRequest = new WebRequest();
                webRequest.Code    = (int)RequestCode.WSGetUserOptList;
                webRequest.Session = CurrentApp.Session;
                webRequest.ListData.Add(CurrentApp.Session.UserInfo.UserID.ToString());
                webRequest.ListData.Add("44");
                webRequest.ListData.Add("4415");
                CurrentApp.MonitorHelper.AddWebRequest(webRequest);
                Service11012Client client = new Service11012Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session),
                                                                   WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service11012"));
                WebReturn webReturn = client.DoOperation(webRequest);
                client.Close();
                CurrentApp.MonitorHelper.AddWebReturn(webReturn);
                if (!webReturn.Result)
                {
                    ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message));
                    return;
                }
                for (int i = 0; i < webReturn.ListData.Count; i++)
                {
                    OperationReturn optReturn = XMLHelper.DeserializeObject <OperationInfo>(webReturn.ListData[i]);
                    if (!optReturn.Result)
                    {
                        ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                        return;
                    }
                    OperationInfo optInfo = optReturn.Data as OperationInfo;
                    if (optInfo != null)
                    {
                        optInfo.Display     = CurrentApp.GetLanguageInfo(string.Format("FO{0}", optInfo.ID), optInfo.ID.ToString());
                        optInfo.Description = optInfo.Display;
                        mListUserOperations.Add(optInfo);
                    }
                }

                CurrentApp.WriteLog("LoadOperations", string.Format("Load end.\t{0}", mListUserOperations.Count));
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Beispiel #17
0
        private void Init()
        {
            try
            {
                string strTitle = string.Format("{0} —— ", CurrentApp.GetLanguageInfo("2102016", "Screen Monitor"));
                if (MonitorData != null)
                {
                    mMonitorItem                = MonitorItem.CreateItem(MonitorData);
                    mMonitorItem.CurrentApp     = CurrentApp;
                    mMonitorItem.ListUserParams = ListUserParams;
                    mMonitorObject              = new MonitorObject();
                    mMonitorObject.MonType      = MonitorType.MonScr;
                    mMonitorObject.ObjID        = MonitorData.ObjID;
                    mMonitorObject.ObjType      = MonitorData.ObjType;
                    mMonitorObject.ObjValue     = MonitorData.Name;
                    mMonitorObject.Role         = 2;
                    string strOther03 = MonitorData.Other03;
                    if (!string.IsNullOrEmpty(strOther03))
                    {
                        string[] arrOther03 = strOther03.Split(new[] { ';' }, StringSplitOptions.None);
                        if (arrOther03.Length > 1)
                        {
                            mMonitorObject.Other03 = arrOther03[1];
                        }
                        else if (arrOther03.Length > 0)
                        {
                            mMonitorObject.Other03 = arrOther03[0];
                        }
                    }
                    mMonitorItem.ScreenChanMonObject = mMonitorObject;
                    Dispatcher.Invoke(new Action(mMonitorItem.UpdateState));
                    DataContext = mMonitorItem;
                    strTitle   += mMonitorItem.Name;

                    ImageIcon.SetResourceReference(StyleProperty,
                                                   string.Format("NMonImageIcon{0}Style", mMonitorItem.ObjType));

                    InitMonitorClient();
                }
                TxtObjListTitle.Text = strTitle;
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            try
            {
                var parent = Parent as PopupPanel;
                if (parent != null)
                {
                    parent.Title = CurrentApp.GetLanguageInfo("4412016", "Region Management");
                }

                BtnConfirm.Content = CurrentApp.GetLanguageInfo("COM001", "Confirm");
                BtnClose.Content   = CurrentApp.GetLanguageInfo("COM002", "Close");
            }
            catch { }
        }
Beispiel #19
0
 public override void ChangeLanguage()
 {
     base.ChangeLanguage();
     ChkPaperName.Content       = CurrentApp.GetLanguageInfo("3603T00027", "Paper Name");
     ChkPaperNum.Content        = CurrentApp.GetLanguageInfo("3603T00028", "Paper Num");
     ChkPaperType.Content       = CurrentApp.GetLanguageInfo("3603T00029", "Paper Type");
     ChkIntegrity.Content       = CurrentApp.GetLanguageInfo("3603T00030", "Integrity");
     ComBoxIntegrity1.Content   = CurrentApp.GetLanguageInfo("3603T00072", "Y");
     ComBoxIntegrity2.Content   = CurrentApp.GetLanguageInfo("3603T00073", "N");
     TxStartTime.Text           = CurrentApp.GetLanguageInfo("3603T00085", "Create Time");
     TxEndTime.Text             = CurrentApp.GetLanguageInfo("3603T00032", "To");
     ButSearchPaper.Content     = CurrentApp.GetLanguageInfo("3603T00033", "Search");
     BtnAddPaper.Content        = CurrentApp.GetLanguageInfo("3603T00034", "Add");
     BtnClose.Content           = CurrentApp.GetLanguageInfo("3603T00035", "Close");
     PaperInfoTable.Title       = CurrentApp.GetLanguageInfo("3603T00036", "Paper");
     CmbPaperType.SelectedIndex = -1;
 }
Beispiel #20
0
 private void ArrangeSeat()
 {
     try
     {
         double totalWidth = BorderRegionMap.ActualWidth;
         double totalHeight = BorderRegionMap.ActualHeight;
         double x = 0, y = 0;
         int    count = mListSeatItems.Count;
         for (int i = 0; i < count; i++)
         {
             var item = mListSeatItems[i];
             item.Left = (int)Math.Round(x);
             item.Top  = (int)Math.Round(y);
             var info = item.Info;
             if (info != null)
             {
                 info.Left = item.Left;
                 info.Top  = item.Top;
             }
             var panel = item.SeatPanel;
             if (panel != null)
             {
                 panel.SetPosition();
             }
             //基本的排列策略,更为复杂的排列策略以后实现
             //每个座位是 80 * 80 ,座位与座位之间间隔5,从左向右,从上到下顺序排列
             x += 80 + 5;
             if (x + 80 + 5 >= totalWidth)
             {
                 x  = 0;
                 y += 80 + 5;
             }
             if (y + 80 + 5 >= totalHeight)
             {
                 //空间不足
                 ShowException(CurrentApp.GetLanguageInfo("4412N007", string.Format("No enough area, some seat can not arrange!")));
                 return;
             }
         }
         ShowInformation(CurrentApp.GetLanguageInfo("4412N008", "Arrange seat end."));
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Beispiel #21
0
        private void RemoveTabItem()
        {
            try
            {
                if (mListTabItems.Count <= 1)
                {
                    ShowException(CurrentApp.GetMessageLanguageInfo("013", "At least one tab item"));
                    return;
                }
                var tabItem = TabControlCondition.SelectedItem as ConditionTabItem;

                for (int j = 0; j < tabItem.Items.Count; j++)
                {
                    if (tabItem.Items[j].Name == "TimeTypeFromTo")
                    {
                        ShowException(CurrentApp.GetLanguageInfo("3102N038", "Can't delete the TabItem containing TimeTypeFromTo"));//加语言包~~
                        return;
                    }
                }
                if (tabItem != null)
                {
                    var result = MessageBox.Show(string.Format("{0}\r\n{1}",
                                                               CurrentApp.GetMessageLanguageInfo("012", "Confirm remove tab?"),
                                                               tabItem.TabName),
                                                 CurrentApp.AppName,
                                                 MessageBoxButton.YesNo,
                                                 MessageBoxImage.Question);
                    if (result == MessageBoxResult.Yes)
                    {
                        for (int i = tabItem.Items.Count - 1; i >= 0; i--)
                        {
                            ConditionItemItem item = tabItem.Items[i];
                            item.IsUserItem = false;
                            tabItem.Items.Remove(item);
                            mListUserConditions.Remove(item);
                            mListAvaliableConditions.Add(item);
                        }
                        mListTabItems.Remove(tabItem);
                    }
                }
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Beispiel #22
0
 private void InitToolButtonItems()
 {
     try
     {
         mListToolButtonItems.Clear();
         ToolButtonItem item = new ToolButtonItem();
         item.Name    = S1206Consts.TOOLBTN_WIDGETCONFIG;
         item.Display = CurrentApp.GetLanguageInfo("1206TB010", "Config");
         item.ToolTip = item.Display;
         item.Icon    = "Images/00008.png";
         mListToolButtonItems.Add(item);
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Beispiel #23
0
 private void TxtKeyword_OnTextChanged(object sender, TextChangedEventArgs e)
 {
     try
     {
         if (TxtKeyword.Text.Length > 120)
         {
             MessageBox.Show(CurrentApp.GetLanguageInfo("5101T00066",
                                                        "Add content should not exceed 120 characters."),
                             CurrentApp.GetLanguageInfo("5101T00050", "Warning"),
                             MessageBoxButton.OK);
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Beispiel #24
0
        private void InitPropertyItems()
        {
            try
            {
                mListWidgetPropertyItems.Clear();
                for (int i = 0; i < mListWidgetPropertyInfos.Count; i++)
                {
                    var info = mListWidgetPropertyInfos[i];
                    WidgetPropertyItem item = new WidgetPropertyItem();
                    item.WidgetID     = info.WidgetID;
                    item.PropertyID   = info.PropertyID;
                    item.Name         = info.Name;
                    item.Display      = CurrentApp.GetLanguageInfo(string.Format("1206WP{0}{1}", info.WidgetID, info.PropertyID.ToString("000")), info.Name);
                    item.Description  = item.Display;
                    item.PropertyInfo = info;
                    GetItemDescription(item);

                    var propertyValue =
                        mListWidgetPropertyValues.FirstOrDefault(
                            p =>
                            p.WidgetID == item.WidgetID && p.UserID == CurrentApp.Session.UserID &&
                            p.PropertyID == item.PropertyID);
                    if (propertyValue == null)
                    {
                        propertyValue            = new UserWidgetPropertyValue();
                        propertyValue.WidgetID   = item.WidgetID;
                        propertyValue.UserID     = CurrentApp.Session.UserID;
                        propertyValue.PropertyID = item.PropertyID;
                        propertyValue.Value01    = info.DefaultValue;
                        mListWidgetPropertyValues.Add(propertyValue);
                    }
                    item.PropertyValue = propertyValue;

                    item.CurrentApp            = CurrentApp;
                    item.WidgetItem            = WidgetItem;
                    item.ListAllPropertyItems  = mListWidgetPropertyItems;
                    item.ListAllPropertyValues = mListWidgetPropertyValues;

                    mListWidgetPropertyItems.Add(item);
                }
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Beispiel #25
0
        private void InitCTIType()
        {
            //加载CTI类型下拉对象
            List <BasicInfoData> TempBasicInfo = WizardHelper.ListAllBasicInfos.Where(p => p.InfoID == 111000300).ToList();

            mListCTITypeItems.Clear();
            foreach (BasicInfoData info in TempBasicInfo)
            {
                PropertyValueEnumItem propertyValueItem = new PropertyValueEnumItem();
                propertyValueItem.Value   = info.Value;
                propertyValueItem.Display =
                    CurrentApp.GetLanguageInfo(string.Format("BID{0}{1}", info.InfoID, info.SortID.ToString("000")),
                                               info.Icon);
                propertyValueItem.Info = info;
                mListCTITypeItems.Add(propertyValueItem);
            }
        }
Beispiel #26
0
        /// <summary>
        /// 创建listview显示的列
        /// </summary>
        private void CreateColumnsItems()
        {
            try
            {
                GridView             gv = new GridView();
                GridViewColumn       gvc;
                GridViewColumnHeader gvch;
                for (int i = 0; i < mListColumnItems.Count; i++)
                {
                    ViewColumnInfo columnInfo = mListColumnItems[i];
                    if (columnInfo.Visibility == "1")
                    {
                        gvc          = new GridViewColumn();
                        gvch         = new GridViewColumnHeader();
                        gvch.Content = columnInfo.Display;
                        string str = CurrentApp.Session.LangTypeID.ToString();
                        gvch.Content = CurrentApp.GetLanguageInfo(string.Format("COL{0}{1}", mViewID, columnInfo.ColumnName), columnInfo.Display);
                        gvch.ToolTip = CurrentApp.GetLanguageInfo(string.Format("COL{0}{1}", mViewID, columnInfo.ColumnName), columnInfo.Display);
                        gvc.Header   = gvch;
                        gvc.Width    = columnInfo.Width;

                        DataTemplate dt = null;
                        if (columnInfo.ColumnName == "KeyWorldColor")
                        {
                            dt = Resources["ColorCellTemplate"] as DataTemplate;
                        }
                        if (dt == null)
                        {
                            string strColName = columnInfo.ColumnName;
                            gvc.DisplayMemberBinding = new Binding(strColName);
                        }
                        else
                        {
                            gvc.CellTemplate = dt;
                        }
                        gv.Columns.Add(gvc);
                    }
                }
                int iCount = gv.Columns.Count;
                lvKeyWorldsObject.View = gv;
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
Beispiel #27
0
 public override void ChangeLanguage()
 {
     base.ChangeLanguage();
     ChkTestNum.Content     = CurrentApp.GetLanguageInfo("3603T00009", "Test Num");
     ChkPaperNum.Content    = CurrentApp.GetLanguageInfo("3603T00010", "Paper Num");
     ChkPaperName.Content   = CurrentApp.GetLanguageInfo("3603T00011", "Paper Name");
     ChkEditorNum.Content   = CurrentApp.GetLanguageInfo("3603T00014", "Test Set Person Num");
     ChkEditorName.Content  = CurrentApp.GetLanguageInfo("3603T00015", "Test Set Person Name");
     ChkTestState.Content   = CurrentApp.GetLanguageInfo("3603T00017", "Test State");
     ChkTestTime.Content    = CurrentApp.GetLanguageInfo("3603T00013", "Test Time");
     TbFrom.Text            = CurrentApp.GetLanguageInfo("3603T00085", "Create Time");
     ButOk.Content          = CurrentApp.GetLanguageInfo("3603T00051", "OK");
     ButClose.Content       = CurrentApp.GetLanguageInfo("3603T00052", "Close");
     ComBoxUsedNum0.Content = CurrentApp.GetLanguageInfo("3603T00079", "All");
     ComBoxUsedNum1.Content = CurrentApp.GetLanguageInfo("3603T00086", "Y");
     ComBoxUsedNum2.Content = CurrentApp.GetLanguageInfo("3603T00087", "N");
 }
 public void InitLanguage()
 {
     LabelOccurs.Content = CurrentApp.GetLanguageInfo("2402015", "Execution cycle");
     LabelOccursDailyMonthlyTip.Content = string.Empty;
     LabelFirstDay.Content           = CurrentApp.GetLanguageInfo("2402L017", "The first day");
     cmbSunday.Content               = CurrentApp.GetLanguageInfo("2402012", "Sunday");
     cmbMonday.Content               = CurrentApp.GetLanguageInfo("2402013", "Monday");
     LabelFirstDayOfWeek.Content     = CurrentApp.GetLanguageInfo("2402L018", "The first day of the week");
     cmbOccursD.Content              = CurrentApp.GetLanguageInfo("2402ComboTagD", "Day");
     cmbOccursM.Content              = CurrentApp.GetLanguageInfo("2402ComboTagM", "Month");
     cmbOccursW.Content              = CurrentApp.GetLanguageInfo("2402ComboTagW", "Week");
     cmbOccursU.Content              = CurrentApp.GetLanguageInfo("2402ComboTagU", "Custom");
     chkUpdateKeyImmediately.Content = CurrentApp.GetLanguageInfo("2402014", "Immediate update key");
     chkUpdateCycle.Content          = CurrentApp.GetLanguageInfo("2402015", "Update Period");
     LabelExecutionInterval.Content  = CurrentApp.GetLanguageInfo("2402L025", "Execution Interval");
     LabelIntervalDays.Content       = CurrentApp.GetLanguageInfo("2402L026", "day");
 }
Beispiel #29
0
        /// Author           : Luoyihua
        ///  Created          : 2014-11-06 16:46:00
        /// <summary>
        /// 初始化GridView
        /// </summary>
        /// <param name="columnname">数据列名</param>
        /// <param name="ColumnGridView">GridView</param>
        /// <param name="langid">列名对应的语言包ID</param>
        /// <param name="diaplay">默认显示</param>
        /// <param name="datatemplate">列样式信息</param>
        /// <param name="width">列宽度</param>
        private void SetColumnGridView(string columnname, ref GridView ColumnGridView, string langid, string diaplay, DataTemplate datatemplate, int width)
        {
            GridViewColumn gvc = new GridViewColumn();

            gvc.Header             = CurrentApp.GetLanguageInfo(langid, diaplay);
            gvc.Width              = width;
            gvc.HeaderStringFormat = columnname;
            if (datatemplate != null)
            {
                gvc.CellTemplate = datatemplate;
            }
            else
            {
                gvc.DisplayMemberBinding = new Binding(columnname);
            }
            ColumnGridView.Columns.Add(gvc);
        }
Beispiel #30
0
        private void PiDocument_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (Keyboard.IsKeyDown(Key.RightCtrl) ||
                Keyboard.IsKeyDown(Key.RightShift) ||
                Keyboard.IsKeyDown(Key.LeftCtrl) ||
                Keyboard.IsKeyDown(Key.LeftShift))
            {
                return;
            }
            _mPaperParam = new CPaperParam();
            var item = PIDocument.SelectedItem as CPaperParam;

            _mPaperParam = item;
            GetPaperQustions();
            UsableScore();
            ScoreValue.Text = string.Format("{0}({1} - {2})", CurrentApp.GetLanguageInfo("3601T00057", "Score"), _mIntScore, _mPaperParam.IntScores);
        }