コード例 #1
0
        private void toleft_Click(object sender, RoutedEventArgs e)
        {
            if (userfiles.SelectedItem == null)
            {
                return;
            }
            Com.Aote.ObjectTools.ObjectList c = userfiles.ItemsSource as Com.Aote.ObjectTools.ObjectList;
            IList list = new Com.Aote.ObjectTools.ObjectList();

            foreach (Object obj in userfiles.SelectedItems)
            {
                list.Add(obj);
            }
            Com.Aote.ObjectTools.ObjectList target = GetTarget();
            //if (target.selectObject == null)
            target.SelectObject = list;
            //else
            //(target.selectObject as IList).Add(userfiles.SelectedItem);

            foreach (Object obj in list)
            {
                c.Remove(obj);
            }
            c.OnPropertyChanged("Count");
        }
コード例 #2
0
        private void toright_Click(object sender, RoutedEventArgs e)
        {
            if (userfiles1.SelectedItem == null)
            {
                return;
            }
            Com.Aote.ObjectTools.ObjectList c = userfiles1.ItemsSource as Com.Aote.ObjectTools.ObjectList;
            GeneralObject checkPaper          = userfiles1.SelectedItem as GeneralObject;
            GeneralObject address             = new GeneralObject();

            address.EntityType = "t_gasaddress";
            address.SetValue("ID", checkPaper.GetPropertyValue("pid"));
            address.SetValue("f_districtname", checkPaper.GetPropertyValue("UNIT_NAME"));
            address.SetValue("f_road", checkPaper.GetPropertyValue("ROAD"));
            address.SetValue("f_cusDom", checkPaper.GetPropertyValue("CUS_DOM"));
            address.SetValue("f_cusDy", checkPaper.GetPropertyValue("CUS_DY"));
            address.SetValue("f_cusFloor", checkPaper.GetPropertyValue("CUS_FLOOR"));
            address.SetValue("f_apartment", checkPaper.GetPropertyValue("CUS_ROOM"));
            (userfiles.ItemsSource as ObjectList).Add(address);
            List <Object> list = new List <Object>();

            foreach (Object obj in userfiles1.SelectedItems)
            {
                list.Add(obj);
            }
            foreach (Object obj in list)
            {
                c.Remove(obj);
            }
            c.OnPropertyChanged("Count");
        }
コード例 #3
0
ファイル: GeneralObject.cs プロジェクト: MRZHANG1992/restV2
        //关闭一个节点,关闭时,要递归从openedList里删除数据
        private void Closed(ObjectList openedList, string childName)
        {
            ObjectList ol = (ObjectList)this.GetPropertyValue(childName);

            foreach (GeneralObject go in ol)
            {
                go.Closed(openedList, childName);
                openedList.Remove(go);
            }
        }
コード例 #4
0
ファイル: GeneralObject.cs プロジェクト: DuBin1988/restv2
 //关闭一个节点,关闭时,要递归从openedList里删除数据
 private void Closed(ObjectList openedList, string childName)
 {
     ObjectList ol = (ObjectList)this.GetPropertyValue(childName);
     foreach (GeneralObject go in ol)
     {
         go.Closed(openedList, childName);
         openedList.Remove(go);
     }
 }