Exemple #1
0
 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();
         }
     }
 }
Exemple #2
0
        public void Test_MyPageView()
        {
            MyPageView <string> view = new MyPageView <string>();

            int a = 2;

            view.SetModel(a);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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));
        }
Exemple #5
0
        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;
            }
        }
Exemple #6
0
 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));
 }