⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addwebreferencedialog.cs

📁 全功能c#编译器
💻 CS
📖 第 1 页 / 共 2 页
字号:
//			this.pictureBox1.Name = "pictureBox1";
//			this.pictureBox1.Size = new System.Drawing.Size(226, 88);
//			this.pictureBox1.TabIndex = 2;
//			this.pictureBox1.TabStop = false;
//			//
//			// imgList
//			//
//			this.imgList.Images.Add(resourceService.GetBitmap("Icons.16x16.Assembly"));
//			this.imgList.Images.Add(resourceService.GetBitmap("Icons.16x16.Assembly"));
//			this.imgList.Images.Add(resourceService.GetBitmap("Icons.16x16.Class"));
//			this.imgList.Images.Add(resourceService.GetBitmap("Icons.16x16.Class"));
//			this.imgList.Images.Add(resourceService.GetBitmap("Icons.16x16.Interface"));
//			this.imgList.Images.Add(resourceService.GetBitmap("Icons.16x16.Interface"));
//			this.imgList.Images.Add(resourceService.GetBitmap("Icons.16x16.Library"));
//			
//			//
//			// treeView1
//			// 						
//			this.treeView1.LabelEdit = false;			
//			this.treeView1.ImageList = this.imgList;
//			this.treeView1.ShowRootLines = false;
//			this.treeView1.HotTracking = true;
//			this.treeView1.Cursor = Cursors.Hand;
//			this.treeView1.Dock = System.Windows.Forms.DockStyle.Left;
//			this.treeView1.ImageIndex = -1;
//			this.treeView1.Location = new System.Drawing.Point(0, 88);
//			this.treeView1.Name = "treeView1";
//			this.treeView1.SelectedImageIndex = -1;
//			this.treeView1.Size = new System.Drawing.Size(280, 185);
//			this.treeView1.TabIndex = 3;
//			this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
//			
//			// 
//			// splitter1
//			// 
//			this.splitter1.Dock = System.Windows.Forms.DockStyle.Left;
//			this.splitter1.Name = "splitter1";
//			this.splitter1.Size = new System.Drawing.Size(3, 180);
//			this.splitter1.TabIndex = 4;
//			this.splitter1.TabStop = false;
//			// 
//			// listView1
//			// 
//			this.header1 = new ColumnHeader();
//			header1.Text = "Property";
//			this.header2 = new ColumnHeader();
//			header2.Text = "Value";
//			
//			this.listView1.Columns.Add(header1);
//			this.listView1.Columns.Add(header2);
//			this.listView1.View = View.Details;
//			
//			this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
//			this.listView1.Location = new System.Drawing.Point(124, 88);
//			this.listView1.Name = "listView1";
//			this.listView1.Size = new System.Drawing.Size(635, 180);
//			this.listView1.TabIndex = 5;
//			this.listView1.Resize += new System.EventHandler(this.listView1_Resize);
//			//
//			// tabPage1
//			// 						
//			this.tabPage1.BackColor = System.Drawing.Color.White;
//			this.tabPage1.Controls.AddRange(new System.Windows.Forms.Control[] {
//																				   this.listView1,
//																				   this.splitter1,
//																				   this.treeView1});
//			this.tabPage1.Icon = resourceService.GetIcon("Icons.16x16.Class");
//			this.tabPage1.Name = "tabPage1";
//			this.tabPage1.Size = new System.Drawing.Size(486, 255);
//			this.tabPage1.TabIndex = 0;
//			this.tabPage1.Title = "Available Web Services";
//			// 
//			// tabPage2
//			// 
//			this.tabPage2.Controls.AddRange(new System.Windows.Forms.Control[] {
//																				   this.axBrowser});
//			this.tabPage2.Icon = resourceService.GetIcon("Icons.16x16.HTMLIcon");
//			this.tabPage2.Name = "tabPage2";
//			this.tabPage2.Selected = false;
//			this.tabPage2.Size = new System.Drawing.Size(486, 255);
//			this.tabPage2.TabIndex = 1;
//			this.tabPage2.Title = "WSDL";
//			
//			// 
//			// checkBox1 for debugging only
//			// 
//			this.checkBox1.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
//			this.checkBox1.Location = new System.Drawing.Point(6, 9);
//			this.checkBox1.Name = "checkBox1";
//			this.checkBox1.TabIndex = 2;
//			this.checkBox1.Text = "Generate Assembly";
//			this.checkBox1.Enabled = false;
//			this.checkBox1.Visible = false;
//			
//			// 
//			// AddWebReferenceDialog
//			// 
//			this.Icon = resourceService.GetIcon("Icons.16x16.ClosedWebReferenceFolder");			
//			this.AcceptButton = this.btnGo;
//			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
//			this.ClientSize = new System.Drawing.Size(722, 467);
//			this.Controls.AddRange(new System.Windows.Forms.Control[] {																		  
//																		  this.tabControl1,
//																		  this.panel2,
//																		  this.panel1,
//																		  this.panel3});
//			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
//			this.StartPosition = FormStartPosition.CenterScreen;
//			this.MaximizeBox = false;
//			this.MinimizeBox = false;			
//			this.Name = "AddWebReferenceDialog";
//			this.ShowInTaskbar = false;
//			this.Text = "Add Web Reference";
//			this.panel1.ResumeLayout(false);
//			this.panel2.ResumeLayout(false);
//			this.tabPage1.ResumeLayout(false);
//			this.panel3.ResumeLayout(false);
//			((System.ComponentModel.ISupportInitialize)(this.axBrowser)).EndInit();
//			this.ResumeLayout(false);
//
//		}
//		
//		private void btnBack_Click(object sender, System.EventArgs e)
//		{
//			axBrowser.GoBack();
//		}
//		
//		private void btnForward_Click(object sender, System.EventArgs e)
//		{
//			axBrowser.GoForward();
//		}
//		
//		private void btnAbort_Click(object sender, System.EventArgs e)
//		{
//			axBrowser.Stop();
//			this.btnAdd.Enabled = false;
//		}
//
//		private void btnRefresh_Click(object sender, System.EventArgs e)
//		{
//			axBrowser.Refresh();
//			cboUrl.Text = axBrowser.LocationURL;
//		}
//
//		private void btnGo_Click(object sender, System.EventArgs e)
//		{							
//			object url = (object)cboUrl.Text;
//			object flags = null;
//			object targetframename = (object)"_top";
//			object headers = null;
//			object postdata = null;
//			
//			axBrowser.Navigate2(ref url, ref flags, ref targetframename, ref postdata, ref headers);						
//		}
//
//		ServiceDescription serviceDescription = null;
//		ServiceDescription ServiceDescription {
//			get {
//				return serviceDescription;				
//			}
//			set {				
//				this.btnAdd.Enabled = (value != null);
//				serviceDescription = value;								
//			}
//		}
//		private void btnAdd_Click(object sender, System.EventArgs e)
//		{							
//			if(!this.checkBox1.Checked) {
//				ArrayList fileList = WebReference.GenerateWebProxyCode(project, cboUrl.Text);
//				if(fileList != null) {
//					this.referenceInformations.AddRange(fileList);					
//				}
//			} else {
//				ProjectReference webRef = WebReference.GenerateWebProxyDLL(project, cboUrl.Text);
//				if(webRef != null) {
//					this.referenceInformations.Add(webRef);
//				}
//			}			
//			this.Close();
//		}
//
//		private void btnCancel_Click(object sender, System.EventArgs e)
//		{
//			this.Close();
//		}
//
//		private void axBrowser_NavigateComplete2(object sender, DWebBrowserEvents2_NavigateComplete2Event e)
//		{
//			this.treeView1.BeginUpdate();
//			
//			//TODO: maybe do some validation on the WSDL url here
//			ServiceDescription desc = WebReference.ReadServiceDescription(axBrowser.LocationURL);
//			this.treeView1.Nodes.Clear();
//			if(desc == null) 
//				return;
//			
//			TreeNode rootNode = new TreeNode(WebReference.GetNamespaceFromUri(axBrowser.LocationURL));			
//			rootNode.Tag = desc;
//			rootNode.ImageIndex = 6;
//			rootNode.SelectedImageIndex = 6;
//			this.treeView1.Nodes.Add(rootNode);
//			
//			foreach(Service svc in desc.Services) 
//			{
//				// add a Service node
//				TreeNode serviceNode = new TreeNode(svc.Name);				
//				serviceNode.Tag = svc;
//				serviceNode.ImageIndex = 0;
//				serviceNode.SelectedImageIndex = 1;
//				rootNode.Nodes.Add(serviceNode);
//				
//				foreach(Port port in svc.Ports) 
//				{					
//					TreeNode portNode = new TreeNode(port.Name);
//					portNode.Tag = port;
//					portNode.ImageIndex = 2;
//					portNode.SelectedImageIndex = 3;
//					serviceNode.Nodes.Add(portNode);
//					
//										
//					// get the operations
//					foreach(Operation operation in desc.PortTypes[port.Name].Operations) 
//					{
//						TreeNode operationNode = new TreeNode(operation.Name);
//						operationNode.Tag = operation;
//						operationNode.ImageIndex = 4;
//						operationNode.SelectedImageIndex = 5;
//						portNode.Nodes.Add(operationNode);
//					}				
//				}															
//			}
//			this.treeView1.ExpandAll();	
//			this.treeView1.EndUpdate();
//			
//			this.ServiceDescription = desc;			
//			this.Cursor = Cursors.Default;			
//		}
//		private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
//		{						
//			this.listView1.BeginUpdate();
//						
//			ListViewItem item;
//			
//			this.listView1.Items.Clear();
//						
//			if(e.Node.Tag is ServiceDescription) 
//			{
//				ServiceDescription desc = (ServiceDescription)e.Node.Tag;
//				item = new ListViewItem();				
//				item.Text = "Retrieval URI";
//				item.SubItems.Add(desc.RetrievalUrl);
//				this.listView1.Items.Add(item);
//			}
//			else if(e.Node.Tag is Service)
//			{
//				Service service = (Service)e.Node.Tag;
//				item = new ListViewItem();				
//				item.Text = "Documentation";
//				item.SubItems.Add(service.Documentation);
//				this.listView1.Items.Add(item);
//
//			}
//			else if(e.Node.Tag is Port) 
//			{
//				Port port = (Port)e.Node.Tag;
//
//				item = new ListViewItem();				
//				item.Text = "Documentation";
//				item.SubItems.Add(port.Documentation);
//				this.listView1.Items.Add(item);
//				
//				item = new ListViewItem();				
//				item.Text = "Binding";
//				item.SubItems.Add(port.Binding.Name);
//				this.listView1.Items.Add(item);
//				
//				item = new ListViewItem();				
//				item.Text = "Service";
//				item.SubItems.Add(port.Service.Name);												
//				this.listView1.Items.Add(item);
//
//			}
//			else if(e.Node.Tag is Operation) 
//			{
//				Operation operation = (Operation)e.Node.Tag;
//				
//				item = new ListViewItem();
//				item.Text = "Documentation";
//				item.SubItems.Add(operation.Documentation);
//				this.listView1.Items.Add(item);
//
//				item = new ListViewItem();
//				item.Text = "Parameters";
//				item.SubItems.Add(operation.ParameterOrderString);
//				this.listView1.Items.Add(item);
//			}
//			
//			this.listView1.EndUpdate();		
//		}
//		private void listView1_Resize(object sender, System.EventArgs e)
//		{
//			// resize the column headers
//			this.header1.Width = this.listView1.Width / 2;
//			this.header2.Width = this.listView1.Width / 2;
//		}
//		
//		private void axBrowser_BeforeNavigate2(object sender, DWebBrowserEvents2_BeforeNavigate2Event e)
//		{
//			this.Cursor = Cursors.WaitCursor;
//			this.ServiceDescription = null;
//		}
//
//		private void axBrowser_NavigateError(object sender, DWebBrowserEvents2_NavigateErrorEvent e)
//		{
//			this.Cursor = Cursors.Default;
//			this.treeView1.Nodes.Clear();
//			this.ServiceDescription = null;
//		}
//
//	}
//}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -