From 09c6f0c6979876ed00519f8a9b895bbc60173a2c Mon Sep 17 00:00:00 2001 From: saiganesh-sakthivel Date: Wed, 7 Dec 2022 19:27:23 +0530 Subject: [PATCH 1/2] update the readme --- README.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7311559..ca03d9c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,72 @@ -# command-binding-schedule-xamarin -How to bind Schedule commands in Xamarin.Forms (SfSchedule) +# How to bind Schedule commands in Xamarin.Forms (SfSchedule) + +You can bind the ViewModel commands to [CellDoubleTappedCommand](https://help.syncfusion.com/cr/xamarin/Syncfusion.SfSchedule.XForms.SfSchedule.html#Syncfusion_SfSchedule_XForms_SfSchedule_CellDoubleTappedCommand) and [VisibleDatesChangedCommand](https://help.syncfusion.com/cr/xamarin/Syncfusion.SfSchedule.XForms.SfSchedule.html#Syncfusion_SfSchedule_XForms_SfSchedule_VisibleDatesChangedCommand) of [SfSchedule](https://www.syncfusion.com/xamarin-ui-controls/xamarin-scheduler) in Xamarin.Forms. + +`STEP 1:` Create a ViewModel class and define a `VisibleDatesChangedCommand` and `CellDoubleTappedCommand`. +``` +public class SchedulerViewModel : INotifyPropertyChanged +{ +  +        public SchedulerViewModel() +        { +            this.VisibleDatesChangedCommand = new Command(OnVisibleDatesChanged); +            this.CellDoubleTappedCommand = new Command(OnCellDoubleTapped); +        } +  +        /// +        /// Cell Double Tapped event +        /// +        /// +        private void OnCellDoubleTapped(CellTappedEventArgs obj) +        { +            App.Current.MainPage.DisplayAlert("CellDoubleTapped", "Event Triggered", "ok"); +        } +  +        /// +        /// Visible Dates changed Event +        /// +        /// +        private void OnVisibleDatesChanged(VisibleDatesChangedEventArgs obj) +        { +            App.Current.MainPage.DisplayAlert("VisibleDateChanged", "Event Triggered", "ok"); +  +        } +  +        /// +        /// Visible Dates changed Command. +        /// +        public ICommand VisibleDatesChangedCommand { get; set; } +  +        /// +        /// CellDoubleTapped command. +        /// +        public ICommand CellDoubleTappedCommand { get; set; } +  +        /// +        /// Occurs when property changed. +        /// +        public event PropertyChangedEventHandler PropertyChanged; +  +        /// +        /// Invoke method when property changed. +        /// +        /// property name +        private void RaiseOnPropertyChanged(string propertyName) +        { +            this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); +        } +} +``` +`STEP 2:` Bind the VisibleDatesChangedCommand and CellDoubleTappedCommand of ViewModel to the CellDoubleTappedCommand and VisibleDatesChangedCommand in SfSchedule. +``` + +            +                +            + +``` + +KB article - [How to bind Schedule commands in Xamarin.Forms (SfSchedule)](https://www.syncfusion.com/kb/11817/how-to-bind-schedule-commands-in-xamarin-forms-sfschedule) \ No newline at end of file From 3e09a2d99ddfc2a3babfb947bc668270aa1c6fb2 Mon Sep 17 00:00:00 2001 From: SyncfusionBuild <89958145+SyncfusionBuild@users.noreply.github.com> Date: Tue, 24 Jan 2023 16:21:31 +0530 Subject: [PATCH 2/2] Gitleaks action file added --- .github/workflows/gitleaks.yaml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/gitleaks.yaml diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml new file mode 100644 index 0000000..48a24dd --- /dev/null +++ b/.github/workflows/gitleaks.yaml @@ -0,0 +1,38 @@ +name: Secret Value found! +on: + push: + public: +jobs: + scan: + name: gitleaks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install the gitleaks + run: wget https://github.com/zricethezav/gitleaks/releases/download/v8.15.2/gitleaks_8.15.2_linux_x64.tar.gz + shell: pwsh + - name: Extract the tar file + run: tar xzvf gitleaks_8.15.2_linux_x64.tar.gz + - name: Generate the report + id: gitleaks + run: $GITHUB_WORKSPACE/gitleaks detect -s $GITHUB_WORKSPACE -f json -r $GITHUB_WORKSPACE/leaksreport.json + shell: bash + continue-on-error: true + - name: Setup NuGet.exe + if: steps.gitleaks.outcome != 'success' + uses: nuget/setup-nuget@v1 + with: + nuget-version: latest + - name: Install the dotnet + if: steps.gitleaks.outcome != 'success' + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '3.1.x' + - name: Install the report tool packages + if: steps.gitleaks.outcome != 'success' + run: | + nuget install "Syncfusion.Email" -source "https://nexus.syncfusion.com/repository/nuget-hosted/" + dir $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1 + dotnet $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1/Email.dll "citeam@syncfusion.com" "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" + exit 1