Bonjour,
j'ai une interface graphique que j'ai travaillé en vb.net mais maintenant je veux la traduire en java. J'ai 3 classes : acceuil, correction, proc. J'ai traduit ce code à travers "Tangible Software Source Code Converters 18.2.28" mais il y a plein et plein d'erreur, je veux que ça soit avec windowbuilder.
Quelqu'un peu m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589 package CorrectionInterface; import javax.swing.*; //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>Partial Class acceuil public class acceuil extends System.Windows.Forms.Form { //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub btnCloseRts_Click(sender As Object, e As EventArgs) Handles btnCloseRts.Click private void btnCloseRts_Click(Object sender, EventArgs e) { rtsPanel.Hide(); } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub RToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RToolStripMenuItem.Click private void RToolStripMenuItem_Click(Object sender, EventArgs e) { rtsPanel.Show(); } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub acceuil_Load(sender As Object, e As EventArgs) Handles MyBase.Load private void acceuil_Load(Object sender, EventArgs e) { rtsPanel.Hide(); taskTemporel.Hide(); } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub annulerRts_Click(sender As Object, e As EventArgs) Handles annulerRts.Click private void annulerRts_Click(Object sender, EventArgs e) { rtsPanel.Hide(); } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub validerRts_Click(sender As Object, e As EventArgs) Handles validerRts.Click private void validerRts_Click(Object sender, EventArgs e) { rtsPanel.Hide(); taskTemporel.Show(); } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click private void Button1_Click(Object sender, EventArgs e) { taskTemporel.Hide(); } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click private void ExitToolStripMenuItem_Click(Object sender, EventArgs e) { this.Close(); } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click private void Button2_Click(Object sender, EventArgs e) { switch (JOptionPane.showConfirmDialog(null, "Configuration is Finished", "Configuration Result", JOptionPane.OK_CANCEL_OPTION)) { case JOptionPane.OK_OPTION: this.Hide(); proc.DefaultInstance().Show(); break; case JOptionPane.CANCEL_OPTION: taskTemporel.Show(); break; } } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click private void PictureBox1_Click(Object sender, EventArgs e) { } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click private void Label6_Click(Object sender, EventArgs e) { } //Form overrides dispose to clean up the component list. //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <System.Diagnostics.DebuggerNonUserCode()> Protected Overrides Sub Dispose(ByVal disposing As Boolean) @Override protected void Dispose(boolean disposing) { try { if (disposing && components != null) { components.Dispose(); } } finally { super.Dispose(disposing); } } //Required by the Windows Form Designer private System.ComponentModel.IContainer components; //NOTE: The following procedure is required by the Windows Form Designer //It can be modified using the Windows Form Designer. //Do not modify it using the code editor. //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(acceuil.class); this.MenuStrip = new System.Windows.Forms.MenuStrip(); this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.NewProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.RToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.OpenProjectsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ImportProjectsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ExitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.rtsPanel = new System.Windows.Forms.Panel(); this.NumericUpDown2 = new System.Windows.Forms.NumericUpDown(); this.NumericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.Label3 = new System.Windows.Forms.Label(); this.annulerRts = new System.Windows.Forms.Button(); this.validerRts = new System.Windows.Forms.Button(); this.Label2 = new System.Windows.Forms.Label(); this.Label1 = new System.Windows.Forms.Label(); this.btnCloseRts = new System.Windows.Forms.Button(); this.taskTemporel = new System.Windows.Forms.Panel(); this.PictureBox1 = new System.Windows.Forms.PictureBox(); this.Panel1 = new System.Windows.Forms.Panel(); this.ComboBox2 = new System.Windows.Forms.ComboBox(); this.ComboBox1 = new System.Windows.Forms.ComboBox(); this.TextBox5 = new System.Windows.Forms.TextBox(); this.TextBox4 = new System.Windows.Forms.TextBox(); this.TextBox3 = new System.Windows.Forms.TextBox(); this.TextBox2 = new System.Windows.Forms.TextBox(); this.Label10 = new System.Windows.Forms.Label(); this.Label9 = new System.Windows.Forms.Label(); this.Label8 = new System.Windows.Forms.Label(); this.Label7 = new System.Windows.Forms.Label(); this.Label6 = new System.Windows.Forms.Label(); this.Label5 = new System.Windows.Forms.Label(); this.Button3 = new System.Windows.Forms.Button(); this.Button2 = new System.Windows.Forms.Button(); this.Label4 = new System.Windows.Forms.Label(); this.Button1 = new System.Windows.Forms.Button(); this.MenuStrip.SuspendLayout(); this.rtsPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)this.NumericUpDown2).BeginInit(); ((System.ComponentModel.ISupportInitialize)this.NumericUpDown1).BeginInit(); this.taskTemporel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)this.PictureBox1).BeginInit(); this.Panel1.SuspendLayout(); this.SuspendLayout(); // //MenuStrip // this.MenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {this.FileToolStripMenuItem, this.HelpToolStripMenuItem}); this.MenuStrip.Location = new System.Drawing.Point(0, 0); this.MenuStrip.Name = "MenuStrip"; this.MenuStrip.Size = new System.Drawing.Size(583, 24); this.MenuStrip.TabIndex = 0; this.MenuStrip.Text = "MenuStrip"; // //FileToolStripMenuItem // this.FileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {this.NewProjectToolStripMenuItem, this.OpenProjectsToolStripMenuItem, this.ImportProjectsToolStripMenuItem, this.SaveToolStripMenuItem, this.ExitToolStripMenuItem}); this.FileToolStripMenuItem.Name = "FileToolStripMenuItem"; this.FileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.FileToolStripMenuItem.Text = "File"; // //NewProjectToolStripMenuItem // this.NewProjectToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {this.RToolStripMenuItem}); this.NewProjectToolStripMenuItem.Image = CorrectionInterface.My.Resources.Resources.getnew_persp(); this.NewProjectToolStripMenuItem.Name = "NewProjectToolStripMenuItem"; this.NewProjectToolStripMenuItem.Size = new System.Drawing.Size(155, 22); this.NewProjectToolStripMenuItem.Text = "New Projects"; // //RToolStripMenuItem // this.RToolStripMenuItem.Image = CorrectionInterface.My.Resources.Resources.gettask_list(); this.RToolStripMenuItem.Name = "RToolStripMenuItem"; this.RToolStripMenuItem.Size = new System.Drawing.Size(171, 22); this.RToolStripMenuItem.Text = "RTS Configuration"; // //OpenProjectsToolStripMenuItem // this.OpenProjectsToolStripMenuItem.Image = CorrectionInterface.My.Resources.Resources.getopen_task(); this.OpenProjectsToolStripMenuItem.Name = "OpenProjectsToolStripMenuItem"; this.OpenProjectsToolStripMenuItem.Size = new System.Drawing.Size(155, 22); this.OpenProjectsToolStripMenuItem.Text = "Open Projects"; // //ImportProjectsToolStripMenuItem // this.ImportProjectsToolStripMenuItem.Image = CorrectionInterface.My.Resources.Resources.getresource_persp(); this.ImportProjectsToolStripMenuItem.Name = "ImportProjectsToolStripMenuItem"; this.ImportProjectsToolStripMenuItem.Size = new System.Drawing.Size(155, 22); this.ImportProjectsToolStripMenuItem.Text = "Import Projects"; // //SaveToolStripMenuItem // this.SaveToolStripMenuItem.Image = CorrectionInterface.My.Resources.Resources.getsave_edit(); this.SaveToolStripMenuItem.Name = "SaveToolStripMenuItem"; this.SaveToolStripMenuItem.Size = new System.Drawing.Size(155, 22); this.SaveToolStripMenuItem.Text = "Save"; // //ExitToolStripMenuItem // this.ExitToolStripMenuItem.Image = CorrectionInterface.My.Resources.Resources.getdelete_edit(); this.ExitToolStripMenuItem.Name = "ExitToolStripMenuItem"; this.ExitToolStripMenuItem.Size = new System.Drawing.Size(155, 22); this.ExitToolStripMenuItem.Text = "Exit"; // //HelpToolStripMenuItem // this.HelpToolStripMenuItem.Name = "HelpToolStripMenuItem"; this.HelpToolStripMenuItem.Size = new System.Drawing.Size(49, 20); this.HelpToolStripMenuItem.Text = "Help?"; // //rtsPanel // this.rtsPanel.BackColor = System.Drawing.SystemColors.ControlLight; this.rtsPanel.Controls.Add(this.NumericUpDown2); this.rtsPanel.Controls.Add(this.NumericUpDown1); this.rtsPanel.Controls.Add(this.Label3); this.rtsPanel.Controls.Add(this.annulerRts); this.rtsPanel.Controls.Add(this.validerRts); this.rtsPanel.Controls.Add(this.Label2); this.rtsPanel.Controls.Add(this.Label1); this.rtsPanel.Controls.Add(this.btnCloseRts); this.rtsPanel.Location = new System.Drawing.Point(174, 43); this.rtsPanel.Name = "rtsPanel"; this.rtsPanel.Size = new System.Drawing.Size(264, 227); this.rtsPanel.TabIndex = 1; // //NumericUpDown2 // this.NumericUpDown2.Location = new System.Drawing.Point(131, 96); this.NumericUpDown2.Name = "NumericUpDown2"; this.NumericUpDown2.Size = new System.Drawing.Size(100, 20); this.NumericUpDown2.TabIndex = 9; // //NumericUpDown1 // this.NumericUpDown1.Location = new System.Drawing.Point(131, 56); this.NumericUpDown1.Name = "NumericUpDown1"; this.NumericUpDown1.Size = new System.Drawing.Size(100, 20); this.NumericUpDown1.TabIndex = 8; // //Label3 // this.Label3.Anchor = System.Windows.Forms.AnchorStyles.forValue(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right); this.Label3.AutoSize = true; //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CByte(0)) this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)0); this.Label3.Location = new System.Drawing.Point(12, 5); this.Label3.Name = "Label3"; this.Label3.Size = new System.Drawing.Size(147, 13); this.Label3.TabIndex = 7; this.Label3.Text = "Insert RTS Configuration"; // //annulerRts // this.annulerRts.Location = new System.Drawing.Point(156, 174); this.annulerRts.Name = "annulerRts"; this.annulerRts.Size = new System.Drawing.Size(75, 23); this.annulerRts.TabIndex = 6; this.annulerRts.Text = "Annuler"; this.annulerRts.UseVisualStyleBackColor = true; // //validerRts // this.validerRts.Location = new System.Drawing.Point(37, 174); this.validerRts.Name = "validerRts"; this.validerRts.Size = new System.Drawing.Size(75, 23); this.validerRts.TabIndex = 5; this.validerRts.Text = "Valider"; this.validerRts.UseVisualStyleBackColor = true; // //Label2 // this.Label2.AutoSize = true; this.Label2.Location = new System.Drawing.Point(35, 103); this.Label2.Name = "Label2"; this.Label2.Size = new System.Drawing.Size(77, 13); this.Label2.TabIndex = 3; this.Label2.Text = "Procs Number:"; // //Label1 // this.Label1.AutoSize = true; this.Label1.Location = new System.Drawing.Point(35, 63); this.Label1.Name = "Label1"; this.Label1.Size = new System.Drawing.Size(79, 13); this.Label1.TabIndex = 1; this.Label1.Text = "Tasks Number:"; // //btnCloseRts // //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.btnCloseRts.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CByte(0)) this.btnCloseRts.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)0); this.btnCloseRts.Location = new System.Drawing.Point(213, 0); this.btnCloseRts.Name = "btnCloseRts"; this.btnCloseRts.Size = new System.Drawing.Size(51, 23); this.btnCloseRts.TabIndex = 0; this.btnCloseRts.Text = "X"; this.btnCloseRts.UseVisualStyleBackColor = true; // //taskTemporel // this.taskTemporel.BackColor = System.Drawing.SystemColors.ControlLight; this.taskTemporel.Controls.Add(this.PictureBox1); this.taskTemporel.Controls.Add(this.Panel1); this.taskTemporel.Controls.Add(this.Button3); this.taskTemporel.Controls.Add(this.Button2); this.taskTemporel.Controls.Add(this.Label4); this.taskTemporel.Controls.Add(this.Button1); this.taskTemporel.Location = new System.Drawing.Point(28, 43); this.taskTemporel.Name = "taskTemporel"; this.taskTemporel.Size = new System.Drawing.Size(510, 240); this.taskTemporel.TabIndex = 2; // //PictureBox1 // this.PictureBox1.BackgroundImage = CorrectionInterface.My.Resources.Resources.getMy_Rencent_Document(); this.PictureBox1.Location = new System.Drawing.Point(343, 45); this.PictureBox1.Name = "PictureBox1"; this.PictureBox1.Size = new System.Drawing.Size(131, 131); this.PictureBox1.TabIndex = 24; this.PictureBox1.TabStop = false; // //Panel1 // this.Panel1.Controls.Add(this.ComboBox2); this.Panel1.Controls.Add(this.ComboBox1); this.Panel1.Controls.Add(this.TextBox5); this.Panel1.Controls.Add(this.TextBox4); this.Panel1.Controls.Add(this.TextBox3); this.Panel1.Controls.Add(this.TextBox2); this.Panel1.Controls.Add(this.Label10); this.Panel1.Controls.Add(this.Label9); this.Panel1.Controls.Add(this.Label8); this.Panel1.Controls.Add(this.Label7); this.Panel1.Controls.Add(this.Label6); this.Panel1.Controls.Add(this.Label5); this.Panel1.Location = new System.Drawing.Point(3, 32); this.Panel1.Name = "Panel1"; this.Panel1.Size = new System.Drawing.Size(311, 185); this.Panel1.TabIndex = 23; // //ComboBox2 // this.ComboBox2.FormattingEnabled = true; this.ComboBox2.Location = new System.Drawing.Point(170, 13); this.ComboBox2.Name = "ComboBox2"; this.ComboBox2.Size = new System.Drawing.Size(121, 21); this.ComboBox2.TabIndex = 33; // //ComboBox1 // this.ComboBox1.FormattingEnabled = true; this.ComboBox1.Location = new System.Drawing.Point(170, 149); this.ComboBox1.Name = "ComboBox1"; this.ComboBox1.Size = new System.Drawing.Size(121, 21); this.ComboBox1.TabIndex = 32; // //TextBox5 // this.TextBox5.Location = new System.Drawing.Point(170, 121); this.TextBox5.Name = "TextBox5"; this.TextBox5.Size = new System.Drawing.Size(121, 20); this.TextBox5.TabIndex = 31; // //TextBox4 // this.TextBox4.Location = new System.Drawing.Point(170, 95); this.TextBox4.Name = "TextBox4"; this.TextBox4.Size = new System.Drawing.Size(121, 20); this.TextBox4.TabIndex = 30; // //TextBox3 // this.TextBox3.Location = new System.Drawing.Point(170, 67); this.TextBox3.Name = "TextBox3"; this.TextBox3.Size = new System.Drawing.Size(121, 20); this.TextBox3.TabIndex = 29; // //TextBox2 // this.TextBox2.Location = new System.Drawing.Point(170, 40); this.TextBox2.Name = "TextBox2"; this.TextBox2.Size = new System.Drawing.Size(121, 20); this.TextBox2.TabIndex = 28; // //Label10 // this.Label10.AutoSize = true; this.Label10.Location = new System.Drawing.Point(14, 157); this.Label10.Name = "Label10"; this.Label10.Size = new System.Drawing.Size(84, 13); this.Label10.TabIndex = 26; this.Label10.Text = "Proc Allocation :"; // //Label9 // this.Label9.AutoSize = true; this.Label9.Location = new System.Drawing.Point(14, 128); this.Label9.Name = "Label9"; this.Label9.Size = new System.Drawing.Size(97, 13); this.Label9.TabIndex = 25; this.Label9.Text = "Dead Line: Di (ms) "; // //Label8 // this.Label8.AutoSize = true; this.Label8.Location = new System.Drawing.Point(14, 102); this.Label8.Name = "Label8"; this.Label8.Size = new System.Drawing.Size(120, 13); this.Label8.TabIndex = 24; this.Label8.Text = "Execution Time: Ci (ms) "; // //Label7 // this.Label7.AutoSize = true; this.Label7.Location = new System.Drawing.Point(14, 74); this.Label7.Name = "Label7"; this.Label7.Size = new System.Drawing.Size(80, 13); this.Label7.TabIndex = 23; this.Label7.Text = "Period : Pi (ms) "; // //Label6 // this.Label6.AutoSize = true; this.Label6.Location = new System.Drawing.Point(16, 47); this.Label6.Name = "Label6"; this.Label6.Size = new System.Drawing.Size(121, 13); this.Label6.TabIndex = 22; this.Label6.Text = "Wake-up Date : Ri (ms) "; // //Label5 // this.Label5.AutoSize = true; this.Label5.Location = new System.Drawing.Point(14, 21); this.Label5.Name = "Label5"; this.Label5.Size = new System.Drawing.Size(51, 13); this.Label5.TabIndex = 21; this.Label5.Text = "Task ID :"; // //Button3 // this.Button3.Enabled = false; this.Button3.Location = new System.Drawing.Point(330, 191); this.Button3.Name = "Button3"; this.Button3.Size = new System.Drawing.Size(75, 23); this.Button3.TabIndex = 22; this.Button3.Text = "Previous"; this.Button3.UseVisualStyleBackColor = true; // //Button2 // this.Button2.Location = new System.Drawing.Point(415, 191); this.Button2.Name = "Button2"; this.Button2.Size = new System.Drawing.Size(75, 23); this.Button2.TabIndex = 21; this.Button2.Text = "Next"; this.Button2.UseVisualStyleBackColor = true; // //Label4 // this.Label4.Anchor = System.Windows.Forms.AnchorStyles.forValue(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right); this.Label4.AutoSize = true; //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CByte(0)) this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)0); this.Label4.ImageAlign = System.Drawing.ContentAlignment.TopLeft; this.Label4.Location = new System.Drawing.Point(12, 5); this.Label4.Name = "Label4"; this.Label4.Size = new System.Drawing.Size(152, 13); this.Label4.TabIndex = 8; this.Label4.Text = "Task Temporel Properties"; // //Button1 // //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CByte(0)) this.Button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)0); this.Button1.Location = new System.Drawing.Point(456, 0); this.Button1.Name = "Button1"; this.Button1.Size = new System.Drawing.Size(54, 23); this.Button1.TabIndex = 0; this.Button1.Text = "X"; this.Button1.UseVisualStyleBackColor = true; // //acceuil // this.AutoScaleDimensions = new System.Drawing.SizeF(6.0F, 13.0F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(583, 312); this.Controls.Add(this.taskTemporel); this.Controls.Add(this.rtsPanel); this.Controls.Add(this.MenuStrip); this.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); this.MainMenuStrip = this.MenuStrip; this.MaximizeBox = false; this.Name = "acceuil"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "SAC - tool"; this.MenuStrip.ResumeLayout(false); this.MenuStrip.PerformLayout(); this.rtsPanel.ResumeLayout(false); this.rtsPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)this.NumericUpDown2).EndInit(); ((System.ComponentModel.ISupportInitialize)this.NumericUpDown1).EndInit(); this.taskTemporel.ResumeLayout(false); this.taskTemporel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)this.PictureBox1).EndInit(); this.Panel1.ResumeLayout(false); this.Panel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } public MenuStrip MenuStrip; public ToolStripMenuItem FileToolStripMenuItem; public ToolStripMenuItem NewProjectToolStripMenuItem; public ToolStripMenuItem OpenProjectsToolStripMenuItem; public ToolStripMenuItem ImportProjectsToolStripMenuItem; public ToolStripMenuItem SaveToolStripMenuItem; public ToolStripMenuItem ExitToolStripMenuItem; public ToolStripMenuItem HelpToolStripMenuItem; public Panel rtsPanel; public Button btnCloseRts; public ToolStripMenuItem RToolStripMenuItem; public Button annulerRts; public Button validerRts; public Label Label2; public Label Label1; public Label Label3; public Panel taskTemporel; public Label Label4; public Button Button1; public Panel Panel1; public ComboBox ComboBox1; public TextBox TextBox5; public TextBox TextBox4; public TextBox TextBox3; public TextBox TextBox2; public Label Label10; public Label Label9; public Label Label8; public Label Label7; public Label Label6; public Label Label5; public Button Button3; public Button Button2; public ComboBox ComboBox2; public NumericUpDown NumericUpDown2; public NumericUpDown NumericUpDown1; public PictureBox PictureBox1; private static acceuil _DefaultInstance; public static acceuil DefaultInstance() { if (_DefaultInstance == null) _DefaultInstance = new acceuil(); return _DefaultInstance; } }
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320 package CorrectionInterface; import javax.swing.*; //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>Partial Class correction public class correction extends System.Windows.Forms.Form { //Form overrides dispose to clean up the component list. //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <System.Diagnostics.DebuggerNonUserCode()> Protected Overrides Sub Dispose(ByVal disposing As Boolean) @Override protected void Dispose(boolean disposing) { try { if (disposing && components != null) { components.Dispose(); } } finally { super.Dispose(disposing); } } //Required by the Windows Form Designer private System.ComponentModel.IContainer components; //NOTE: The following procedure is required by the Windows Form Designer //It can be modified using the Windows Form Designer. //Do not modify it using the code editor. //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(correction.class); this.RichTextBox1 = new System.Windows.Forms.RichTextBox(); this.Panel1 = new System.Windows.Forms.Panel(); this.TextBox4 = new System.Windows.Forms.TextBox(); this.TextBox3 = new System.Windows.Forms.TextBox(); this.TextBox2 = new System.Windows.Forms.TextBox(); this.Label3 = new System.Windows.Forms.Label(); this.Label2 = new System.Windows.Forms.Label(); this.Label1 = new System.Windows.Forms.Label(); this.TableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.ListBox2 = new System.Windows.Forms.ListBox(); this.ListBox3 = new System.Windows.Forms.ListBox(); this.ProgressBar1 = new System.Windows.Forms.ProgressBar(); this.Button2 = new System.Windows.Forms.Button(); this.Button1 = new System.Windows.Forms.Button(); this.PictureBox1 = new System.Windows.Forms.PictureBox(); this.Panel1.SuspendLayout(); this.TableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)this.PictureBox1).BeginInit(); this.SuspendLayout(); // //RichTextBox1 // this.RichTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.RichTextBox1.Location = new System.Drawing.Point(9, 211); this.RichTextBox1.Name = "RichTextBox1"; this.RichTextBox1.Size = new System.Drawing.Size(728, 169); this.RichTextBox1.TabIndex = 17; this.RichTextBox1.Text = resources.GetString("RichTextBox1.Text"); // //Panel1 // this.Panel1.Controls.Add(this.TextBox4); this.Panel1.Controls.Add(this.TextBox3); this.Panel1.Controls.Add(this.TextBox2); this.Panel1.Controls.Add(this.Label3); this.Panel1.Controls.Add(this.Label2); this.Panel1.Controls.Add(this.Label1); this.Panel1.Controls.Add(this.TableLayoutPanel1); this.Panel1.Location = new System.Drawing.Point(9, 14); this.Panel1.Name = "Panel1"; this.Panel1.Size = new System.Drawing.Size(439, 173); this.Panel1.TabIndex = 16; // //TextBox4 // //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.TextBox4.ForeColor = System.Drawing.Color.FromArgb(CInt(CByte(0)), CInt(CByte(192)), CInt(CByte(0))) this.TextBox4.ForeColor = System.Drawing.Color.FromArgb((int)((byte)0), (int)((byte)192), (int)((byte)0)); this.TextBox4.Location = new System.Drawing.Point(323, 90); this.TextBox4.Name = "TextBox4"; this.TextBox4.Size = new System.Drawing.Size(100, 20); this.TextBox4.TabIndex = 13; this.TextBox4.Text = "0,9"; // //TextBox3 // //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.TextBox3.ForeColor = System.Drawing.Color.FromArgb(CInt(CByte(0)), CInt(CByte(192)), CInt(CByte(0))) this.TextBox3.ForeColor = System.Drawing.Color.FromArgb((int)((byte)0), (int)((byte)192), (int)((byte)0)); this.TextBox3.Location = new System.Drawing.Point(323, 38); this.TextBox3.Name = "TextBox3"; this.TextBox3.Size = new System.Drawing.Size(100, 20); this.TextBox3.TabIndex = 12; this.TextBox3.Text = "0,9"; // //TextBox2 // //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.TextBox2.ForeColor = System.Drawing.Color.FromArgb(CInt(CByte(0)), CInt(CByte(192)), CInt(CByte(0))) this.TextBox2.ForeColor = System.Drawing.Color.FromArgb((int)((byte)0), (int)((byte)192), (int)((byte)0)); this.TextBox2.Location = new System.Drawing.Point(323, 64); this.TextBox2.Name = "TextBox2"; this.TextBox2.Size = new System.Drawing.Size(100, 20); this.TextBox2.TabIndex = 11; this.TextBox2.Text = "0,75"; // //Label3 // this.Label3.AutoSize = true; this.Label3.Location = new System.Drawing.Point(314, 16); this.Label3.Name = "Label3"; this.Label3.Size = new System.Drawing.Size(90, 13); this.Label3.TabIndex = 10; this.Label3.Text = "&Proccessor Load:"; // //Label2 // this.Label2.AutoSize = true; this.Label2.Location = new System.Drawing.Point(159, 16); this.Label2.Name = "Label2"; this.Label2.Size = new System.Drawing.Size(88, 13); this.Label2.TabIndex = 9; this.Label2.Text = "&Assigned Tasks :"; // //Label1 // this.Label1.AutoSize = true; this.Label1.Location = new System.Drawing.Point(7, 16); this.Label1.Name = "Label1"; this.Label1.Size = new System.Drawing.Size(66, 13); this.Label1.TabIndex = 8; this.Label1.Text = "&Proccessor :"; // //TableLayoutPanel1 // this.TableLayoutPanel1.BackColor = System.Drawing.SystemColors.Control; this.TableLayoutPanel1.ColumnCount = 2; this.TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 49.84025F)); this.TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.15974F)); this.TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0F)); this.TableLayoutPanel1.Controls.Add(this.ListBox2, 0, 0); this.TableLayoutPanel1.Controls.Add(this.ListBox3, 1, 0); this.TableLayoutPanel1.ForeColor = System.Drawing.SystemColors.ControlDark; this.TableLayoutPanel1.Location = new System.Drawing.Point(4, 35); this.TableLayoutPanel1.Name = "TableLayoutPanel1"; this.TableLayoutPanel1.RowCount = 1; this.TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0F)); this.TableLayoutPanel1.Size = new System.Drawing.Size(313, 117); this.TableLayoutPanel1.TabIndex = 7; // //ListBox2 // this.ListBox2.FormattingEnabled = true; this.ListBox2.Items.AddRange(new Object[] {"P1", "", "P2", "", "P3"}); this.ListBox2.Location = new System.Drawing.Point(3, 3); this.ListBox2.Name = "ListBox2"; this.ListBox2.Size = new System.Drawing.Size(149, 108); this.ListBox2.TabIndex = 13; // //ListBox3 // this.ListBox3.FormattingEnabled = true; this.ListBox3.Items.AddRange(new Object[] {"T1, T2, ", "", "T5, T7", "", "T3,T6, T4"}); this.ListBox3.Location = new System.Drawing.Point(159, 3); this.ListBox3.Name = "ListBox3"; this.ListBox3.Size = new System.Drawing.Size(149, 108); this.ListBox3.TabIndex = 14; // //ProgressBar1 // this.ProgressBar1.Dock = System.Windows.Forms.DockStyle.Bottom; this.ProgressBar1.Location = new System.Drawing.Point(0, 399); this.ProgressBar1.Name = "ProgressBar1"; this.ProgressBar1.Size = new System.Drawing.Size(783, 13); this.ProgressBar1.TabIndex = 15; // //Button2 // this.Button2.Location = new System.Drawing.Point(614, 144); this.Button2.Name = "Button2"; this.Button2.Size = new System.Drawing.Size(122, 43); this.Button2.TabIndex = 14; this.Button2.Text = "Scheduling Correction"; this.Button2.UseVisualStyleBackColor = true; // //Button1 // this.Button1.Location = new System.Drawing.Point(454, 144); this.Button1.Name = "Button1"; this.Button1.Size = new System.Drawing.Size(122, 43); this.Button1.TabIndex = 13; this.Button1.Text = "Scheduling Analysis"; this.Button1.UseVisualStyleBackColor = true; // //PictureBox1 // this.PictureBox1.Image = CorrectionInterface.My.Resources.Resources.getConfiguration_Settings1(); this.PictureBox1.Location = new System.Drawing.Point(608, 4); this.PictureBox1.Name = "PictureBox1"; this.PictureBox1.Size = new System.Drawing.Size(129, 134); this.PictureBox1.TabIndex = 18; this.PictureBox1.TabStop = false; // //correction // this.AutoScaleDimensions = new System.Drawing.SizeF(6.0F, 13.0F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(783, 412); this.Controls.Add(this.PictureBox1); this.Controls.Add(this.RichTextBox1); this.Controls.Add(this.Panel1); this.Controls.Add(this.ProgressBar1); this.Controls.Add(this.Button2); this.Controls.Add(this.Button1); this.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); this.MaximizeBox = false; this.Name = "correction"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "SAC-tool"; this.Panel1.ResumeLayout(false); this.Panel1.PerformLayout(); this.TableLayoutPanel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)this.PictureBox1).EndInit(); this.ResumeLayout(false); } public RichTextBox RichTextBox1; public Panel Panel1; public Label Label3; public Label Label2; public Label Label1; public TableLayoutPanel TableLayoutPanel1; public ListBox ListBox3; public ListBox ListBox2; public ProgressBar ProgressBar1; public Button Button2; public Button Button1; public PictureBox PictureBox1; public TextBox TextBox4; public TextBox TextBox3; public TextBox TextBox2; //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click private void Button2_Click(Object sender, EventArgs e) { JOptionPane.showMessageDialog("Correction Finished Succesfully, The System is Schedulable", "Schedulability Correction Result"); JOptionPane.showMessageDialog("Correction Failure, The System Remain Unschedulable, Need Configuration Regeneration", "Schedulability Correction Result"); this.Hide(); acceuil.DefaultInstance().Show(); acceuil.DefaultInstance().taskTemporel.Hide(); acceuil.DefaultInstance().rtsPanel.Show(); } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click private void Button1_Click(Object sender, EventArgs e) { JOptionPane.showMessageDialog("Scheduling Analysis Finished Correctly, The System is Schedulable", "Schedulability Result"); JOptionPane.showMessageDialog("Scheduling Analysis Finished Uncorrectly, The System is Not Schedulable and Needs Correction", "Schedulability Result"); Button2.Enabled = true; } private void ListBox4_SelectedIndexChanged(Object sender, EventArgs e) { } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub ListBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox2.SelectedIndexChanged private void ListBox2_SelectedIndexChanged(Object sender, EventArgs e) { } private void PictureBox1_Click(Object sender, EventArgs e) { } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub TableLayoutPanel1_Paint(sender As Object, e As PaintEventArgs) Handles TableLayoutPanel1.Paint private void TableLayoutPanel1_Paint(Object sender, PaintEventArgs e) { } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged private void TextBox3_TextChanged(Object sender, EventArgs e) { } private static correction _DefaultInstance; public static correction DefaultInstance() { if (_DefaultInstance == null) _DefaultInstance = new correction(); return _DefaultInstance; } }
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286 package CorrectionInterface; import javax.swing.*; //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>Partial Class proc public class proc extends System.Windows.Forms.Form { //Form overrides dispose to clean up the component list. //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <System.Diagnostics.DebuggerNonUserCode()> Protected Overrides Sub Dispose(ByVal disposing As Boolean) @Override protected void Dispose(boolean disposing) { try { if (disposing && components != null) { components.Dispose(); } } finally { super.Dispose(disposing); } } //Required by the Windows Form Designer private System.ComponentModel.IContainer components; //NOTE: The following procedure is required by the Windows Form Designer //It can be modified using the Windows Form Designer. //Do not modify it using the code editor. //VB TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //ORIGINAL LINE: <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(proc.class); this.Button1 = new System.Windows.Forms.Button(); this.Button2 = new System.Windows.Forms.Button(); this.ProgressBar1 = new System.Windows.Forms.ProgressBar(); this.TableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.ListBox2 = new System.Windows.Forms.ListBox(); this.ListBox3 = new System.Windows.Forms.ListBox(); this.Label1 = new System.Windows.Forms.Label(); this.Label2 = new System.Windows.Forms.Label(); this.Label3 = new System.Windows.Forms.Label(); this.Panel1 = new System.Windows.Forms.Panel(); this.TextBox4 = new System.Windows.Forms.TextBox(); this.TextBox3 = new System.Windows.Forms.TextBox(); this.TextBox2 = new System.Windows.Forms.TextBox(); this.RichTextBox1 = new System.Windows.Forms.RichTextBox(); this.PictureBox1 = new System.Windows.Forms.PictureBox(); this.TableLayoutPanel1.SuspendLayout(); this.Panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)this.PictureBox1).BeginInit(); this.SuspendLayout(); // //Button1 // this.Button1.Location = new System.Drawing.Point(472, 151); this.Button1.Name = "Button1"; this.Button1.Size = new System.Drawing.Size(134, 49); this.Button1.TabIndex = 3; this.Button1.Text = "Scheduling Analysis"; this.Button1.UseVisualStyleBackColor = true; // //Button2 // this.Button2.Enabled = false; this.Button2.Location = new System.Drawing.Point(640, 151); this.Button2.Name = "Button2"; this.Button2.Size = new System.Drawing.Size(122, 49); this.Button2.TabIndex = 4; this.Button2.Text = "Scheduling Correction"; this.Button2.UseVisualStyleBackColor = true; // //ProgressBar1 // this.ProgressBar1.Dock = System.Windows.Forms.DockStyle.Bottom; this.ProgressBar1.Location = new System.Drawing.Point(0, 399); this.ProgressBar1.Name = "ProgressBar1"; this.ProgressBar1.Size = new System.Drawing.Size(783, 13); this.ProgressBar1.TabIndex = 6; // //TableLayoutPanel1 // this.TableLayoutPanel1.BackColor = System.Drawing.SystemColors.Control; this.TableLayoutPanel1.ColumnCount = 2; this.TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 49.99999F)); this.TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0F)); this.TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0F)); this.TableLayoutPanel1.Controls.Add(this.ListBox2, 0, 0); this.TableLayoutPanel1.Controls.Add(this.ListBox3, 1, 0); this.TableLayoutPanel1.ForeColor = System.Drawing.SystemColors.ControlDark; this.TableLayoutPanel1.Location = new System.Drawing.Point(4, 35); this.TableLayoutPanel1.Name = "TableLayoutPanel1"; this.TableLayoutPanel1.RowCount = 1; this.TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0F)); this.TableLayoutPanel1.Size = new System.Drawing.Size(321, 117); this.TableLayoutPanel1.TabIndex = 7; // //ListBox2 // this.ListBox2.FormattingEnabled = true; this.ListBox2.Items.AddRange(new Object[] {"P1", "", "P2", "", "P3"}); this.ListBox2.Location = new System.Drawing.Point(3, 3); this.ListBox2.Name = "ListBox2"; this.ListBox2.Size = new System.Drawing.Size(149, 108); this.ListBox2.TabIndex = 13; // //ListBox3 // this.ListBox3.FormattingEnabled = true; this.ListBox3.Items.AddRange(new Object[] {"T1, T2, T4, T6", "", "T5, T7", "", "T3"}); this.ListBox3.Location = new System.Drawing.Point(163, 3); this.ListBox3.Name = "ListBox3"; this.ListBox3.Size = new System.Drawing.Size(149, 108); this.ListBox3.TabIndex = 14; // //Label1 // this.Label1.AutoSize = true; this.Label1.Location = new System.Drawing.Point(7, 16); this.Label1.Name = "Label1"; this.Label1.Size = new System.Drawing.Size(66, 13); this.Label1.TabIndex = 8; this.Label1.Text = "&Proccessor :"; // //Label2 // this.Label2.AutoSize = true; this.Label2.Location = new System.Drawing.Point(159, 16); this.Label2.Name = "Label2"; this.Label2.Size = new System.Drawing.Size(88, 13); this.Label2.TabIndex = 9; this.Label2.Text = "&Assigned Tasks :"; // //Label3 // this.Label3.AutoSize = true; this.Label3.Location = new System.Drawing.Point(324, 16); this.Label3.Name = "Label3"; this.Label3.Size = new System.Drawing.Size(90, 13); this.Label3.TabIndex = 10; this.Label3.Text = "&Proccessor Load:"; // //Panel1 // this.Panel1.Controls.Add(this.TextBox4); this.Panel1.Controls.Add(this.TextBox3); this.Panel1.Controls.Add(this.TextBox2); this.Panel1.Controls.Add(this.Label3); this.Panel1.Controls.Add(this.Label2); this.Panel1.Controls.Add(this.Label1); this.Panel1.Controls.Add(this.TableLayoutPanel1); this.Panel1.Location = new System.Drawing.Point(9, 27); this.Panel1.Name = "Panel1"; this.Panel1.Size = new System.Drawing.Size(439, 173); this.Panel1.TabIndex = 11; // //TextBox4 // //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.TextBox4.ForeColor = System.Drawing.Color.FromArgb(CInt(CByte(0)), CInt(CByte(192)), CInt(CByte(0))) this.TextBox4.ForeColor = System.Drawing.Color.FromArgb((int)((byte)0), (int)((byte)192), (int)((byte)0)); this.TextBox4.Location = new System.Drawing.Point(331, 87); this.TextBox4.Name = "TextBox4"; this.TextBox4.Size = new System.Drawing.Size(100, 20); this.TextBox4.TabIndex = 16; this.TextBox4.Text = "0,4"; // //TextBox3 // this.TextBox3.ForeColor = System.Drawing.Color.Red; this.TextBox3.Location = new System.Drawing.Point(331, 35); this.TextBox3.Name = "TextBox3"; this.TextBox3.Size = new System.Drawing.Size(100, 20); this.TextBox3.TabIndex = 15; this.TextBox3.Text = "1,4"; // //TextBox2 // //VB TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java: //ORIGINAL LINE: Me.TextBox2.ForeColor = System.Drawing.Color.FromArgb(CInt(CByte(0)), CInt(CByte(192)), CInt(CByte(0))) this.TextBox2.ForeColor = System.Drawing.Color.FromArgb((int)((byte)0), (int)((byte)192), (int)((byte)0)); this.TextBox2.Location = new System.Drawing.Point(331, 61); this.TextBox2.Name = "TextBox2"; this.TextBox2.Size = new System.Drawing.Size(100, 20); this.TextBox2.TabIndex = 14; this.TextBox2.Text = "0,75"; // //RichTextBox1 // this.RichTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.RichTextBox1.Location = new System.Drawing.Point(9, 224); this.RichTextBox1.Name = "RichTextBox1"; this.RichTextBox1.Size = new System.Drawing.Size(755, 169); this.RichTextBox1.TabIndex = 12; this.RichTextBox1.Text = "sheduling analysis is on process " + "\n" + "source : P1" + "\n" + "target : P3, P2"; // //PictureBox1 // this.PictureBox1.Image = CorrectionInterface.My.Resources.Resources.getdemo1(); this.PictureBox1.Location = new System.Drawing.Point(472, 27); this.PictureBox1.Name = "PictureBox1"; this.PictureBox1.Size = new System.Drawing.Size(134, 118); this.PictureBox1.TabIndex = 13; this.PictureBox1.TabStop = false; // //proc // this.AutoScaleDimensions = new System.Drawing.SizeF(6.0F, 13.0F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(783, 412); this.Controls.Add(this.PictureBox1); this.Controls.Add(this.RichTextBox1); this.Controls.Add(this.Panel1); this.Controls.Add(this.ProgressBar1); this.Controls.Add(this.Button2); this.Controls.Add(this.Button1); this.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); this.MaximizeBox = false; this.Name = "proc"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "SAC-tool"; this.TableLayoutPanel1.ResumeLayout(false); this.Panel1.ResumeLayout(false); this.Panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)this.PictureBox1).EndInit(); this.ResumeLayout(false); } public Button Button1; public Button Button2; public ProgressBar ProgressBar1; public TableLayoutPanel TableLayoutPanel1; public Label Label1; public Label Label2; public Label Label3; public Panel Panel1; public ListBox ListBox3; public ListBox ListBox2; public RichTextBox RichTextBox1; public PictureBox PictureBox1; public TextBox TextBox4; public TextBox TextBox3; public TextBox TextBox2; //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click private void Button1_Click(Object sender, EventArgs e) { JOptionPane.showMessageDialog("Scheduling Analysis Finished Correctly, The System is Schedulable", "Schedulability Result"); JOptionPane.showMessageDialog("Scheduling Analysis Finished Uncorrectly, The System is Not Schedulable and Needs Correction", "Schedulability Result"); Button2.Enabled = true; } //VB TO JAVA CONVERTER TODO TASK: Java has no direct equivalent to the VB 'Handles' clause: //ORIGINAL LINE: Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click private void Button2_Click(Object sender, EventArgs e) { this.Hide(); correction.DefaultInstance().Show(); } private void PictureBox1_Click(Object sender, EventArgs e) { } private static proc _DefaultInstance; public static proc DefaultInstance() { if (_DefaultInstance == null) _DefaultInstance = new proc(); return _DefaultInstance; } }
Partager