public UndoEngineImplication(IServiceContainer provider)
     : base(provider)
 {
     service = provider;
     editToolStripMenuItem = (ToolStripMenuItem)service.GetService(typeof(ToolStripMenuItem));
     cassPropertyGrid = (FilteredPropertyGrid)service.GetService(typeof(FilteredPropertyGrid));
 }
        /// <summary>
        /// ��ʼ������HostDesign��Ķ��󣬼��ص�ǰ��ѡ�ؼ��仯ʱ���¼��������Ϣ�����
        /// �õ��ķ������Կؼ��������IJ˵���״̬������ǩ�ؼ���TabControl�����˵�����
        /// ��ӵķ��񣺳���/�ظ�
        /// </summary>
        internal void Initialize()
        {
            host = (IDesignerHost)this.GetService(typeof(IDesignerHost));

            if (host == null)
            {
                return;
            }
            try
            {
                selectionService = (ISelectionService)(this.GetService(typeof(ISelectionService)));
                selectionService.SelectionChanged += new EventHandler(selectionService_SelectionChanged);
                if (host.RootComponent != null)
                {
                    ((Control)host.RootComponent).Resize += new EventHandler(CassView_Resize);
                }
                cassPropertyGrid = (FilteredPropertyGrid)(this.GetService(typeof(FilteredPropertyGrid)));
                operateMenu = (ContextMenuStrip)(this.GetService(typeof(ContextMenuStrip)));
                designMousePosition = (ToolStripStatusLabel)(this.GetService(typeof(ToolStripStatusLabel)));
                editToolMenuItem = (ToolStripMenuItem)this.GetService(typeof(ToolStripMenuItem));

                //��ӳ���/�ظ���������
                IServiceContainer serviceContainer = host.GetService(typeof(ServiceContainer)) as IServiceContainer;
                undoEngine = new UndoEngineImplication(serviceContainer);
                undoEngine.Enabled = false;    //�رճ������ظ�����
                host.AddService(typeof(UndoEngineImplication), undoEngine);
            }
            catch (Exception ex) { }
        }