This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
LaptopSimulator2015/LevelTest/ArrayDialog.cs

33 lines
818 B
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 LevelTest
{
public partial class ArrayDialog : Form
{
public int returnIndex;
public ArrayDialog(string[] items, string title = "")
{
InitializeComponent();
listBox1.Items.AddRange(items);
Text = title;
}
private void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
returnIndex = listBox1.SelectedIndex;
DialogResult = DialogResult.OK;
Close();
}
private void ArrayDialog_Load(object sender, EventArgs e) => BringToFront();
}
}