using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace BeanIM
{
///
/// Summary description for OptionsForm.
///
public class OptionsForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Button applyButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.GroupBox groupBox1;
public double opacityLevel;
private System.Windows.Forms.TrackBar opacityTrackBar;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public OptionsForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
opacityLevel = 100;
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.applyButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.opacityTrackBar = new System.Windows.Forms.TrackBar();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.opacityTrackBar)).BeginInit();
this.SuspendLayout();
//
// applyButton
//
this.applyButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.applyButton.Location = new System.Drawing.Point(192, 232);
this.applyButton.Name = "applyButton";
this.applyButton.Size = new System.Drawing.Size(64, 24);
this.applyButton.TabIndex = 0;
this.applyButton.Text = "Apply";
this.applyButton.Click += new System.EventHandler(this.applyButton_Click);
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(104, 232);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(64, 24);
this.cancelButton.TabIndex = 1;
this.cancelButton.Text = "Cancel";
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// groupBox1
//
this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.opacityTrackBar});
this.groupBox1.Location = new System.Drawing.Point(8, 16);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(272, 88);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Opacity";
//
// opacityTrackBar
//
this.opacityTrackBar.Location = new System.Drawing.Point(24, 24);
this.opacityTrackBar.Maximum = 100;
this.opacityTrackBar.Minimum = 40;
this.opacityTrackBar.Name = "opacityTrackBar";
this.opacityTrackBar.Size = new System.Drawing.Size(224, 45);
this.opacityTrackBar.TabIndex = 0;
this.opacityTrackBar.TickFrequency = 2;
this.opacityTrackBar.Value = 100;
this.opacityTrackBar.Scroll += new System.EventHandler(this.opacityTrackBar_Scroll);
//
// OptionsForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.groupBox1,
this.cancelButton,
this.applyButton});
this.Name = "OptionsForm";
this.Text = "Options";
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.opacityTrackBar)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void applyButton_Click(object sender, System.EventArgs e)
{
opacityLevel = (double) opacityTrackBar.Value / 100;
}
private void cancelButton_Click(object sender, System.EventArgs e)
{
}
private void opacityComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
private void opacityTrackBar_Scroll(object sender, System.EventArgs e)
{
this.Opacity = (double) opacityTrackBar.Value/100;
}
}
}