-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStore.java
More file actions
185 lines (162 loc) · 5.33 KB
/
Store.java
File metadata and controls
185 lines (162 loc) · 5.33 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
package client;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextArea;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Point;
import javax.swing.SwingConstants;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class Store extends JFrame {
private JPanel contentPane;
static public JTextField sage;
static public JTextField ssex;
static public JTextField sname;
static public JTextArea content;
static public JTextArea wait;
static public JLabel mark;
static public JTextField ID;
/**
* Launch the application.
*/
// public static void main(String[] args) {
// EventQueue.invokeLater(new Runnable() {
// public void run() {
// try {
// Store frame = new Store();
// frame.setVisible(true);
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// });
// }
/**
* Create the frame.
*/
public Store(Point p) {
this.setLocation(p);
this.setTitle("浪렛와빵똥");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//setBounds(100, 100, 650, 450);
this.setSize(650, 450);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
wait = new JTextArea();
wait.setEditable(false);
wait.setBounds(277, 51, 343, 201);
contentPane.add(wait);
JLabel label = new JLabel("\u5F53\u524D\u7B49\u5F85\u961F\u5217");
label.setHorizontalAlignment(SwingConstants.CENTER);
label.setFont(new Font("菓흡錤붚", Font.PLAIN, 25));
label.setBounds(374, 10, 179, 30);
contentPane.add(label);
content = new JTextArea();
content.setEditable(false);
content.setBounds(10, 227, 231, 174);
contentPane.add(content);
JLabel label_1 = new JLabel("\u836F\u54C1\u5185\u5BB9");
label_1.setHorizontalAlignment(SwingConstants.CENTER);
label_1.setFont(new Font("菓흡錤붚", Font.PLAIN, 25));
label_1.setBounds(36, 187, 179, 30);
contentPane.add(label_1);
sage = new JTextField();
sage.setEditable(false);
sage.setColumns(10);
sage.setBounds(136, 121, 106, 21);
contentPane.add(sage);
JLabel label_2 = new JLabel("\u5E74\u9F84\uFF1A");
label_2.setFont(new Font("菓흡錤붚", Font.PLAIN, 18));
label_2.setBounds(24, 127, 54, 15);
contentPane.add(label_2);
JLabel label_3 = new JLabel("\u6027\u522B\uFF1A");
label_3.setFont(new Font("菓흡錤붚", Font.PLAIN, 18));
label_3.setBounds(22, 97, 54, 16);
contentPane.add(label_3);
ssex = new JTextField();
ssex.setEditable(false);
ssex.setColumns(10);
ssex.setBounds(135, 92, 106, 21);
contentPane.add(ssex);
sname = new JTextField();
sname.setEditable(false);
sname.setColumns(10);
sname.setBounds(135, 61, 106, 21);
contentPane.add(sname);
JLabel label_4 = new JLabel("\u59D3\u540D\uFF1A");
label_4.setFont(new Font("菓흡錤붚", Font.PLAIN, 18));
label_4.setBounds(22, 62, 54, 15);
contentPane.add(label_4);
JLabel label_5 = new JLabel("\u5F53\u524D\u53D6\u836F\u7684\u4EBA");
label_5.setHorizontalAlignment(SwingConstants.CENTER);
label_5.setFont(new Font("菓흡錤붚", Font.PLAIN, 25));
label_5.setBounds(36, 10, 179, 30);
contentPane.add(label_5);
JButton button = new JButton("\u4E0B\u4E00\u4E2A");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ClientStoreThread.nextFunctioin();
}
});
button.setBounds(447, 347, 106, 35);
contentPane.add(button);
JButton button_1 = new JButton("\u53D6\u836F\u5B8C\u6210");
button_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if(ClientStoreThread.myWaitPatient.size()==0){
return;
}
if(!mark.getText().equals("늪깹훙綠마운")){
return;
}
ClientStoreThread.sendInfo();
ClientStoreThread.updatePaitenInfo();
ClientStoreThread.showCurrentMedicineInfo();
if(ClientStoreThread.myWaitPatient.size()!=0){
ClientStoreThread.StorePatientInfo cs=ClientStoreThread.myWaitPatient.get(0);
Store.sname.setText(cs.name);
Store.ssex.setText(cs.sex);
Store.sage.setText(cs.age);
Store.ID.setText(cs.id);
if(cs.isPay){
Store.mark.setText("늪깹훙綠마운");
}
else{
Store.mark.setText("灌마운");
}
}
else{
Store.sname.setText("");
Store.ssex.setText("");
Store.sage.setText("");
Store.ID.setText("");
Store.mark.setText("마운繫列");
}
}
});
button_1.setBounds(327, 347, 106, 35);
contentPane.add(button_1);
mark = new JLabel("\u662F\u5426\u5DF2\u4ED8\u6B3E");
mark.setHorizontalAlignment(SwingConstants.CENTER);
mark.setFont(new Font("菓흡錤붚", Font.PLAIN, 25));
mark.setBounds(355, 282, 179, 30);
contentPane.add(mark);
JLabel label_6 = new JLabel("\u75C5\u4EBA\u53F7\u7801\uFF1A");
label_6.setFont(new Font("菓흡錤붚", Font.PLAIN, 18));
label_6.setBounds(22, 153, 106, 17);
contentPane.add(label_6);
ID = new JTextField();
ID.setEditable(false);
ID.setColumns(10);
ID.setBounds(135, 152, 106, 21);
contentPane.add(ID);
}
}