123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367 |
- 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
- {
- /// <summary>
- /// 图像采集菜单
- /// </summary>
- 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 自动聚焦
- /// <summary>
- /// 自动聚焦
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- 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)
- {
-
- }
- /// <summary>
- /// 预览窗口
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void previewExtraction_Click(object sender, System.EventArgs e)
- {
-
- }
- /// <summary>
- /// 关闭预览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void PreviewActionClose_Click(object sender, System.EventArgs e)
- {
-
- }
-
- }
- }
|