private bool InitializeImages(string path, bool fLoadDefaultOnFail) { Bitmap bitmap; Bitmap bitmap2; if (imageStripLarge == null) { imageStripLarge = new ImageStrip(new Size(0x18, 0x18)); imageStripSmall = new ImageStrip(new Size(0x10, 0x10)); } if (!string.IsNullOrEmpty(path) && QTButtonBar.LoadExternalImage(path, out bitmap, out bitmap2)) { imageStripLarge.AddStrip(bitmap); imageStripSmall.AddStrip(bitmap2); bitmap.Dispose(); bitmap2.Dispose(); textBoxImgPath.Text = strImageStripPath = path; return(true); } if (fLoadDefaultOnFail) { bitmap = Resources_Image.ButtonStrip24; bitmap2 = Resources_Image.ButtonStrip16; imageStripLarge.AddStrip(bitmap); imageStripSmall.AddStrip(bitmap2); bitmap.Dispose(); bitmap2.Dispose(); textBoxImgPath.Text = strImageStripPath = string.Empty; } return(false); }
public static void RegisterButtonBar(QTButtonBar bbar) { using (new Keychain(rwLockBtnBar, true)) { dictBBarInstances[Thread.CurrentThread] = bbar; } }