using Resources; using SmartCoalApplication.Actions; using SmartCoalApplication.Core; using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Windows.Forms; namespace SmartCoalApplication.Menus { /// /// 图像采集菜单 /// internal sealed class ImageCollectionMenu : PdnMenuItem { public int index = 0; private PdnMenuItem menuCameraSelection; private PdnMenuItem menuCameraSetting; private PdnMenuItem menuCameraAdjust; private PdnMenuItem menuCameraFrame; private PdnMenuItem menuCameraConventional; private ToolStripSeparator menuSeparator1; private PdnMenuItem menuImageCollectHdr; private ToolStripSeparator menuSeparator2; private PdnMenuItem menuPreviewAction; private PdnMenuItem menuPreviewActionClose; private PdnMenuItem menuShootAction; private ToolStripSeparator menuSeparator3; private PdnMenuItem menuAutofocus; private PdnMenuItem menuRealTimeDepth; private PdnMenuItem menuRealTimeStitching; private PdnMenuItem menuAutomaticDepth; private PdnMenuItem menuImageStitching; private PdnMenuItem menuTimedShooting; private PdnMenuItem menuVideoRecording; private PdnMenuItem menuZaxisScan; private PdnMenuItem menuMultiDimensional; private PdnMenuItem menuListOfLocations; // 曝光 private PdnMenuItem menuAdjustExposure; // 白平衡 private PdnMenuItem menuAdjustWhiteBalance; // 增益 private PdnMenuItem menuAdjustGain; // 饱和度 private PdnMenuItem menuAdjustSaturation; // 相机模式 private PdnMenuItem menuFrameCameraMode; // 相机设置 private PdnMenuItem menuFrameCameraSet; // 图像旋转 private PdnMenuItem menuCommonRotate; public ImageCollectionMenu(int menuId) { InitializeComponent(); this.MenuId = menuId; } protected override void OnAppWorkspaceChanged() { base.OnAppWorkspaceChanged(); } private void InitializeComponent() { //相机选择 this.menuCameraSelection = new PdnMenuItem(ActionType.CameraSelection); this.menuCameraSelection.AutomaticScript = false; //相机设置 this.menuCameraSetting = new PdnMenuItem(ActionType.CameraSetting); this.menuCameraSetting.AutomaticScript = false; //调节 this.menuCameraAdjust = new PdnMenuItem(ActionType.CameraAdjust); this.menuCameraAdjust.AutomaticScript = false; //边框 this.menuCameraFrame = new PdnMenuItem(ActionType.CameraFrame); this.menuCameraFrame.AutomaticScript = false; //常规 this.menuCameraConventional = new PdnMenuItem(ActionType.CameraConventional); this.menuCameraConventional.AutomaticScript = false; //分隔线 this.menuSeparator1 = new ToolStripSeparator(); //HDR this.menuImageCollectHdr = new PdnMenuItem(ActionType.ImageCollectHdr); this.menuImageCollectHdr.AutomaticScript = false; //分隔线 this.menuSeparator2 = new ToolStripSeparator(); //预览 this.menuPreviewAction = new PdnMenuItem(ActionType.PreviewExtraction); this.menuPreviewAction.AutomaticScript = false; //关闭预览 this.menuPreviewActionClose = new PdnMenuItem(ActionType.PreviewExtractionClose); this.menuPreviewActionClose.AutomaticScript = false; //拍摄 this.menuShootAction = new PdnMenuItem(ActionType.ShootAction); this.menuShootAction.AutomaticScript = false; //分隔线 this.menuSeparator3 = new ToolStripSeparator(); //自动聚焦 this.menuAutofocus = new PdnMenuItem(ActionType.Autofocus); this.menuAutofocus.AutomaticScript = false; //实时景深扩展 this.menuRealTimeDepth = new PdnMenuItem(ActionType.RealTimeDepth); this.menuRealTimeDepth.AutomaticScript = false; //实时图像拼接 this.menuRealTimeStitching = new PdnMenuItem(ActionType.RealTimeStitching); this.menuRealTimeStitching.AutomaticScript = false; //自动景深扩展 this.menuAutomaticDepth = new PdnMenuItem(ActionType.AutomaticDepth); this.menuAutomaticDepth.AutomaticScript = false; //图像拼接 this.menuImageStitching = new PdnMenuItem(ActionType.ImageStitching); this.menuImageStitching.AutomaticScript = false; //实时拍摄 this.menuTimedShooting = new PdnMenuItem(ActionType.TimedShooting); this.menuTimedShooting.AutomaticScript = false; //视频录像 this.menuVideoRecording = new PdnMenuItem(ActionType.VideoRecording); this.menuVideoRecording.AutomaticScript = false; //z轴扫描 this.menuZaxisScan = new PdnMenuItem(ActionType.ZaxisScan); this.menuZaxisScan.AutomaticScript = false; //多维图像合成 this.menuMultiDimensional = new PdnMenuItem(ActionType.MultiDimensional); this.menuMultiDimensional.AutomaticScript = false; //位置列表 this.menuListOfLocations = new PdnMenuItem(ActionType.ListOfLocations); this.menuListOfLocations.AutomaticScript = false; // 曝光 this.menuAdjustExposure = new PdnMenuItem(ActionType.AdjustExposure); this.menuAdjustExposure.AutomaticScript = false; // 白平衡 this.menuAdjustWhiteBalance = new PdnMenuItem(ActionType.AdjustWhiteBalance); this.menuAdjustWhiteBalance.AutomaticScript = false; // 增益 this.menuAdjustGain = new PdnMenuItem(ActionType.AdjustGain); this.menuAdjustGain.AutomaticScript = false; // 饱和度 this.menuAdjustSaturation = new PdnMenuItem(ActionType.AdjustSaturation); this.menuAdjustSaturation.AutomaticScript = false; // 相机模式 this.menuFrameCameraMode = new PdnMenuItem(ActionType.FrameCameraMode); this.menuFrameCameraMode.AutomaticScript = false; // 相机设置 this.menuFrameCameraSet = new PdnMenuItem(ActionType.FrameCameraSet); this.menuFrameCameraSet.AutomaticScript = false; // 图像旋转 this.menuCommonRotate = new PdnMenuItem(ActionType.CommonRotate); this.menuCommonRotate.AutomaticScript = false; // // 主菜单 // this.DropDownItems.AddRange(new ToolStripItem[] { this.menuCameraSelection, this.menuCameraSetting, this.menuCameraAdjust, this.menuCameraFrame, this.menuCameraConventional, this.menuSeparator1, this.menuImageCollectHdr, //this.menuSeparator2, this.menuPreviewAction, this.menuPreviewActionClose, this.menuShootAction, this.menuSeparator3, this.menuAutofocus, this.menuRealTimeDepth, this.menuRealTimeStitching, this.menuAutomaticDepth, this.menuImageStitching, this.menuTimedShooting, this.menuVideoRecording, this.menuZaxisScan, this.menuMultiDimensional, this.menuListOfLocations }); this.Name = "Menu.ImageCollection"; this.Text = PdnResources.GetString("Menu.ImageCollection.Text"); //调节 this.menuCameraAdjust.Click += null; this.menuCameraAdjust.DropDownItems.AddRange(new ToolStripItem[] { this.menuAdjustExposure, this.menuAdjustWhiteBalance, this.menuAdjustGain, this.menuAdjustSaturation }); // // 调节 - 曝光时间 // this.menuAdjustExposure.NeedWaitKey = true; this.menuAdjustExposure.Click += new System.EventHandler(this.AdjustExposure_Click); this.menuAdjustExposure.Text = PdnResources.GetString("Menu.timeofexposure.text"); this.menuAdjustExposure.Image = PdnResources.GetImageResource("Icons.MenuImageCollectionExposureTimeIcon.png").Reference; // // 调节 - 白平衡 // this.menuAdjustWhiteBalance.NeedWaitKey = true; this.menuAdjustWhiteBalance.Click += new System.EventHandler(this.AdjustWhiteBalance_Click); this.menuAdjustWhiteBalance.Text = PdnResources.GetString("Menu.Image.WhiteBalance.Text"); this.menuAdjustWhiteBalance.Image = PdnResources.GetImageResource("Icons.MenuImageCollectionWhiteBalanceIcon.png").Reference; // // 调节 - 增益 // this.menuAdjustGain.NeedWaitKey = true; this.menuAdjustGain.Click += new System.EventHandler(this.AdjustGain_Click); this.menuAdjustGain.Text = PdnResources.GetString("Menu.imagecapture.adjust.Gain.text"); this.menuAdjustGain.Image = PdnResources.GetImageResource("Icons.MenuImageCollectionGainIcon.png").Reference; // // 调节 - 饱和度 // this.menuAdjustSaturation.NeedWaitKey = true; this.menuAdjustSaturation.Click += new System.EventHandler(this.AdjustSaturation_Click); this.menuAdjustSaturation.Text = PdnResources.GetString("Menu.saturation.text"); this.menuAdjustSaturation.Image = PdnResources.GetImageResource("Icons.MenuImageCollectionSaturationIcon.png").Reference; // // 边框 // this.menuCameraFrame.Click += null; this.menuCameraFrame.DropDownItems.AddRange(new ToolStripItem[] { this.menuFrameCameraMode, this.menuFrameCameraSet }); // // 边框 - 相机模式 // this.menuFrameCameraMode.NeedWaitKey = true; this.menuFrameCameraMode.Click += new System.EventHandler(this.FrameCameraMode_Click); this.menuFrameCameraMode.Text = PdnResources.GetString("Menu.Cameramode.text"); this.menuFrameCameraMode.Image = PdnResources.GetImageResource("Icons.MenuImageCollectionFrameCameraModeIcon.png").Reference; // // 边框 - 相机设置 // this.menuFrameCameraSet.NeedWaitKey = true; this.menuFrameCameraSet.Click += new System.EventHandler(this.FrameCameraSet_Click); this.menuFrameCameraSet.Text = PdnResources.GetString("Menu.ImageCollection.CameraSetting.Text"); this.menuFrameCameraSet.Image = PdnResources.GetImageResource("Icons.MenuImageCollectionFrameCameraSetIcon.png").Reference; // // 常规 // this.menuCameraConventional.Click += null; this.menuCameraConventional.DropDownItems.AddRange(new ToolStripItem[] { this.menuCommonRotate, }); // // 边框 - 相机设置 // this.menuCommonRotate.NeedWaitKey = true; this.menuCommonRotate.Click += new System.EventHandler(this.CommonRotate_Click); this.menuCommonRotate.Text = PdnResources.GetString("Menu.Imagerotation.text"); this.menuCommonRotate.Image = PdnResources.GetImageResource("Icons.MenuImageCollectionCommonRotateIcon.png").Reference; // // HDR // this.menuImageCollectHdr.Click += new System.EventHandler(this.HDR_Click); // // 预览窗口 // this.menuPreviewAction.NeedWaitKey = true; this.menuPreviewAction.Click += new System.EventHandler(this.previewExtraction_Click); // // 关闭预览 // this.menuPreviewActionClose.NeedWaitKey = true; this.menuPreviewActionClose.Click += new System.EventHandler(this.PreviewActionClose_Click); // // 加载菜单的文字和icon // this.LoadNames(this.Name); this.LoadIcons(); } #region 自动聚焦 /// /// 自动聚焦 /// /// /// private void Autofocus_Click(object sender, EventArgs e) { } #endregion protected override void OnDropDownOpening(EventArgs e) { } private void MenuCreameItem_Click(object sender, EventArgs e) { } private void CommonRotate_Click(object sender, EventArgs e) { } private void FrameCameraSet_Click(object sender, EventArgs e) { } private void FrameCameraMode_Click(object sender, EventArgs e) { } private void AdjustSaturation_Click(object sender, EventArgs e) { } private void AdjustGain_Click(object sender, EventArgs e) { } private void AdjustWhiteBalance_Click(object sender, EventArgs e) { } private void AdjustExposure_Click(object sender, EventArgs e) { } private void HDR_Click(object sender, EventArgs e) { } /// /// 预览窗口 /// /// /// private void previewExtraction_Click(object sender, System.EventArgs e) { } /// /// 关闭预览 /// /// /// private void PreviewActionClose_Click(object sender, System.EventArgs e) { } } }