3 using System.Collections;
4 using System.ComponentModel;
5 using System.Windows.Forms;
10 /// Summary description for TransparencyDialog.
12 public class TransparencyDialog : System.Windows.Forms.Form
14 private System.Windows.Forms.NumericUpDown MyTransparency;
16 /// Required designer variable.
18 private System.ComponentModel.Container components = null;
19 private OCCTProxy myView;
21 public TransparencyDialog()
24 // Required for Windows Form Designer support
26 InitializeComponent();
29 // TODO: Add any constructor code after InitializeComponent call
35 /// Clean up any resources being used.
37 protected override void Dispose(bool disposing)
41 if (components != null)
46 base.Dispose(disposing);
49 #region Windows Form Designer generated code
51 /// Required method for Designer support - do not modify
52 /// the contents of this method with the code editor.
54 private void InitializeComponent()
56 System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TransparencyDialog));
57 this.MyTransparency = new System.Windows.Forms.NumericUpDown();
58 ((System.ComponentModel.ISupportInitialize)(this.MyTransparency)).BeginInit();
63 this.MyTransparency.Location = new System.Drawing.Point(16, 16);
64 this.MyTransparency.Maximum = new System.Decimal(new int[] {
69 this.MyTransparency.Name = "MyTransparency";
70 this.MyTransparency.Size = new System.Drawing.Size(96, 20);
71 this.MyTransparency.TabIndex = 0;
72 this.MyTransparency.ValueChanged += new System.EventHandler(this.MyTransparency_ValueChanged);
76 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
77 this.ClientSize = new System.Drawing.Size(128, 53);
78 this.Controls.Add(this.MyTransparency);
79 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
80 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
81 this.MaximizeBox = false;
82 this.MinimizeBox = false;
83 this.Name = "TransparencyDialog";
84 this.Text = "TransparencyDialog";
85 ((System.ComponentModel.ISupportInitialize)(this.MyTransparency)).EndInit();
86 this.ResumeLayout(false);
91 private void MyTransparency_ValueChanged(object sender, System.EventArgs e)
93 if (this.myView == null)
95 int transp = (int)this.MyTransparency.Value;
96 this.myView.SetTransparency(transp);