Browse Source

Fixed forum-16247: Add Web Reference dialog missing URL on 120 DPI

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2558 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
12d559c90f
  1. 16
      src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/AddWebReferenceDialog.cs
  2. 20
      src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/WebServicesView.cs

16
src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/AddWebReferenceDialog.cs

@ -25,8 +25,6 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -25,8 +25,6 @@ namespace ICSharpCode.SharpDevelop.Gui
{
WebServiceDiscoveryClientProtocol discoveryClientProtocol;
CredentialCache credentialCache = new CredentialCache();
int initialFormWidth;
int initialUrlComboBoxWidth;
string namespacePrefix = String.Empty;
Uri discoveryUri;
IProject project;
@ -42,8 +40,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -42,8 +40,8 @@ namespace ICSharpCode.SharpDevelop.Gui
AddMruList();
AddImages();
AddStringResources();
initialFormWidth = Width;
initialUrlComboBoxWidth = urlComboBox.Width;
// fixes forum-16247: Add Web Reference dialog missing URL on 120 DPI
AddWebReferenceDialogResize(null, null);
this.project = project;
}
@ -505,7 +503,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -505,7 +503,7 @@ namespace ICSharpCode.SharpDevelop.Gui
if (referenceNameTextBox.Text.Length > 0) {
if (referenceNameTextBox.Text.IndexOf('\\') == -1) {
if (!ContainsInvalidDirectoryChar(referenceNameTextBox.Text)) {
return true;
return true;
}
}
}
@ -656,8 +654,12 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -656,8 +654,12 @@ namespace ICSharpCode.SharpDevelop.Gui
void AddWebReferenceDialogResize(object sender, EventArgs e)
{
int widthChange = Width - initialFormWidth;
urlComboBox.Width = initialUrlComboBoxWidth + widthChange;
int width = toolStrip.ClientSize.Width;
foreach (ToolStripItem item in toolStrip.Items) {
if (item != urlComboBox)
width -= item.Width + 8;
}
urlComboBox.Width = width;
}
void AddButtonClick(object sender,EventArgs e)

20
src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/WebServicesView.cs

@ -99,8 +99,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -99,8 +99,8 @@ namespace ICSharpCode.SharpDevelop.Gui
// webServicesListView
//
this.webServicesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.propertyColumnHeader,
this.valueColumnHeader});
this.propertyColumnHeader,
this.valueColumnHeader});
this.webServicesListView.Dock = System.Windows.Forms.DockStyle.Fill;
this.webServicesListView.Location = new System.Drawing.Point(0, 0);
this.webServicesListView.Name = "webServicesListView";
@ -248,13 +248,17 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -248,13 +248,17 @@ namespace ICSharpCode.SharpDevelop.Gui
void AddImages()
{
ImageList imageList = new ImageList();
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Library"));
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Interface"));
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Class"));
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Method"));
try {
ImageList imageList = new ImageList();
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Library"));
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Interface"));
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Class"));
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Method"));
webServicesTreeView.ImageList = imageList;
webServicesTreeView.ImageList = imageList;
} catch (ResourceNotFoundException) {
// in design mode, the core is not initialized -> the resources cannot be found
}
}
void AddStringResources()

Loading…
Cancel
Save