| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.ComponentModel;
|
|---|
| 4 | using System.Data;
|
|---|
| 5 | using System.Drawing;
|
|---|
| 6 | using System.Text;
|
|---|
| 7 | using System.Windows.Forms;
|
|---|
| 8 |
|
|---|
| 9 | namespace Misuzilla.Applications.Mobile.Criw0
|
|---|
| 10 | {
|
|---|
| 11 | public partial class AutoJoinSettingForm : Form
|
|---|
| 12 | {
|
|---|
| 13 | public AutoJoinSettingForm()
|
|---|
| 14 | {
|
|---|
| 15 | InitializeComponent();
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | public List<String> Channels
|
|---|
| 19 | {
|
|---|
| 20 | get
|
|---|
| 21 | {
|
|---|
| 22 | List<String> channels = new List<string>();
|
|---|
| 23 | foreach (Object o in listChannels.Items)
|
|---|
| 24 | {
|
|---|
| 25 | channels.Add(o.ToString());
|
|---|
| 26 | }
|
|---|
| 27 | return channels;
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | set
|
|---|
| 31 | {
|
|---|
| 32 | listChannels.Items.Clear();
|
|---|
| 33 | if (value == null) return;
|
|---|
| 34 | foreach (String s in value)
|
|---|
| 35 | {
|
|---|
| 36 | listChannels.Items.Add(s);
|
|---|
| 37 | }
|
|---|
| 38 | }
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | private void buttonAdd_Click(object sender, EventArgs e)
|
|---|
| 42 | {
|
|---|
| 43 | if (!listChannels.Items.Contains(textChannelName.Text))
|
|---|
| 44 | {
|
|---|
| 45 | listChannels.Items.Add(textChannelName.Text);
|
|---|
| 46 | }
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | private void buttonRemove_Click(object sender, EventArgs e)
|
|---|
| 50 | {
|
|---|
| 51 | if (listChannels.SelectedIndex > -1)
|
|---|
| 52 | {
|
|---|
| 53 | listChannels.Items.RemoveAt(listChannels.SelectedIndex);
|
|---|
| 54 | }
|
|---|
| 55 | }
|
|---|
| 56 |
|
|---|
| 57 | private void menuItemSave_Click(object sender, EventArgs e)
|
|---|
| 58 | {
|
|---|
| 59 | this.DialogResult = DialogResult.OK;
|
|---|
| 60 | this.Close();
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | private void menuItemCancel_Click(object sender, EventArgs e)
|
|---|
| 64 | {
|
|---|
| 65 | this.DialogResult = DialogResult.Cancel;
|
|---|
| 66 | this.Close();
|
|---|
| 67 | }
|
|---|
| 68 | }
|
|---|
| 69 | } |
|---|