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. 14
      src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/AddWebReferenceDialog.cs
  2. 4
      src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/WebServicesView.cs

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

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

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

@ -248,6 +248,7 @@ namespace ICSharpCode.SharpDevelop.Gui
void AddImages() void AddImages()
{ {
try {
ImageList imageList = new ImageList(); ImageList imageList = new ImageList();
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Library")); imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Library"));
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Interface")); imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Interface"));
@ -255,6 +256,9 @@ namespace ICSharpCode.SharpDevelop.Gui
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Method")); 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() void AddStringResources()

Loading…
Cancel
Save