Menu

[r38]: / trunk / WhatsappClient / Forms / Form_AddContact.cs  Maximize  Restore  History

Download this file

59 lines (47 with data), 1.5 kB

 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* by Stefan Bijen aka Freakypain - stefan.bijen@gmail.com
*/
// TODO: Make all buttons working
// TODO: Change list to checkedListbox
// TODO: Let User add names from contacts
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WhatsappClient.Forms
{
public partial class Form_AddContact : Form
{
Classes.AddContact ContactHelper = new Classes.AddContact();
public Form_AddContact()
{
InitializeComponent();
}
/// <summary>
/// Add Phone To list
/// </summary>
private void btn_addPhone_Click(object sender, EventArgs e)
{
// TODO AddContact Class for valid phone number
// Check if valid phonenumber
lst_phoneNumbers.Items.Add(txt_phoneNumber.Text);
}
/// <summary>
/// Save Contact list
/// </summary>
private void btn_savePhoneList_Click(object sender, EventArgs e)
{
// Store numbers to string array
List<string> phoneNumbers = new List<string>();
for(int i = 0; i < lst_phoneNumbers.Items.Count; i++){
phoneNumbers.Add(lst_phoneNumbers.Items[i].ToString());
}
//xmlContactsGenerate
ContactHelper.xmlContactsWrite(phoneNumbers);
}
}
}
MongoDB Logo MongoDB