Ejemplo n.º 1
0
        public void Start(object args)
        {
            if (null != args)
            {
                diseDTO = (MTMDisDTO)args;

                mycontrol.ItemsSource = disDataList;

                if (String.Equals("no", diseDTO.isfirst))
                {
                }
                EventAggregator eventAggragator = ServiceLocator.Current.GetInstance <EventAggregator>();
                eventAggragator.GetEvent <WebSocketEvent>().Subscribe(OnWebSocketEvent);
            }
        }
Ejemplo n.º 2
0
        private void OnWebSocketEvent(object data)
        {
            disDataList.Clear();

            diseDTO = (MTMDisDTO)data;

            foreach (String diskey in diseDTO.diseasedata.disease1)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease2)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease3)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease4)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease6)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease7)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease8)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease9)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease10)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease11)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease12)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            foreach (String diskey in diseDTO.diseasedata.disease13)
            {
                if (diseDictionary.ContainsKey(diskey))
                {
                    String value = diseDictionary[diskey];
                    disDataList.Add(value);
                }
            }
            mycontrol.ItemsSource = disDataList;
            mycontrol.Items.Refresh();
            Console.WriteLine("A7 page finish.");
        }