/// <summary>
        /// Make the correct buttons and add them to the given ToolStrip
        /// </summary>
        /// <param name="parent">The parent ToolStrip</param>
        /// <param name="dispatcher">The event queue</param>
        public void MakeButtons(ToolStrip parent, ControlEventQueue dispatcher)
        {
            UndoToolBarButton undo = new UndoToolBarButton(dispatcher, this.m_Model);
            RedoToolBarButton redo = new RedoToolBarButton(dispatcher, this.m_Model);
            Bitmap img;

            img = new Bitmap( Image.FromStream( this.GetType().Assembly.GetManifestResourceStream( "UW.ClassroomPresenter.Viewer.ToolBars.Icons.undo.png" ) ) );
            Misc.ImageListHelper.Add( img, parent.ImageList );
            undo.ImageIndex = parent.ImageList.Images.Count - 1;

            img = new Bitmap( Image.FromStream( this.GetType().Assembly.GetManifestResourceStream( "UW.ClassroomPresenter.Viewer.ToolBars.Icons.redo.png" ) ) );
            Misc.ImageListHelper.Add( img, parent.ImageList );
            redo.ImageIndex = parent.ImageList.Images.Count - 1;

            parent.Items.Add(undo);
            parent.Items.Add(redo);
        }
Example #2
0
        /// <summary>
        /// Make the correct buttons and add them to the given ToolStrip
        /// </summary>
        /// <param name="parent">The parent ToolStrip</param>
        /// <param name="dispatcher">The event queue</param>
        public void MakeButtons(ToolStrip parent, ControlEventQueue dispatcher)
        {
            UndoToolBarButton undo = new UndoToolBarButton(dispatcher, this.m_Model);
            RedoToolBarButton redo = new RedoToolBarButton(dispatcher, this.m_Model);
            Bitmap            img;

            img = new Bitmap(Image.FromStream(this.GetType().Assembly.GetManifestResourceStream("UW.ClassroomPresenter.Viewer.ToolBars.Icons.undo.png")));
            Misc.ImageListHelper.Add(img, parent.ImageList);
            undo.ImageIndex = parent.ImageList.Images.Count - 1;

            img = new Bitmap(Image.FromStream(this.GetType().Assembly.GetManifestResourceStream("UW.ClassroomPresenter.Viewer.ToolBars.Icons.redo.png")));
            Misc.ImageListHelper.Add(img, parent.ImageList);
            redo.ImageIndex = parent.ImageList.Images.Count - 1;

            parent.Items.Add(undo);
            parent.Items.Add(redo);
        }