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 18 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 @@ -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;
}
@ -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)

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

@ -248,6 +248,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -248,6 +248,7 @@ namespace ICSharpCode.SharpDevelop.Gui
void AddImages()
{
try {
ImageList imageList = new ImageList();
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Library"));
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Interface"));
@ -255,6 +256,9 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -255,6 +256,9 @@ namespace ICSharpCode.SharpDevelop.Gui
imageList.Images.Add(ResourceService.GetBitmap("Icons.16x16.Method"));
webServicesTreeView.ImageList = imageList;
} catch (ResourceNotFoundException) {
// in design mode, the core is not initialized -> the resources cannot be found
}
}
void AddStringResources()

Loading…
Cancel
Save