This commit is contained in:
63
AyaNovaQBI/MapSelectAyaNovaItem.cs
Normal file
63
AyaNovaQBI/MapSelectAyaNovaItem.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
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 AyaNovaQBI
|
||||
{
|
||||
public partial class MapSelectAyaNovaItem : Form
|
||||
{
|
||||
public MapSelectAyaNovaItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string SelectedItemName
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((DataRowView)cbItems.SelectedItem).Row[0].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public long SelectedItemId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((DataRowView)cbItems.SelectedItem).Row[1];
|
||||
}
|
||||
}
|
||||
|
||||
public DataTable Items { get; set; }
|
||||
|
||||
private void MapSelectAyaNovaItem_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
cbItems.DataSource = Items;
|
||||
|
||||
cbItems.DisplayMember = "name";
|
||||
cbItems.ValueMember = "id";
|
||||
btnCancel.Text = util.AyaTranslations["Cancel"];
|
||||
btnOK.Text = util.AyaTranslations["OK"];
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user