示例#1
0
        private void SelectCheckedNodes()
        {
            SelectedProcessInfoList.Clear();
            //  processmapmodel.DisStepActionInfo_ID = DisStepActionInfo.Id;
            processmapmodel.DisStepActionInfo = DisStepActionInfo;
            for (int i = 0; i < ProductionProcessInfoListAll.Count; i++)
            {
                ProductionProcessInfoListAll[i].IsChecked = false;
            }

            GetNodeInfoByIds(processmapmodel);

            if (ExistDisStepActionProcessMapInfoList.Any())
            {
                foreach (var data in ExistDisStepActionProcessMapInfoList)
                {
                    for (int i = 0; i < ProductionProcessInfoListAll.Count; i++)
                    {
                        if (!Equals(data.ProductionProcessInfo, null))
                        {
                            if (data.ProductionProcessInfo.Id == ProductionProcessInfoListAll[i].Id)
                            {
                                ProductionProcessInfoListAll[i].IsChecked = true;
                            }
                        }
                    }
                }
            }
        }
示例#2
0
 void OnPropertyChangedCommand(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName.Equals("IsChecked"))
     {
         var selectedObj = sender as ProductionProcessInfoModel;
         if (selectedObj == null)
         {
             return;
         }
         if (selectedObj.IsChecked)
         {
             SelectedProcessInfoList.Add(selectedObj);
         }
         else if (!selectedObj.IsChecked)
         {
             SelectedProcessInfoList.Remove(selectedObj);
         }
     }
 }