Menu

[r42]: / trunk / TimeStretchDialog.cs  Maximize  Restore  History

Download this file

36 lines (31 with data), 901 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Windows.Forms;
namespace MouseController
{
public partial class TimeStretchDialog : Form
{
public TimeStretchDialog(double timeStretch)
{
InitializeComponent();
txtTimeStretch.Text = timeStretch.ToString("F1");
}
public double TimeStretch {get; private set;}
private void btnOk_Click(object sender, EventArgs e)
{
try
{
TimeStretch = Convert.ToDouble(txtTimeStretch.Text);
DialogResult = DialogResult.OK;
}
catch
{
// ignore exceptions
}
}
private void txtTimeStretch_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
btnOk_Click(sender, e);
}
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.