public void ProgressBarControl_Type(string platformName, Type progressBarType)
        {
            var platform    = GetPlatform(platformName);
            var application = DefaultProgressBarViewItemModule(platform).Application;
            var objectView  = application.NewObjectView <DetailView>(typeof(PBVI));

            if (platform == Platform.Win)
            {
                var unused = new ProgressBarControl();
            }
            else if (platform == Platform.Web)
            {
                var unused = new ASPxProgressBar();
            }

            var progressBarViewItem = new Mock <ProgressBarViewItemBase>(Mock.Of <IModelProgressBarViewItem>(), GetType())
            {
                CallBase = true
            }.Object;

            progressBarViewItem.Setup(null, application);
            progressBarViewItem.View = objectView;
            progressBarViewItem.CreateControl();

            progressBarViewItem.Control.ShouldBeOfType(progressBarType);
        }
Ejemplo n.º 2
0
        protected override object CreateControlCore()
        {
            ProgressBar = new ASPxProgressBar {
                ClientInstanceName = $"{StringExtensions.CleanCodeName(Id)}", Width = Unit.Percentage(100)
            };

            View.ControlsCreated += ViewOnControlsCreated;
            return(ProgressBar);
        }
    protected void ASPxProgressBar1_Load(object sender, EventArgs e)
    {
        ASPxProgressBar progressBar = (ASPxProgressBar)sender;
        GridViewDataItemTemplateContainer container = (GridViewDataItemTemplateContainer)progressBar.Parent;

        if (ASPxGridView1.Selection.IsRowSelectedByKey(container.KeyValue))
        {
            progressBar.IndicatorStyle.BackColor = System.Drawing.Color.Red;
        }
    }
Ejemplo n.º 4
0
        public void InstantiateIn(Control container)
        {
            GridViewDataItemTemplateContainer gridContainer = container as GridViewDataItemTemplateContainer;

            if (gridContainer != null)
            {
                GridViewDataColumn column = gridContainer.Column;
                ASPxProgressBar    bar    = new ASPxProgressBar();
                bar.BackColor = System.Drawing.Color.Azure;
                bar.Maximum   = 100;
                bar.Width     = 100;
                bar.ReadOnly  = true;
                gridContainer.Controls.Add(bar);
            }
        }
Ejemplo n.º 5
0
    protected void ASPxProgressBar1_DataBound(object sender, EventArgs e)
    {
        ASPxProgressBar progressBar = (ASPxProgressBar)sender;

        GridViewDataItemTemplateContainer templateContainer = (GridViewDataItemTemplateContainer)progressBar.NamingContainer;
        object rowKeyValue = templateContainer.KeyValue;

        if (progressBar.Value == null || rowKeyValue == null)
        {
            progressBar.Visible = false;
        }
        else
        {
            progressBar.Attributes.Add("onclick", string.Format("OnProgressBarClickEventHandler('{0}', '{1}');", progressBar.Value, rowKeyValue));
            progressBar.Style.Add("cursor", "pointer");
        }
    }
        protected override object CreateControlCore()
        {
            //ASPxLabel control = new ASPxLabel();
            //control.ClientInstanceName = "Logcontrol";
            //control.Text = HealthModelViewController.LongOperationStatus;
            //control.ClientSideEvents.Init = STR1 ;

            ASPxProgressBar control = new ASPxProgressBar();

            control.Width = new Unit(100, UnitType.Percentage);
            control.ClientInstanceName = "Logcontrol";
            control.ShowPosition       = true;
            //control.Minimum = 0;
            //control.Maximum = 100;
            control.DisplayMode = ProgressBarDisplayMode.Custom;

            control.ClientSideEvents.Init = STR4;
            return(control);
        }
Ejemplo n.º 7
0
    void ITemplate.InstantiateIn(Control container)
    {
        PivotGridCellTemplateContainer templateContainer = (PivotGridCellTemplateContainer)container;

        DevExpress.Web.ASPxPivotGrid.PivotGridField field = templateContainer.DataField;

        if (field != null && field.ID == "fieldTotalCostPercents")
        {
            ASPxProgressBar bar = new ASPxProgressBar();
            bar.CssClass = "pvProgressBar";
            bar.IndicatorStyle.CssClass = "indicator";
            bar.Position            = 100 * Convert.ToDecimal(templateContainer.Value);
            bar.DisplayFormatString = "0.#";
            // The settings are defined in the Init event to override ASPxProgressBar skin's settings specified in the MetropolisBlue theme
            bar.Init += (s, e) => { (s as ASPxProgressBar).ShowPosition = true; };
            templateContainer.Controls.Add(bar);
        }
        else
        {
            templateContainer.Controls.Add(new LiteralControl(templateContainer.Text));
        }
    }
Ejemplo n.º 8
0
 protected override object CreateControlCore()
 {
     ProgressBar = new ASPxProgressBar();
     return(ProgressBar);
 }