public void SetObjects(uint cObjects, object[] ppunk) { if (ppunk == null || cObjects == 0) { if (null != IPropertyStore) { IPropertyStore.Dispose(); IPropertyStore = null; } } else { bool needToRefresh = false; if (IPropertyStore != null) { needToRefresh = true; } IPropertyStore = GetNewPropertyStore(); IPropertyStore.Initialize(ppunk); if (needToRefresh) { MyPageView.RefreshPropertyValues(); } } }
public void Test_MyPageView() { MyPageView <string> view = new MyPageView <string>(); int a = 2; view.SetModel(a); }
public int TranslateAccelerator(Microsoft.VisualStudio.OLE.Interop.MSG[] pMsg) { Message keyboardMessage = Message.Create(pMsg[0].hwnd, (int)pMsg[0].message, pMsg[0].wParam, pMsg[0].lParam); int hr = MyPageView.ProcessAccelerator(ref keyboardMessage); pMsg[0].lParam = keyboardMessage.LParam; pMsg[0].wParam = keyboardMessage.WParam; return(hr); }
public void Activate(IntPtr hWndParent, RECT[] pRect, int bModal) { if ((null == pRect) || (0 == pRect.Length)) { throw new ArgumentNullException("pRect"); } Control parentControl = Control.FromHandle(hWndParent); RECT pageRectangle = pRect[0]; MyPageView.Initialize(parentControl, Rectangle.FromLTRB(pageRectangle.left, pageRectangle.top, pageRectangle.right, pageRectangle.bottom)); }
public void Show(uint nCmdShow) { switch (nCmdShow) { case Constants.SW_HIDE: MyPageView.HideView(); break; case Constants.SW_SHOW: case Constants.SW_SHOWNORMAL: MyPageView.ShowView(); break; default: break; } }
public void Move(Microsoft.VisualStudio.OLE.Interop.RECT[] pRect) { MyPageView.MoveView(Rectangle.FromLTRB(pRect[0].left, pRect[0].top, pRect[0].right, pRect[0].bottom)); }