FindGroupContaining() 개인적인 메소드

private FindGroupContaining ( string id ) : DockGroup
id string
리턴 DockGroup
예제 #1
0
 DockGroupItem AddItemAtLocation(DockGroup grp, DockItem it, string location, bool visible, DockItemStatus status)
 {
     string[] positions = location.Split(';');
     foreach (string pos in positions)
     {
         int i = pos.IndexOf('/');
         if (i == -1)
         {
             continue;
         }
         string    id = pos.Substring(0, i).Trim();
         DockGroup g  = grp.FindGroupContaining(id);
         if (g != null)
         {
             DockPosition dpos;
             try
             {
                 dpos = (DockPosition)Enum.Parse(typeof(DockPosition), pos.Substring(i + 1).Trim(), true);
             }
             catch
             {
                 continue;
             }
             DockGroupItem dgt = g.AddObject(it, dpos, id);
             dgt.SetVisible(visible);
             dgt.Status = status;
             return(dgt);
         }
     }
     return(null);
 }
예제 #2
0
		DockGroupItem AddItemAtLocation (DockGroup grp, DockItem it, string location, bool visible, DockItemStatus status)
		{
			string[] positions = location.Split (';');
			foreach (string pos in positions) {
				int i = pos.IndexOf ('/');
				if (i == -1) continue;
				string id = pos.Substring (0,i).Trim ();
				DockGroup g = grp.FindGroupContaining (id);
				if (g != null) {
					DockPosition dpos;
					try {
						dpos = (DockPosition) Enum.Parse (typeof(DockPosition), pos.Substring(i+1).Trim(), true);
					}
					catch {
						continue;
					}
					DockGroupItem dgt = g.AddObject (it, dpos, id);
					dgt.SetVisible (visible);
					dgt.Status = status;
					return dgt;
				}
			}
			return null;
		}