<commit_before>﻿using System;


namespace Acr.UserDialogs {

    public class ProgressDialog : IProgressDialog {

        #region IProgressDialog Members

        private string text;
        public string Title {
            get { return this.text; }
            set {
                if (this.text == value)
                    return;

                this.text = value;
                //this.Refresh();
            }
        }


        private int percentComplete;
        public int PercentComplete {
            get { return this.percentComplete; }
            set {
                if (this.percentComplete == value)
                    return;

                if (value > 100)
                    this.percentComplete = 100;

                else if (value < 0)
                    this.percentComplete = 0;

                else
                    this.percentComplete = value;

                //this.Refresh();
            }
        }


        public bool IsDeterministic { get; set; }


        public bool IsShowing { get; private set; }


        public void SetCancel(Action onCancel, string cancelText) {
        }


        public void Show() {
            if (this.IsShowing)
                return;

            this.IsShowing = true;
        }

<commit_msg>Winstore<commit_after>﻿using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;


namespace Acr.UserDialogs {

    public class ProgressDialog : IProgressDialog {
        private readonly ProgressBar progress = new ProgressBar();


        #region IProgressDialog Members

        private string text;
        public string Title {
            get { return this.text; }
            set {
                if (this.text == value)
                    return;

                this.text = value;
                //this.Refresh();
            }
        }


        private int percentComplete;
        public int PercentComplete {
            get { return this.percentComplete; }
            set {
                if (this.percentComplete == value)
                    return;

                if (value > 100)
                    this.percentComplete = 100;

                else if (value < 0)
                    this.percentComplete = 0;

                else
                    this.percentComplete = value;

                this.progress.Value = this.percentComplete;
            }
        }


        public bool IsDeterministic {
            get { return !this.progress.IsIndeterminate; }
            set { this.progress.IsIndeterminate = !value; }
        }


        public bool IsShowing {
            get { return (this.progress.Visibility == Visibility.Visible); }
            private set {

                this.progress.Visibility = value
                    ? Visibility.Visible
                    : Visibility.Collapsed;
            }
        }


        public void SetCancel(Action onCancel, string cancelText) {
            this.progress.IsTapEnabled = true;
            this.progress.Tapped += (sender, args) => onCancel();
        }


        public void Show() {
            if (this.IsShowing)
                return;

            this.IsShowing = true;
        }


{'fraction_non_alphanumeric': 0.07641509433962264, 'fraction_numerical': 0.005031446540880503, 'mean_word_length': 1.216724738675958, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4435128', 'n_tokens_mistral': 824, 'n_tokens_neox': 727, 'n_words': 192}