예제 #1
0
        public string GetValue()
        {
            string name = "";
            string str2 = "false";
            string str3 = "HasParentRelObject(";

            if (this.chkBox_HasRelObj.Checked)
            {
                str2 = "true";
            }
            if (this.lv_relation.CheckedItems.Count == 0)
            {
                name = " ";
            }
            else
            {
                DEMetaRelation tag = this.lv_relation.CheckedItems[0].Tag as DEMetaRelation;
                name = tag.Name;
            }
            if (name.Trim().Length == 0)
            {
                return("");
            }
            string str4 = str3;

            return(str4 + str2 + "," + name + ")");
        }
예제 #2
0
 private void LocationRelData(string str_relName)
 {
     if (this.lv_relation.Items.Count != 0)
     {
         foreach (ListViewItem item in this.lv_relation.Items)
         {
             DEMetaRelation tag = item.Tag as DEMetaRelation;
             if (tag.Name == str_relName)
             {
                 item.Checked = true;
             }
             else
             {
                 item.Checked = false;
             }
         }
     }
 }
예제 #3
0
        public string GetValue()
        {
            string  name = "";
            string  str2 = "false";
            string  str3 = "HasRelObject(";
            decimal num  = 1M;

            if (this.chkBox_HasRelObj.Checked)
            {
                str2 = "true";
            }
            if (str2 == "true")
            {
                if (this.num_relobject.Value > 0M)
                {
                    num = this.num_relobject.Value;
                }
                else
                {
                    num = 1M;
                }
            }
            else
            {
                num = 0M;
            }
            if (this.lv_relation.CheckedItems.Count == 0)
            {
                name = " ";
            }
            else
            {
                DEMetaRelation tag = this.lv_relation.CheckedItems[0].Tag as DEMetaRelation;
                name = tag.Name;
            }
            if (name.Trim().Length == 0)
            {
                return("");
            }
            string str4 = str3;

            return(str4 + str2 + "," + name + "," + num.ToString() + ")");
        }
예제 #4
0
 private void SetFilter()
 {
     foreach (DEReference reference in this.al_reference)
     {
         if (!reference.IsIdentity)
         {
             Guid      referencingAttr = reference.ReferencingAttr;
             Guid      targetAttr      = reference.TargetAttr;
             ArrayList list            = new ArrayList();
             ArrayList list2           = new ArrayList();
             ArrayList list3           = new ArrayList();
             list.Add(targetAttr);
             DEMetaRelation relation = ModelContext.MetaModel.GetRelation(reference.ByRelaton);
             list2.Add(relation.Name);
             if (reference.IsReflex)
             {
                 list3.Add(1);
             }
             else
             {
                 list3.Add(0);
             }
             foreach (DEReference reference2 in this.al_reference)
             {
                 if (reference2.IsIdentity)
                 {
                     continue;
                 }
                 Guid guid3 = reference2.ReferencingAttr;
                 Guid guid4 = reference2.TargetAttr;
                 bool flag  = false;
                 bool flag2 = false;
                 if (referencingAttr == guid3)
                 {
                     foreach (Guid guid5 in list)
                     {
                         if (guid5 == guid4)
                         {
                             flag = true;
                             break;
                         }
                     }
                     flag2 = true;
                 }
                 if (!flag && flag2)
                 {
                     list.Add(guid4);
                     DEMetaRelation relation2 = ModelContext.MetaModel.GetRelation(reference2.ByRelaton);
                     list2.Add(relation2.Name);
                     if (reference2.IsReflex)
                     {
                         list3.Add(1);
                     }
                     else
                     {
                         list3.Add(0);
                     }
                 }
             }
             this.SetOBoxObject(referencingAttr, list, list2, list3);
         }
     }
 }