CommonRotateDialog.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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;
  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. m_control = new CommonRotateControl();
  21. m_control.Location = new Point(5, 5);
  22. this.Width = m_control.Width + 30;
  23. this.Height = m_control.Height + 50;
  24. this.Controls.Add(m_control);
  25. this.InitializeComponent();
  26. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  27. this.MaximizeBox = false;
  28. this.MinimizeBox = false;
  29. }
  30. private void CommonRotateDialog_Load(object sender, EventArgs e)
  31. {
  32. m_control.Initialize();
  33. this.Text = PdnResources.GetString("Menu.Imagerotation.text");
  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. //
  60. // CommonRotateDialog
  61. //
  62. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
  63. this.ClientSize = new System.Drawing.Size(509, 115);
  64. this.Name = "CommonRotateDialog";
  65. this.Padding = new System.Windows.Forms.Padding(15);
  66. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  67. this.Load += new System.EventHandler(this.CommonRotateDialog_Load);
  68. this.ResumeLayout(false);
  69. }
  70. #endregion
  71. }
  72. }