Skip to content

Commit a78f118

Browse files
author
Manivannan
committed
Added output image.
1 parent 269a0c6 commit a78f118

File tree

4 files changed

+99
-27
lines changed

4 files changed

+99
-27
lines changed

.github/gitleaks.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Secret Value found!!
2+
on:
3+
push:
4+
public:
5+
jobs:
6+
scan:
7+
name: gitleaks
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4.2.2
12+
- name: Install the gitleaks
13+
run: wget https://github.com/zricethezav/gitleaks/releases/download/v8.15.2/gitleaks_8.15.2_linux_x64.tar.gz
14+
shell: pwsh
15+
- name: Extract the tar file
16+
run: tar xzvf gitleaks_8.15.2_linux_x64.tar.gz
17+
- name: Generate the report
18+
id: gitleaks
19+
run: $GITHUB_WORKSPACE/gitleaks detect -s $GITHUB_WORKSPACE -f json -r $GITHUB_WORKSPACE/leaksreport.json
20+
shell: bash
21+
continue-on-error: true
22+
- name: Setup NuGet.exe
23+
if: steps.gitleaks.outcome != 'success'
24+
uses: nuget/setup-nuget@v2
25+
with:
26+
nuget-version: latest
27+
- name: Install Mono
28+
if: steps.gitleaks.outcome != 'success'
29+
run: |
30+
sudo apt update
31+
sudo apt install -y mono-complete
32+
- name: Install the dotnet SDK to a custom directory
33+
if: steps.gitleaks.outcome != 'success'
34+
run: |
35+
mkdir -p $GITHUB_WORKSPACE/dotnet
36+
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir $GITHUB_WORKSPACE/dotnet --channel 6.0
37+
- name: Install the report tool packages
38+
if: steps.gitleaks.outcome != 'success'
39+
run: |
40+
export PATH=$GITHUB_WORKSPACE/dotnet:$PATH
41+
nuget install "Syncfusion.Email" -source ${{ secrets.NexusFeedLink }} -ExcludeVersion
42+
dir $GITHUB_WORKSPACE/Syncfusion.Email/lib/net6.0
43+
dotnet $GITHUB_WORKSPACE/Syncfusion.Email/lib/net6.0/GitleaksReportMail.dll ${{ secrets.CITEAMCREDENTIALS }} "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" ${{ secrets.ORGANIZATIONNAME }}
44+
exit 1
-77.1 KB
Binary file not shown.

README.md

Lines changed: 55 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,57 @@
1-
# How-to-create-a-DatePicker-in-Winforms-using-ButtonEdit-and-MonthCalendarAdv
2-
Create a DatePicker using ButtonEdit and MonthCalendarAdv
3-
4-
# C#
5-
MonthCalendarAdv monthCalendarAdv = new MonthCalendarAdv();
6-
public Form1()
7-
{
8-
InitializeComponent();
9-
10-
childButton.Click += ChildButton_Click;
11-
12-
calendarPopup.Controls.Add(monthCalendarAdv);
13-
buttonEdit1.Buttons.Add(childButton);
14-
tableLayoutPanel1.Controls.Add(calendarPopup, 0, 1);
15-
monthCalendarAdv.DateSelected += MonthCalendarAdv_DateSelected;
16-
}
17-
18-
private void MonthCalendarAdv_DateSelected(object sender, EventArgs e)
19-
{
20-
buttonEdit1.TextBox.Text = monthCalendarAdv.Value.ToString();
21-
calendarPopup.Visible = false;
22-
}
23-
24-
private void ChildButton_Click(object sender, EventArgs e)
25-
{
26-
calendarPopup.Visible = true;
27-
}
1+
# How to Create a DatePicker in WinForms Using ButtonEdit and MonthCalendarAdv
2+
This example demonstrates how to create a DatePicker in a WinForms application using Syncfusion’s ButtonEdit and MonthCalendarAdv controls. Combining these controls provides a user-friendly date selection interface that integrates seamlessly into Windows Forms applications.
3+
4+
## Why This Is Useful
5+
- Customizable UI: Offers flexibility compared to standard DatePicker controls.
6+
- Rich Calendar Features: MonthCalendarAdv supports advanced customization.
7+
- Better UX: Provides an intuitive way for users to select dates.
8+
9+
## How It Works
10+
- The ButtonEdit control acts as a container with a clickable button.
11+
- When the button is clicked, a popup containing the MonthCalendarAdv control is displayed.
12+
- The selected date from the calendar updates the ButtonEdit text box.
13+
14+
## Key Implementation Steps
15+
- Initialize the MonthCalendarAdv control.
16+
- Add the calendar to a popup container.
17+
- Attach the popup to the ButtonEdit control.
18+
- Handle the DateSelected event to update the text box with the selected date.
19+
- Toggle the visibility of the calendar popup when the button is clicked.
20+
21+
## Sample Code
22+
```C#
23+
MonthCalendarAdv monthCalendarAdv = new MonthCalendarAdv();
24+
25+
public Form1()
26+
{
27+
InitializeComponent();
28+
29+
// Attach event handler for button click
30+
childButton.Click += ChildButton_Click;
31+
32+
// Add calendar to popup and configure layout
33+
calendarPopup.Controls.Add(monthCalendarAdv);
34+
buttonEdit1.Buttons.Add(childButton);
35+
tableLayoutPanel1.Controls.Add(calendarPopup, 0, 1);
36+
37+
// Handle date selection
38+
monthCalendarAdv.DateSelected += MonthCalendarAdv_DateSelected;
39+
}
40+
41+
private void MonthCalendarAdv_DateSelected(object sender, EventArgs e)
42+
{
43+
// Update ButtonEdit text with selected date
44+
buttonEdit1.TextBox.Text = monthCalendarAdv.Value.ToString();
45+
calendarPopup.Visible = false;
46+
}
47+
48+
private void ChildButton_Click(object sender, EventArgs e)
49+
{
50+
// Show calendar popup
51+
calendarPopup.Visible = true;
52+
}
53+
```
54+
55+
## Output
2856

2957
![DatePicker](ChildButtonClick_ButtonEdit/Images/DatePicker.png).

0 commit comments

Comments
 (0)