Client/Desktop/KMBIM3.0/23.10.16/Cmd/SyncPipe/SelectLocation.cs

92 lines
2.0 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KMBIM.Revit.Tools.Cmd.SyncPipe
{
public partial class SelectLocation : Form
{
public int value = 0;
public int insulValue = 0;
public int ccValue = 0;
public SelectLocation()
{
InitializeComponent();
}
private void rb_Up_CheckedChanged(object sender, EventArgs e)
{
value = 1;
}
private void rb_Middle_CheckedChanged(object sender, EventArgs e)
{
value = 2;
}
private void rb_down_CheckedChanged(object sender, EventArgs e)
{
value = 3;
}
private void btn_Confirm_Click(object sender, EventArgs e)
{
Close();
}
private void btn_Cancel_Click(object sender, EventArgs e)
{
ccValue = 1;
Close();
}
private void cb_Insulation_CheckedChanged(object sender, EventArgs e)
{
isChecked(cb_Insulation.Checked);
}
public void isChecked(bool Checked)
{
if (Checked)
{
insulValue = 2;
}
else
{
insulValue = 1;
}
}
private void SelectLocation_Load(object sender, EventArgs e)
{
this.KeyPreview = true;
isChecked(cb_Insulation.Checked);
}
private void gb_Seletion_Enter(object sender, EventArgs e)
{
}
private void SelectLocation_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
this.DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == Keys.Enter)
{
this.DialogResult = DialogResult.OK;
}
}
}
}