protected override Element CreateChildForParameter(Parameter parameter) { switch (parameter.Id) { case 1: Text = new BatteryNumberElement(parameter, this); return(Text); case 2: Icon = new BatteryImageSetElement(parameter, this); return(Icon); case 3: Linear = new BatteryLinearProgressElement(parameter, this); return(Linear); case 6: BettaryPersent = new BettaryPersentElement(parameter, this); return(BettaryPersent); case 7: Circular = new BatteryCircularProgressElement(parameter, this); return(Circular); default: return(base.CreateChildForParameter(parameter)); } }
protected override Element CreateChildForParameter(Parameter parameter) { if (StatusElement.IsBip) { switch (parameter.Id) { case 1: Text = new BatteryNumberElement(parameter, this); return(Text); case 2: Icon = new BatteryImageSetElement(parameter, this); return(Icon); case 3: Scale = new BatteryLenearProgressElement(parameter, this); return(Scale); } } else { switch (parameter.Id) { case 1: Text = new BatteryNumberElement(parameter, this); return(Text); case 2: case 3: Icon = new BatteryImageSetElement(parameter, this); return(Icon); case 6: Persent = new ImageElement(parameter, this); return(Persent); case 7: Scale = new CircularBatteryProgressElement(parameter, this); return(Scale); } } return(base.CreateChildForParameter(parameter)); }
protected override Element CreateChildForParameter(Parameter parameter) { switch (parameter.Id) { case 1: Text = new BatteryNumberElement(parameter, this); return(Text); case 2: Icon = new BatteryImageSetElement(parameter, this); return(Icon); case 3: Scale = new BatteryLenearProgressElement(parameter, this); return(Scale); default: return(base.CreateChildForParameter(parameter)); } }