private void showTextHelpWindow(string content, string titleText, Bitmap image, Size customSize) { if ((content != null) && (titleText != null)) { if ((_helpWindow == null) || _helpWindow.IsDisposed) { _helpWindow = new HelpWindow(); components.Add(_helpWindow); _helpWindow.setText(content); _helpWindow.setTitle(titleText); if (image != null) { _helpWindow.setImage(image); } if (!customSize.IsEmpty) { _helpWindow.Size = customSize; } _helpWindow.Location = new Point((base.Location.X + (base.Width / 2)) - (_helpWindow.Width / 2), (base.Location.Y + (base.Height / 2)) - (_helpWindow.Height / 2)); _helpWindow.Owner = this; _helpWindow.Show(); } else { _helpWindow.setText(content); _helpWindow.setTitle(titleText); if (image != null) { _helpWindow.setImage(image); } if (!customSize.IsEmpty) { _helpWindow.Size = customSize; } _helpWindow.BringToFront(); } } }
private void showResourceHelpWindow(string contentResourceName, string titleText, string imageResourceName, Size customSize) { if ((contentResourceName != null) && (titleText != null)) { if ((_helpWindow == null) || _helpWindow.IsDisposed) { _helpWindow = new HelpWindow(); components.Add(_helpWindow); _helpWindow.setText((string) _appResourcesHelp.GetObject(contentResourceName)); _helpWindow.setTitle(titleText); if ((imageResourceName != null) && (imageResourceName != string.Empty)) { _helpWindow.setImage((Bitmap) _appResourcesHelp.GetObject(imageResourceName)); } if (!customSize.IsEmpty) { _helpWindow.Size = customSize; } _helpWindow.Location = new Point((base.Location.X + (base.Width / 2)) - (_helpWindow.Width / 2), (base.Location.Y + (base.Height / 2)) - (_helpWindow.Height / 2)); _helpWindow.Owner = this; _helpWindow.Show(); } else { _helpWindow.setText((string) _appResourcesHelp.GetObject(contentResourceName)); _helpWindow.setTitle(titleText); if ((imageResourceName != null) && (imageResourceName != string.Empty)) { _helpWindow.setImage((Bitmap) _appResourcesHelp.GetObject(imageResourceName)); } if (!customSize.IsEmpty) { _helpWindow.Size = customSize; } _helpWindow.BringToFront(); } } }