FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Examples/Example1/Example7/RandomNumbersForm.cs at master · TheGer/Examples · GitHub
TheGer
/
Examples
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
2
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Examples
/
Example1
/
Example7
/
RandomNumbersForm.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
79 lines (58 loc) · 1.73 KB
Breadcrumbs
Examples
/
Example1
/
Example7
/
RandomNumbersForm.cs
Copy path
File metadata and controls
79 lines (58 loc) · 1.73 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
using
System
;
using
System
.
Collections
.
Generic
;
using
System
.
ComponentModel
;
using
System
.
Data
;
using
System
.
Drawing
;
using
System
.
Linq
;
using
System
.
Text
;
using
System
.
Threading
.
Tasks
;
using
System
.
Windows
.
Forms
;
namespace
Example7
{
public
partial
class
RandomNumbersForm
:
Form
{
List
<
int
>
numbList
;
public
RandomNumbersForm
(
)
{
InitializeComponent
(
)
;
}
public
RandomNumbersForm
(
List
<
int
>
numList
)
{
InitializeComponent
(
)
;
numbList
=
numList
;
}
private
void
updateDataGrid
(
)
{
dataGridView1
.
Rows
.
Clear
(
)
;
dataGridView1
.
Columns
.
Clear
(
)
;
DataGridViewCell
cellStyle
=
new
DataGridViewTextBoxCell
(
)
;
cellStyle
.
Style
.
BackColor
=
Color
.
Wheat
;
dataGridView1
.
Columns
.
Add
(
new
DataGridViewColumn
(
cellStyle
)
)
;
foreach
(
int
i
in
numbList
)
dataGridView1
.
Rows
.
Add
(
i
.
ToString
(
)
)
;
}
private
void
generateButton_Click
(
object
sender
,
EventArgs
e
)
{
Program
.
updateRandomNumbers
(
numbList
)
;
updateDataGrid
(
)
;
}
private
void
sortButton_Click
(
object
sender
,
EventArgs
e
)
{
numbList
.
Sort
(
)
;
updateDataGrid
(
)
;
}
private
void
reverseButton_Click
(
object
sender
,
EventArgs
e
)
{
numbList
.
Reverse
(
)
;
updateDataGrid
(
)
;
}
private
void
distinctButton_Click
(
object
sender
,
EventArgs
e
)
{
numbList
=
numbList
.
Distinct
(
)
.
ToList
<
int
>
(
)
;
updateDataGrid
(
)
;
}
private
void
RandomNumbersForm_Load
(
object
sender
,
EventArgs
e
)
{
}
}
}
Back
|
FazBrowse Home
|
New Git URL