CommonRotateDialog.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using PaintDotNet.ImageCollect.CameraComponent;
  11. using PaintDotNet.Base.SettingModel;
  12. namespace PaintDotNet.ImageCollect
  13. {
  14. internal class CommonRotateDialog : FloatingToolForm
  15. {
  16. private CameraParamModel m_cameraParamModel = Startup.instance.cameraParamModel;
  17. private CommonRotateControl m_control;
  18. public CommonRotateDialog()
  19. {
  20. this.InitializeComponent();
  21. this.Text = PdnResources.GetString("Menu.Imagerotation.text");
  22. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  23. this.MaximizeBox = false;
  24. this.MinimizeBox = false;
  25. }
  26. private void CommonRotateDialog_Load(object sender, EventArgs e)
  27. {
  28. m_control = new CommonRotateControl();
  29. m_control.Initialize(m_cameraParamModel, true);
  30. m_control.Location = new Point(5, 5);
  31. this.Controls.Add(m_control);
  32. this.Width = m_control.Width + 30;
  33. this.Height = m_control.Height + 50;
  34. }
  35. #region 控件
  36. /// <summary>
  37. /// Required designer variable.
  38. /// </summary>
  39. private System.ComponentModel.IContainer components = null;
  40. /// <summary>
  41. /// Clean up any resources being used.
  42. /// </summary>
  43. /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  44. protected override void Dispose(bool disposing)
  45. {
  46. if (disposing && (components != null))
  47. {
  48. components.Dispose();
  49. }
  50. base.Dispose(disposing);
  51. }
  52. /// <summary>
  53. /// Required method for Designer support - do not modify
  54. /// the contents of this method with the code editor.
  55. /// </summary>
  56. private void InitializeComponent()
  57. {
  58. this.SuspendLayout();
  59. //m_control = new CommonRotateControl(m_cameraParamModel, true);
  60. //m_control.Dock = DockStyle.Fill;
  61. //
  62. // CommonRotateDialog
  63. //
  64. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  65. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  66. this.ClientSize = new System.Drawing.Size(645, 115);
  67. this.MaximizeBox = false;
  68. this.MinimizeBox = false;
  69. //this.AutoSize = true;
  70. this.Name = "CommonRotateDialog";
  71. this.Padding = new System.Windows.Forms.Padding(15);
  72. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  73. this.Load += new System.EventHandler(this.CommonRotateDialog_Load);
  74. }
  75. #endregion
  76. }
  77. }