コード例 #1
0
ファイル: BrowseDialog.cs プロジェクト: killbug2004/WSProf
		void Root_DropDownMenuOpening(object sender, CancelEventArgs e)
		{
			List<string> servers = new List<string>(); 
			
			for(int i = 0; i < m_knownSites.Count; ++i)
			{
				servers.Add(m_knownSites.GetUrl(i)); 
			}
			

			if (servers == null || servers.Count <= 0)
			{
				e.Cancel = true;
			}

			var rootnode = sender as BreadcrumbBarNode;
			if (rootnode != null)
			{
				// Don't clear dropdownitems, root node has done it
				//rootnode.ClearDropDownItems();
				foreach (string server in servers)
				{

					BreadcrumbDropDownItem bcdd = new BreadcrumbDropDownItem(server, BreadCrumDropDownItemClickEventHandler);
					bcdd.Text = server;
					bcdd.Tag = server;
					rootnode.AddDropDownItem(bcdd);
				}
			}
			e.Cancel = false;
		}
コード例 #2
0
 public void AddDropDownItem(BreadcrumbDropDownItem item)
 {
     this.DropDownMenuItems.Add(item);
     if (!this.HasChildNodes)
     {
         this.HasChildNodes = true;
     }
 }