示例#1
0
 public BrowserProgressBar(int currentValue, int progressStep, int millisecondsProgressInterval, bool startTimerInstant = true)
     : base(BrowserElementType.ProgressBar, "")
 {
     this.Width        = "300px";
     this.Height       = "25px";
     this.MinValue     = 0;
     this.MaxValue     = 100;
     this.CurrentValue = currentValue;
     this.MilleSecondsProgressInterval = millisecondsProgressInterval;
     this.SetPredefinedProgressBarStyle(BrowserProgressBarStyle.Blue_Striped);
     this.ProgressStep        = progressStep;
     this.StartTimerInstant   = startTimerInstant;
     this.ItemInlineAlignment = BrowserContentAlign.Start;
 }
示例#2
0
        public Browser(string title, BrowserType type, BrowserContentAlign position, string width, string height)
        {
            this.Id                = Guid.NewGuid();
            this.Type              = type;
            this.ContentPosition   = position;
            this.Texts             = new List <BrowserText>();
            this.TextBoxes         = new List <BrowserTextBox>();
            this.PasswordTextBoxes = new List <BrowserPasswordTextBox>();
            this.Titles            = new List <BrowserTitle>();
            this.Buttons           = new List <BrowserButton>();
            this.Cards             = new List <BrowserCard>();
            this.CheckBoxes        = new List <BrowserCheckBox>();
            this.DropDowns         = new List <BrowserDropDown>();
            this.ProgressBars      = new List <BrowserProgressBar>();
            this.Container         = new List <BrowserContainer>();
            this.Icons             = new List <BrowserButtonIcon>();

            this.ScrollBarX = false;
            this.ScrollBarY = false;
            this.Width      = width;
            this.Height     = height;

            switch (type)
            {
            case BrowserType.Custom:
                this.Path = $"package://DavWebCreator/Template.html";
                break;
            //case BrowserType.YesNoDialog:
            //    this.Path = $"package://DavWebCreator/Template.html";
            //    //this.Path = $"package://DavWebCreator/Blank_Template.html";

            //    break;
            case BrowserType.Selection:
                this.Path = $"package://DavWebCreator/Selection_Template.html";
                break;
            }
        }
示例#3
0
        public string GetContentAlignment(BrowserContentAlign align)
        {
            string contentAlign = "";

            switch (align)
            {
            case BrowserContentAlign.Start:
                contentAlign = "d-flex justify-content-start";
                break;

            case BrowserContentAlign.Center:
                contentAlign = "d-flex justify-content-center";
                break;

            case BrowserContentAlign.End:
                contentAlign = "d-flex justify-content-end";
                break;

            case BrowserContentAlign.Around:
                contentAlign = "d-flex justify-content-around";
                break;

            case BrowserContentAlign.Between:
                contentAlign = "d-flex justify-content-between";
                break;

            case BrowserContentAlign.Start_large:
                contentAlign = "d-flex justify-content-lg-start";
                break;

            case BrowserContentAlign.End_large:
                contentAlign = "d-flex justify-content-lg-end";
                break;

            case BrowserContentAlign.Center_large:
                contentAlign = "d-flex justify-content-lg-center";
                break;

            case BrowserContentAlign.Around_large:
                contentAlign = "d-flex justify-content-lg-around";
                break;

            case BrowserContentAlign.Between_large:
                contentAlign = "d-flex justify-content-lg-between";
                break;

            case BrowserContentAlign.Start_xl:
                contentAlign = "d-flex justify-content-xl-start";
                break;

            case BrowserContentAlign.End_xl:
                contentAlign = "d-flex justify-content-xl-end";
                break;

            case BrowserContentAlign.Center_xl:
                contentAlign = "d-flex justify-content-xl-center";
                break;

            case BrowserContentAlign.Around_xl:
                contentAlign = "d-flex justify-content-xl-around";
                break;

            case BrowserContentAlign.Between_xl:
                contentAlign = "d-flex justify-content-xl-between";
                break;

            case BrowserContentAlign.Start_medium:
                contentAlign = "d-flex justify-content-md-start";
                break;

            case BrowserContentAlign.End_medium:
                contentAlign = "d-flex justify-content-md-end";
                break;

            case BrowserContentAlign.Center_medium:
                contentAlign = "d-flex justify-content-md-center";
                break;

            case BrowserContentAlign.Around_medium:
                contentAlign = "d-flex justify-content-md-around";
                break;

            case BrowserContentAlign.Between_medium:
                contentAlign = "d-flex justify-content-md-between";
                break;

            case BrowserContentAlign.Start_small:
                contentAlign = "d-flex justify-content-sm-start";
                break;

            case BrowserContentAlign.End_small:
                contentAlign = "d-flex justify-content-sm-end";
                break;

            case BrowserContentAlign.Center_small:
                contentAlign = "d-flex justify-content-sm-center";
                break;

            case BrowserContentAlign.Around_small:
                contentAlign = "d-flex justify-content-sm-around";
                break;

            case BrowserContentAlign.Between_small:
                contentAlign = "d-flex justify-content-sm-between";
                break;
            }

            return(contentAlign);
        }