SIL.FieldWorks.XWorks.MorphologyEditor.InflAffixTemplateControl.OnMouseUp C# (CSharp) Method

OnMouseUp() protected method

Intercepts mouse clicks on Command Icons and translates them into right mouse clicks
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
return void
		protected override void OnMouseUp(MouseEventArgs e)
		{
			Rectangle rcSrcRoot;
			Rectangle rcDstRoot;
			Point pt;
			int tag;
			using (new HoldGraphics(this))
			{
				pt = PixelToView(new Point(e.X, e.Y));
				GetCoordRects(out rcSrcRoot, out rcDstRoot);
				IVwSelection sel = RootBox.MakeSelAt(pt.X, pt.Y, rcSrcRoot, rcDstRoot, false);

				ITsString tss;
				int ichAnchor;
				bool fAssocPrev;
				int hvoObj;
				int ws;
				sel.TextSelInfo(false, out tss, out ichAnchor, out fAssocPrev, out hvoObj, out tag, out ws);
			}

			if (tag == 0) // indicates it is an icon
				OnRightMouseUp(pt, rcSrcRoot, rcDstRoot);
			else
				base.OnMouseUp(e);
		}