-
Notifications
You must be signed in to change notification settings - Fork 0
/
FRM_DatialsEshtrackat.cs
125 lines (103 loc) · 3.44 KB
/
FRM_DatialsEshtrackat.cs
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.IO.Ports;
namespace FighyGym2
{
public partial class FRM_DatialsEshtrackat : DevExpress.XtraEditors.XtraForm
{
public FRM_DatialsEshtrackat()
{
InitializeComponent();
}
public string sms, phon;
void load()
{
string[] ports = SerialPort.GetPortNames();
foreach (string item in ports)
{
// comboBox1.Items.Add(item);
}
}
private void FRM_DatialsEshtrackat_Load(object sender, EventArgs e)
{
firstName.Text = Properties.Settings.Default.StuName;
txtclass.Text = Properties.Settings.Default.ClassName;
txtphone.Text = Properties.Settings.Default.phone;
//byte img =Convert.ToByte( Properties.Settings.Default.pic);
txtImage.SizeMode = PictureBoxSizeMode.StretchImage;
if (Properties.Settings.Default.pic == "")
{
MessageBox.Show("لاتوجد صورة للمشترك!");
}
else
{
txtImage.Load(Properties.Settings.Default.pic);
}
}
private void txtImage_Click(object sender, EventArgs e)
{
}
private void simpleButton2_Click(object sender, EventArgs e)
{
// //send
// try{
// string from = "+967774941928";
// string to = txtphone.Text;
// string msg = textBox1.Text;
// WhatsApp wa = new WhatsApp(from,"1995", "samiah",true);
// wa.OnConnectSuccess += () =>
// {
// MessageBox.Show("connect to whatsapp..");
// wa.OnLoginSuccess += (phonrnumb, data) =>
// {
// wa.SendMessage(to, msg);
// MessageBox.Show("message sent...");
// };
// wa.OnLoginFailed += (data) =>
// {
// MessageBox.Show("login Faild : {0}", data);
// };
// wa.Login();
// };
// wa.OnConnectFailed += (ex) =>
// {
// MessageBox.Show("connection faild...");
// };
// wa.Connect();
// }
// catch(Exception ex) { MessageBox.Show(ex.Message); }
// //try
//{
// load();
// for (int i = 0; i <= comboBox1.Items.Count - 1; i++)
// {
// comboBox1.SelectedIndex = i;
// port = cls.OpenPort(comboBox1.Text, Convert.ToInt32(9600), Convert.ToInt32(8), Convert.ToInt32(300), Convert.ToInt32(300));
// phon = txtphone.Text;
// sms = textBox1.Text;
// try
// {
// if (cls.sendMsg(port, phon, sms))
// {
// cls.ClosePort(port);
// }
// }
// catch (Exception)
// {
// }
// }
//}
//catch (Exception)
//{
//}
}
}
}