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); } }