-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm7.cs
65 lines (54 loc) · 1.86 KB
/
Form7.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
using System;
using System.Configuration;
using System.IO;
using System.Windows.Forms;
namespace RegisterParcelsFromPC
{
public partial class Form7 : Form
{
public Form7()
{
InitializeComponent();
textBox1.Text = ConfigurationManager.AppSettings["slack_testuser"];
}
private void button1_Click(object sender, EventArgs e)
{
try
{
string nowtime = DateTime.Now.ToString("HH-mm-ss");
string temp_path = $@"C:\temp\{nowtime}.gif";
QrCode qr = new QrCode();
qr.QRcodeCreate(textBox2.Text, temp_path);
Httppost httppost = new Httppost();
httppost.posting_DM_image(textBox1.Text, temp_path, "image test from 庶務部用管理ツール");
File.Delete(temp_path);
}
catch (Exception ee)
{
NLogService.PrintInfoLog("例外_Form7_postingIMG");
NLogService.PrintInfoLog(ee.ToString());
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
//Periodic_check peri = new Periodic_check();
//peri.send_slack("FB751035-46C3-4999-A6C5-EFBF24BFF650","フォームのボタンからのテスト送信",1);
Httppost httppost = new Httppost();
httppost.posting_DM(textBox1.Text, "test from 庶務部用管理ツール");
}
catch (Exception ee)
{
NLogService.PrintInfoLog("例外_Form7_postingTXT");
NLogService.PrintInfoLog(ee.ToString());
}
}
private void label1_Click(object sender, EventArgs e)
{
}
private void Form7_Load(object sender, EventArgs e)
{
}
}
}