| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 | using PaintDotNet.SystemLayer;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace PaintDotNet.ImageCollect.CameraPreviewComponent{    internal class BaseActionsStrip : ToolStripEx    {        /// <summary>        /// 十字线按钮        /// </summary>        public ToolStripButton crossButton;        /// <summary>        /// 网格按钮        /// </summary>        public ToolStripButton gridButton;        /// <summary>        /// 方形按钮        /// </summary>        public ToolStripButton squareButton;        /// <summary>        /// 圆形按钮        /// </summary>        public ToolStripButton roundButton;        /// <summary>        /// 实际大小按钮        /// </summary>        public ToolStripButton actualSizeButton;        /// <summary>        /// 合适大小按钮        /// </summary>        public ToolStripButton zoomToWindowButton;        /// <summary>        /// 全屏显示按钮        /// </summary>        public ToolStripButton fullScreenButton;        /// <summary>        /// 缩小按钮        /// </summary>        public ToolStripButton zoomOutButton;        /// <summary>        /// 放大按钮        /// </summary>        public ToolStripButton zoomInButton;        public BaseActionsStrip()        {            InitializeComponent();            this.crossButton.Image = PdnResources.GetImageResource("Icons.MenuPreviewCrossIcon.png").Reference;            this.crossButton.ToolTipText = PdnResources.GetString("Menu.imagecapture.Previewwindow.reticle.text");            this.crossButton.Text = PdnResources.GetString("Menu.imagecapture.Previewwindow.reticle.text");            this.crossButton.TextImageRelation = TextImageRelation.ImageAboveText;            this.gridButton.Image = PdnResources.GetImageResource("Icons.MenuViewGridIcon.png").Reference;            this.gridButton.ToolTipText = PdnResources.GetString("Menu.Tools.GridLine.Text");            this.gridButton.Text = PdnResources.GetString("Menu.Tools.GridLine.Text");            this.gridButton.TextImageRelation = TextImageRelation.ImageAboveText;            this.squareButton.Image = PdnResources.GetImageResource("Icons.RectangleSelectToolIcon.png").Reference;            this.squareButton.ToolTipText = PdnResources.GetString("Menu.Square.text");            this.squareButton.Text = PdnResources.GetString("Menu.Square.text");            this.squareButton.TextImageRelation = TextImageRelation.ImageAboveText;            this.roundButton.Image = PdnResources.GetImageResource("Icons.MenuPreviewCircleIcon.png").Reference;            this.roundButton.ToolTipText = PdnResources.GetString("Menu.circular.Text");            this.roundButton.Text = PdnResources.GetString("Menu.circular.Text");            this.roundButton.TextImageRelation = TextImageRelation.ImageAboveText;            this.actualSizeButton.Image = PdnResources.GetImageResource("Icons.MenuViewActualSizeIcon.png").Reference;            this.actualSizeButton.ToolTipText = PdnResources.GetString("Menu.Edit.ActualSize.Text");            this.actualSizeButton.Text = PdnResources.GetString("Menu.Edit.ActualSize.Text");            this.actualSizeButton.TextImageRelation = TextImageRelation.ImageAboveText;            this.zoomToWindowButton.Image = PdnResources.GetImageResource("Icons.MenuViewZoomToWindowIcon.png").Reference;            this.zoomToWindowButton.ToolTipText = PdnResources.GetString("Menu.Edit.ZoomToWindow.Text");            this.zoomToWindowButton.Text = PdnResources.GetString("Menu.Edit.ZoomToWindow.Text");            this.zoomToWindowButton.TextImageRelation = TextImageRelation.ImageAboveText;            this.fullScreenButton.Image = PdnResources.GetImageResource("Icons.MenuViewZoomToSelectionIcon.png").Reference;            this.fullScreenButton.ToolTipText = PdnResources.GetString("Menu.imagecapture.Previewwindow.fullscreen.text");            this.fullScreenButton.Text = PdnResources.GetString("Menu.imagecapture.Previewwindow.fullscreen.text");            this.fullScreenButton.TextImageRelation = TextImageRelation.ImageAboveText;            this.zoomOutButton.Image = PdnResources.GetImageResource("Icons.MenuViewZoomOutIcon.png").Reference;            this.zoomOutButton.ToolTipText = PdnResources.GetString("CommonAction.ZoomOut");            this.zoomOutButton.Text = PdnResources.GetString("CommonAction.ZoomOut");            this.zoomOutButton.TextImageRelation = TextImageRelation.ImageAboveText;            this.zoomInButton.Image = PdnResources.GetImageResource("Icons.MenuViewZoomInIcon.png").Reference;            this.zoomInButton.ToolTipText = PdnResources.GetString("CommonAction.ZoomIn");            this.zoomInButton.Text = PdnResources.GetString("Menu.Edit.ZoomIn.Text");            this.zoomInButton.TextImageRelation = TextImageRelation.ImageAboveText;        }        /// <summary>        ///  实例化基础按钮        /// </summary>        private void InitializeComponent()        {            this.crossButton = new ToolStripButton();            this.gridButton = new ToolStripButton();            this.squareButton = new ToolStripButton();            this.roundButton = new ToolStripButton();            this.actualSizeButton = new ToolStripButton();            this.zoomToWindowButton = new ToolStripButton();            this.fullScreenButton = new ToolStripButton();            this.zoomOutButton = new ToolStripButton();            this.zoomInButton = new ToolStripButton();            this.SuspendLayout();            this.Items.Add(this.crossButton);            this.Items.Add(this.gridButton);            this.Items.Add(this.squareButton);            this.Items.Add(this.roundButton);            this.Items.Add(this.actualSizeButton);            this.Items.Add(this.zoomToWindowButton);            this.Items.Add(this.fullScreenButton);            this.Items.Add(this.zoomOutButton);            this.Items.Add(this.zoomInButton);            this.ResumeLayout(false);        }    }}
 |