-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttachForm.cs
More file actions
67 lines (58 loc) · 1.93 KB
/
Copy pathAttachForm.cs
File metadata and controls
67 lines (58 loc) · 1.93 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
59
60
61
62
63
64
65
66
67
/*
* Copyright (c) 2007-2008 wqNotes Project
* License: BSD
* Windows: AttachForm.cs, $Revision$
* $HeadURL$
* $Date$
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace wqNotes
{
public partial class AttachForm : Form
{
public string wqInput;
public bool wqOut_IsLink;
public DateTime wqOut_Dtc;
public DateTime wqOut_Dtm;
public AttachForm()
{
InitializeComponent();
}
private void Form7_Load(object sender, EventArgs e)
{
textBox1.Text = wqInput;
bool param = wqInput.EndsWith(".exe");
pictureBox1.Image = Program.GetFileIcon(wqInput, param, false);
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
groupBox1.Enabled = !checkBox1.Checked;
groupBox2.Enabled = !checkBox1.Checked;
}
private void button1_Click(object sender, EventArgs e)
{
System.IO.FileInfo fi = new System.IO.FileInfo(wqInput);
wqOut_IsLink = checkBox1.Checked;
if (radioButton1.Checked) wqOut_Dtc = fi.CreationTimeUtc;
if (radioButton2.Checked) wqOut_Dtc = DateTime.Now;
if (radioButton3.Checked) wqOut_Dtc = dateTimePicker1.Value;
if (radioButton6.Checked) wqOut_Dtm = fi.LastWriteTimeUtc;
if (radioButton5.Checked) wqOut_Dtm = DateTime.Now;
if (radioButton4.Checked) wqOut_Dtm = dateTimePicker2.Value;
}
private void dateTimePicker1_Enter(object sender, EventArgs e)
{
radioButton3.Checked = true;
}
private void dateTimePicker2_Enter(object sender, EventArgs e)
{
radioButton4.Checked = true;
}
}
}