package b4a.example3;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class circularprogressbar extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "b4a.example3.circularprogressbar");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", b4a.example3.circularprogressbar.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public String _meventname = "";
public Object _mcallback = null;
public anywheresoftware.b4a.objects.B4XCanvas _cvs = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _mlbl = null;
public float _cx = 0f;
public float _cy = 0f;
public float _radius = 0f;
public float _stroke = 0f;
public int _clrfull = 0;
public int _clrempty = 0;
public anywheresoftware.b4a.objects.B4XViewWrapper _mbase = null;
public float _currentvalue = 0f;
public int _durationfromzeroto100 = 0;
public b4a.example.managerevent _manager = null;
public int _minv = 0;
public int _maxv = 0;
public float _current_pos = 0f;
public float _pas = 0f;
public float _offset = 0f;
public float _max_val = 0f;
public float _touchscale = 0f;
public float _sweepscale = 0f;
public b4a.example3.main _main = null;
public b4a.example3.starter _starter = null;
public float  _getvalue(b4a.example3.circularprogressbar __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "getvalue", false))
	 {return ((Float) Debug.delegate(ba, "getvalue", null));}
RDebugUtils.currentLine=1179648;
 //BA.debugLineNum = 1179648;BA.debugLine="Public Sub getValue As Float";
RDebugUtils.currentLine=1179649;
 //BA.debugLineNum = 1179649;BA.debugLine="Return current_pos+Offset";
if (true) return (float) (__ref._current_pos /*float*/ +__ref._offset /*float*/ );
RDebugUtils.currentLine=1179650;
 //BA.debugLineNum = 1179650;BA.debugLine="End Sub";
return 0f;
}
public String  _setvalue(b4a.example3.circularprogressbar __ref,float _newvalue) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "setvalue", false))
	 {return ((String) Debug.delegate(ba, "setvalue", new Object[] {_newvalue}));}
RDebugUtils.currentLine=1114112;
 //BA.debugLineNum = 1114112;BA.debugLine="Public Sub setValue(NewValue As Float)";
RDebugUtils.currentLine=1114113;
 //BA.debugLineNum = 1114113;BA.debugLine="DrawValue(NewValue)";
__ref._drawvalue /*String*/ (null,_newvalue);
RDebugUtils.currentLine=1114114;
 //BA.debugLineNum = 1114114;BA.debugLine="End Sub";
return "";
}
public void  _animatevalueto(b4a.example3.circularprogressbar __ref,float _newvalue) throws Exception{
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "animatevalueto", false))
	 {Debug.delegate(ba, "animatevalueto", new Object[] {_newvalue}); return;}
ResumableSub_AnimateValueTo rsub = new ResumableSub_AnimateValueTo(this,__ref,_newvalue);
rsub.resume(ba, null);
}
public static class ResumableSub_AnimateValueTo extends BA.ResumableSub {
public ResumableSub_AnimateValueTo(b4a.example3.circularprogressbar parent,b4a.example3.circularprogressbar __ref,float _newvalue) {
this.parent = parent;
this.__ref = __ref;
this._newvalue = _newvalue;
this.__ref = parent;
}
b4a.example3.circularprogressbar __ref;
b4a.example3.circularprogressbar parent;
float _newvalue;
long _n = 0L;
int _duration = 0;
float _start = 0f;
float _tempvalue = 0f;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="circularprogressbar";

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=1769473;
 //BA.debugLineNum = 1769473;BA.debugLine="Dim n As Long = DateTime.Now";
_n = parent.__c.DateTime.getNow();
RDebugUtils.currentLine=1769474;
 //BA.debugLineNum = 1769474;BA.debugLine="Dim duration As Int = Abs(currentValue - NewValue";
_duration = (int) (parent.__c.Abs(__ref._currentvalue /*float*/ -_newvalue)/(double)100*__ref._durationfromzeroto100 /*int*/ +1000);
RDebugUtils.currentLine=1769475;
 //BA.debugLineNum = 1769475;BA.debugLine="Dim start As Float = currentValue";
_start = __ref._currentvalue /*float*/ ;
RDebugUtils.currentLine=1769476;
 //BA.debugLineNum = 1769476;BA.debugLine="currentValue = NewValue";
__ref._currentvalue /*float*/  = _newvalue;
RDebugUtils.currentLine=1769477;
 //BA.debugLineNum = 1769477;BA.debugLine="Dim tempValue As Float";
_tempvalue = 0f;
RDebugUtils.currentLine=1769478;
 //BA.debugLineNum = 1769478;BA.debugLine="Do While DateTime.Now < n + duration";
if (true) break;

case 1:
//do while
this.state = 10;
while (parent.__c.DateTime.getNow()<_n+_duration) {
this.state = 3;
if (true) break;
}
if (true) break;

case 3:
//C
this.state = 4;
RDebugUtils.currentLine=1769479;
 //BA.debugLineNum = 1769479;BA.debugLine="tempValue = ValueFromTimeEaseInOut(DateTime.Now";
_tempvalue = __ref._valuefromtimeeaseinout /*float*/ (null,(float) (parent.__c.DateTime.getNow()-_n),_start,(float) (_newvalue-_start),_duration);
RDebugUtils.currentLine=1769480;
 //BA.debugLineNum = 1769480;BA.debugLine="DrawValue(tempValue)";
__ref._drawvalue /*String*/ (null,_tempvalue);
RDebugUtils.currentLine=1769481;
 //BA.debugLineNum = 1769481;BA.debugLine="Sleep(10)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "circularprogressbar", "animatevalueto"),(int) (10));
this.state = 11;
return;
case 11:
//C
this.state = 4;
;
RDebugUtils.currentLine=1769482;
 //BA.debugLineNum = 1769482;BA.debugLine="If NewValue <> currentValue Then Return 'will ha";
if (true) break;

case 4:
//if
this.state = 9;
if (_newvalue!=__ref._currentvalue /*float*/ ) { 
this.state = 6;
;}if (true) break;

case 6:
//C
this.state = 9;
if (true) return ;
if (true) break;

case 9:
//C
this.state = 1;
;
 if (true) break;

case 10:
//C
this.state = -1;
;
RDebugUtils.currentLine=1769484;
 //BA.debugLineNum = 1769484;BA.debugLine="DrawValue(currentValue)";
__ref._drawvalue /*String*/ (null,__ref._currentvalue /*float*/ );
RDebugUtils.currentLine=1769485;
 //BA.debugLineNum = 1769485;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public float  _valuefromtimeeaseinout(b4a.example3.circularprogressbar __ref,float _time,float _start,float _changeinvalue,int _duration) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "valuefromtimeeaseinout", false))
	 {return ((Float) Debug.delegate(ba, "valuefromtimeeaseinout", new Object[] {_time,_start,_changeinvalue,_duration}));}
RDebugUtils.currentLine=1835008;
 //BA.debugLineNum = 1835008;BA.debugLine="Private Sub ValueFromTimeEaseInOut(Time As Float,";
RDebugUtils.currentLine=1835009;
 //BA.debugLineNum = 1835009;BA.debugLine="Time = Time / (Duration / 2)";
_time = (float) (_time/(double)(_duration/(double)2));
RDebugUtils.currentLine=1835010;
 //BA.debugLineNum = 1835010;BA.debugLine="If Time < 1 Then";
if (_time<1) { 
RDebugUtils.currentLine=1835011;
 //BA.debugLineNum = 1835011;BA.debugLine="Return ChangeInValue / 2 * Time * Time * Time *";
if (true) return (float) (_changeinvalue/(double)2*_time*_time*_time*_time+_start);
 }else {
RDebugUtils.currentLine=1835013;
 //BA.debugLineNum = 1835013;BA.debugLine="Time = Time - 2";
_time = (float) (_time-2);
RDebugUtils.currentLine=1835014;
 //BA.debugLineNum = 1835014;BA.debugLine="Return -ChangeInValue / 2 * (Time * Time * Time";
if (true) return (float) (-_changeinvalue/(double)2*(_time*_time*_time*_time-2)+_start);
 };
RDebugUtils.currentLine=1835016;
 //BA.debugLineNum = 1835016;BA.debugLine="End Sub";
return 0f;
}
public String  _drawvalue(b4a.example3.circularprogressbar __ref,float _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "drawvalue", false))
	 {return ((String) Debug.delegate(ba, "drawvalue", new Object[] {_value}));}
float _startangle = 0f;
float _sweepangle = 0f;
anywheresoftware.b4a.objects.B4XCanvas.B4XPath _p = null;
RDebugUtils.currentLine=1900544;
 //BA.debugLineNum = 1900544;BA.debugLine="Private Sub DrawValue(Value As Float)";
RDebugUtils.currentLine=1900545;
 //BA.debugLineNum = 1900545;BA.debugLine="cvs.ClearRect(cvs.TargetRect)";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .ClearRect(__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .getTargetRect());
RDebugUtils.currentLine=1900546;
 //BA.debugLineNum = 1900546;BA.debugLine="cvs.DrawCircle(cx, cy, radius, clrEmpty, False, s";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawCircle(__ref._cx /*float*/ ,__ref._cy /*float*/ ,__ref._radius /*float*/ ,__ref._clrempty /*int*/ ,__c.False,__ref._stroke /*float*/ );
RDebugUtils.currentLine=1900547;
 //BA.debugLineNum = 1900547;BA.debugLine="mLbl.Text = $\"$1.1{Value+Offset}\"$ & \"°C\"";
__ref._mlbl /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.1",(Object)(_value+__ref._offset /*float*/ ))+"")+"°C"));
RDebugUtils.currentLine=1900548;
 //BA.debugLineNum = 1900548;BA.debugLine="Dim startAngle = -90, sweepAngle = Value/ Max_val";
_startangle = (float) (-90);
_sweepangle = (float) (_value/(double)__ref._max_val /*float*/ *360);
RDebugUtils.currentLine=1900550;
 //BA.debugLineNum = 1900550;BA.debugLine="If Value < Max_val Then";
if (_value<__ref._max_val /*float*/ ) { 
RDebugUtils.currentLine=1900551;
 //BA.debugLineNum = 1900551;BA.debugLine="Dim p As B4XPath";
_p = new anywheresoftware.b4a.objects.B4XCanvas.B4XPath();
RDebugUtils.currentLine=1900552;
 //BA.debugLineNum = 1900552;BA.debugLine="p.InitializeArc(cx, cy, radius + stroke + 1dip,";
_p.InitializeArc(__ref._cx /*float*/ ,__ref._cy /*float*/ ,(float) (__ref._radius /*float*/ +__ref._stroke /*float*/ +__c.DipToCurrent((int) (1))),_startangle,_sweepangle);
RDebugUtils.currentLine=1900553;
 //BA.debugLineNum = 1900553;BA.debugLine="cvs.ClipPath(p)";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .ClipPath(_p);
RDebugUtils.currentLine=1900554;
 //BA.debugLineNum = 1900554;BA.debugLine="cvs.DrawCircle(cx, cy, radius - 0.5dip, clrFull,";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawCircle(__ref._cx /*float*/ ,__ref._cy /*float*/ ,(float) (__ref._radius /*float*/ -__c.DipToCurrent((int) (0.5))),__ref._clrfull /*int*/ ,__c.False,(float) (__ref._stroke /*float*/ +__c.DipToCurrent((int) (1))));
RDebugUtils.currentLine=1900555;
 //BA.debugLineNum = 1900555;BA.debugLine="cvs.RemoveClip";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .RemoveClip();
 }else {
RDebugUtils.currentLine=1900557;
 //BA.debugLineNum = 1900557;BA.debugLine="cvs.DrawCircle(cx, cy, radius - 0.5dip, clrFull,";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawCircle(__ref._cx /*float*/ ,__ref._cy /*float*/ ,(float) (__ref._radius /*float*/ -__c.DipToCurrent((int) (0.5))),__ref._clrfull /*int*/ ,__c.False,(float) (__ref._stroke /*float*/ +__c.DipToCurrent((int) (1))));
 };
RDebugUtils.currentLine=1900559;
 //BA.debugLineNum = 1900559;BA.debugLine="cvs.Invalidate";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .Invalidate();
RDebugUtils.currentLine=1900560;
 //BA.debugLineNum = 1900560;BA.debugLine="End Sub";
return "";
}
public String  _base_resize(b4a.example3.circularprogressbar __ref,double _width,double _height) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "base_resize", false))
	 {return ((String) Debug.delegate(ba, "base_resize", new Object[] {_width,_height}));}
RDebugUtils.currentLine=1048576;
 //BA.debugLineNum = 1048576;BA.debugLine="Private Sub Base_Resize (Width As Double, Height A";
RDebugUtils.currentLine=1048577;
 //BA.debugLineNum = 1048577;BA.debugLine="cx = Width / 2";
__ref._cx /*float*/  = (float) (_width/(double)2);
RDebugUtils.currentLine=1048578;
 //BA.debugLineNum = 1048578;BA.debugLine="cy = Height / 2";
__ref._cy /*float*/  = (float) (_height/(double)2);
RDebugUtils.currentLine=1048579;
 //BA.debugLineNum = 1048579;BA.debugLine="radius = cx - 10dip";
__ref._radius /*float*/  = (float) (__ref._cx /*float*/ -__c.DipToCurrent((int) (10)));
RDebugUtils.currentLine=1048580;
 //BA.debugLineNum = 1048580;BA.debugLine="mBase.SetLayoutAnimated(0, mBase.Left, mBase.Top,";
__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .SetLayoutAnimated((int) (0),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getLeft(),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getTop(),(int) (__c.Min(_width,_height)),(int) (__c.Min(_width,_height)));
RDebugUtils.currentLine=1048581;
 //BA.debugLineNum = 1048581;BA.debugLine="cvs.Resize(Width, Height)";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .Resize((float) (_width),(float) (_height));
RDebugUtils.currentLine=1048582;
 //BA.debugLineNum = 1048582;BA.debugLine="mLbl.SetLayoutAnimated(0, 0, cy - 20dip, Width, 4";
__ref._mlbl /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .SetLayoutAnimated((int) (0),(int) (0),(int) (__ref._cy /*float*/ -__c.DipToCurrent((int) (20))),(int) (_width),__c.DipToCurrent((int) (40)));
RDebugUtils.currentLine=1048583;
 //BA.debugLineNum = 1048583;BA.debugLine="DrawValue(currentValue)";
__ref._drawvalue /*String*/ (null,__ref._currentvalue /*float*/ );
RDebugUtils.currentLine=1048584;
 //BA.debugLineNum = 1048584;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(b4a.example3.circularprogressbar __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
RDebugUtils.currentLine=851968;
 //BA.debugLineNum = 851968;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=851969;
 //BA.debugLineNum = 851969;BA.debugLine="Private mEventName As String 'ignore";
_meventname = "";
RDebugUtils.currentLine=851970;
 //BA.debugLineNum = 851970;BA.debugLine="Private mCallBack As Object 'ignore";
_mcallback = new Object();
RDebugUtils.currentLine=851971;
 //BA.debugLineNum = 851971;BA.debugLine="Private cvs As B4XCanvas";
_cvs = new anywheresoftware.b4a.objects.B4XCanvas();
RDebugUtils.currentLine=851972;
 //BA.debugLineNum = 851972;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=851973;
 //BA.debugLineNum = 851973;BA.debugLine="Private mLbl As B4XView";
_mlbl = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=851974;
 //BA.debugLineNum = 851974;BA.debugLine="Private cx, cy, radius As Float";
_cx = 0f;
_cy = 0f;
_radius = 0f;
RDebugUtils.currentLine=851975;
 //BA.debugLineNum = 851975;BA.debugLine="Private stroke As Float";
_stroke = 0f;
RDebugUtils.currentLine=851976;
 //BA.debugLineNum = 851976;BA.debugLine="Private clrFull, clrEmpty As Int";
_clrfull = 0;
_clrempty = 0;
RDebugUtils.currentLine=851977;
 //BA.debugLineNum = 851977;BA.debugLine="Private mBase As B4XView";
_mbase = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=851978;
 //BA.debugLineNum = 851978;BA.debugLine="Private currentValue As Float = 0";
_currentvalue = (float) (0);
RDebugUtils.currentLine=851979;
 //BA.debugLineNum = 851979;BA.debugLine="Private DurationFromZeroTo100 As Int";
_durationfromzeroto100 = 0;
RDebugUtils.currentLine=851980;
 //BA.debugLineNum = 851980;BA.debugLine="Private manager As ManagerEvent";
_manager = new b4a.example.managerevent();
RDebugUtils.currentLine=851981;
 //BA.debugLineNum = 851981;BA.debugLine="Private minv, maxv As Int";
_minv = 0;
_maxv = 0;
RDebugUtils.currentLine=851982;
 //BA.debugLineNum = 851982;BA.debugLine="Private current_pos As Float= 0";
_current_pos = (float) (0);
RDebugUtils.currentLine=851983;
 //BA.debugLineNum = 851983;BA.debugLine="Private pas As Float";
_pas = 0f;
RDebugUtils.currentLine=851984;
 //BA.debugLineNum = 851984;BA.debugLine="Private Offset As Float=0";
_offset = (float) (0);
RDebugUtils.currentLine=851985;
 //BA.debugLineNum = 851985;BA.debugLine="Private Max_val As Float=100";
_max_val = (float) (100);
RDebugUtils.currentLine=851986;
 //BA.debugLineNum = 851986;BA.debugLine="Private TouchScale As Float=0.1";
_touchscale = (float) (0.1);
RDebugUtils.currentLine=851987;
 //BA.debugLineNum = 851987;BA.debugLine="Private SweepScale As Float=1";
_sweepscale = (float) (1);
RDebugUtils.currentLine=851989;
 //BA.debugLineNum = 851989;BA.debugLine="End Sub";
return "";
}
public String  _designercreateview(b4a.example3.circularprogressbar __ref,Object _base,anywheresoftware.b4a.objects.LabelWrapper _lbl,anywheresoftware.b4a.objects.collections.Map _props) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "designercreateview", false))
	 {return ((String) Debug.delegate(ba, "designercreateview", new Object[] {_base,_lbl,_props}));}
RDebugUtils.currentLine=983040;
 //BA.debugLineNum = 983040;BA.debugLine="Public Sub DesignerCreateView (Base As Object, Lbl";
RDebugUtils.currentLine=983041;
 //BA.debugLineNum = 983041;BA.debugLine="mBase = Base";
__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_base));
RDebugUtils.currentLine=983042;
 //BA.debugLineNum = 983042;BA.debugLine="manager.SetEvent(mBase,\"mBase\")";
__ref._manager /*b4a.example.managerevent*/ ._v7((anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getObject())),"mBase");
RDebugUtils.currentLine=983043;
 //BA.debugLineNum = 983043;BA.debugLine="mBase.SetLayoutAnimated(0, mBase.Left, mBase.Top,";
__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .SetLayoutAnimated((int) (0),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getLeft(),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getTop(),(int) (__c.Min(__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth(),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight())),(int) (__c.Min(__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth(),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight())));
RDebugUtils.currentLine=983044;
 //BA.debugLineNum = 983044;BA.debugLine="minv=Min(mBase.Width, mBase.Height)";
__ref._minv /*int*/  = (int) (__c.Min(__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth(),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()));
RDebugUtils.currentLine=983045;
 //BA.debugLineNum = 983045;BA.debugLine="maxv=Max(mBase.Width, mBase.Height)";
__ref._maxv /*int*/  = (int) (__c.Max(__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth(),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()));
RDebugUtils.currentLine=983046;
 //BA.debugLineNum = 983046;BA.debugLine="clrFull = xui.PaintOrColorToColor(Props.Get(\"Colo";
__ref._clrfull /*int*/  = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .PaintOrColorToColor(_props.Get((Object)("ColorFull")));
RDebugUtils.currentLine=983047;
 //BA.debugLineNum = 983047;BA.debugLine="clrEmpty = xui.PaintOrColorToColor(Props.Get(\"Col";
__ref._clrempty /*int*/  = __ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .PaintOrColorToColor(_props.Get((Object)("ColorEmpty")));
RDebugUtils.currentLine=983048;
 //BA.debugLineNum = 983048;BA.debugLine="stroke = DipToCurrent(Props.Get(\"StrokeWidth\"))";
__ref._stroke /*float*/  = (float) (__c.DipToCurrent((int)(BA.ObjectToNumber(_props.Get((Object)("StrokeWidth"))))));
RDebugUtils.currentLine=983049;
 //BA.debugLineNum = 983049;BA.debugLine="DurationFromZeroTo100 = Props.Get(\"Duration\")";
__ref._durationfromzeroto100 /*int*/  = (int)(BA.ObjectToNumber(_props.Get((Object)("Duration"))));
RDebugUtils.currentLine=983050;
 //BA.debugLineNum = 983050;BA.debugLine="mLbl = Lbl";
__ref._mlbl /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_lbl.getObject()));
RDebugUtils.currentLine=983051;
 //BA.debugLineNum = 983051;BA.debugLine="cx = mBase.Width / 2";
__ref._cx /*float*/  = (float) (__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()/(double)2);
RDebugUtils.currentLine=983052;
 //BA.debugLineNum = 983052;BA.debugLine="cy = mBase.Height / 2";
__ref._cy /*float*/  = (float) (__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()/(double)2);
RDebugUtils.currentLine=983053;
 //BA.debugLineNum = 983053;BA.debugLine="radius = cx - 10dip";
__ref._radius /*float*/  = (float) (__ref._cx /*float*/ -__c.DipToCurrent((int) (10)));
RDebugUtils.currentLine=983054;
 //BA.debugLineNum = 983054;BA.debugLine="cvs.Initialize(mBase)";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .Initialize(__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ );
RDebugUtils.currentLine=983055;
 //BA.debugLineNum = 983055;BA.debugLine="mLbl.SetTextAlignment(\"CENTER\", \"CENTER\")";
__ref._mlbl /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .SetTextAlignment("CENTER","CENTER");
RDebugUtils.currentLine=983056;
 //BA.debugLineNum = 983056;BA.debugLine="mBase.AddView(mLbl, 0, cy - 20dip, mBase.Width, 4";
__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .AddView((android.view.View)(__ref._mlbl /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getObject()),(int) (0),(int) (__ref._cy /*float*/ -__c.DipToCurrent((int) (20))),__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth(),__c.DipToCurrent((int) (40)));
RDebugUtils.currentLine=983057;
 //BA.debugLineNum = 983057;BA.debugLine="cvs.Initialize(mBase)";
__ref._cvs /*anywheresoftware.b4a.objects.B4XCanvas*/ .Initialize(__ref._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ );
RDebugUtils.currentLine=983058;
 //BA.debugLineNum = 983058;BA.debugLine="DrawValue(currentValue)";
__ref._drawvalue /*String*/ (null,__ref._currentvalue /*float*/ );
RDebugUtils.currentLine=983059;
 //BA.debugLineNum = 983059;BA.debugLine="End Sub";
return "";
}
public float  _getmaxvalue(b4a.example3.circularprogressbar __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "getmaxvalue", false))
	 {return ((Float) Debug.delegate(ba, "getmaxvalue", null));}
RDebugUtils.currentLine=2228224;
 //BA.debugLineNum = 2228224;BA.debugLine="public Sub getMaxValue As Float";
RDebugUtils.currentLine=2228225;
 //BA.debugLineNum = 2228225;BA.debugLine="Return Max_val";
if (true) return __ref._max_val /*float*/ ;
RDebugUtils.currentLine=2228226;
 //BA.debugLineNum = 2228226;BA.debugLine="End Sub";
return 0f;
}
public float  _getoffsets(b4a.example3.circularprogressbar __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "getoffsets", false))
	 {return ((Float) Debug.delegate(ba, "getoffsets", null));}
RDebugUtils.currentLine=3276800;
 //BA.debugLineNum = 3276800;BA.debugLine="Public Sub getOffsets As Float";
RDebugUtils.currentLine=3276801;
 //BA.debugLineNum = 3276801;BA.debugLine="Return Offset";
if (true) return __ref._offset /*float*/ ;
RDebugUtils.currentLine=3276802;
 //BA.debugLineNum = 3276802;BA.debugLine="End Sub";
return 0f;
}
public float  _getsweep_scale(b4a.example3.circularprogressbar __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "getsweep_scale", false))
	 {return ((Float) Debug.delegate(ba, "getsweep_scale", null));}
RDebugUtils.currentLine=2490368;
 //BA.debugLineNum = 2490368;BA.debugLine="public Sub getSweep_Scale As Float";
RDebugUtils.currentLine=2490369;
 //BA.debugLineNum = 2490369;BA.debugLine="Return SweepScale";
if (true) return __ref._sweepscale /*float*/ ;
RDebugUtils.currentLine=2490370;
 //BA.debugLineNum = 2490370;BA.debugLine="End Sub";
return 0f;
}
public float  _gettouch_scale(b4a.example3.circularprogressbar __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "gettouch_scale", false))
	 {return ((Float) Debug.delegate(ba, "gettouch_scale", null));}
RDebugUtils.currentLine=2359296;
 //BA.debugLineNum = 2359296;BA.debugLine="public Sub getTouch_Scale As Float";
RDebugUtils.currentLine=2359297;
 //BA.debugLineNum = 2359297;BA.debugLine="Return Max_val";
if (true) return __ref._max_val /*float*/ ;
RDebugUtils.currentLine=2359298;
 //BA.debugLineNum = 2359298;BA.debugLine="End Sub";
return 0f;
}
public String  _initialize(b4a.example3.circularprogressbar __ref,anywheresoftware.b4a.BA _ba,Object _callback,String _eventname) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((String) Debug.delegate(ba, "initialize", new Object[] {_ba,_callback,_eventname}));}
RDebugUtils.currentLine=917504;
 //BA.debugLineNum = 917504;BA.debugLine="Public Sub Initialize (Callback As Object, EventNa";
RDebugUtils.currentLine=917505;
 //BA.debugLineNum = 917505;BA.debugLine="mEventName = EventName";
__ref._meventname /*String*/  = _eventname;
RDebugUtils.currentLine=917506;
 //BA.debugLineNum = 917506;BA.debugLine="mCallBack = Callback";
__ref._mcallback /*Object*/  = _callback;
RDebugUtils.currentLine=917507;
 //BA.debugLineNum = 917507;BA.debugLine="manager.Initialize(Me)";
__ref._manager /*b4a.example.managerevent*/ ._initialize(ba,this);
RDebugUtils.currentLine=917508;
 //BA.debugLineNum = 917508;BA.debugLine="End Sub";
return "";
}
public String  _mbase_touchevent(b4a.example3.circularprogressbar __ref,int _action,b4a.example.managerevent._tcoordinate[] _coordinate) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "mbase_touchevent", false))
	 {return ((String) Debug.delegate(ba, "mbase_touchevent", new Object[] {_action,_coordinate}));}
float _teta = 0f;
RDebugUtils.currentLine=1966080;
 //BA.debugLineNum = 1966080;BA.debugLine="Private Sub mbase_TouchEvent(action As Int, Coordi";
RDebugUtils.currentLine=1966083;
 //BA.debugLineNum = 1966083;BA.debugLine="If action=2 Then 'Définition du pas en mode touch";
if (_action==2) { 
RDebugUtils.currentLine=1966085;
 //BA.debugLineNum = 1966085;BA.debugLine="pas=SweepScale";
__ref._pas /*float*/  = __ref._sweepscale /*float*/ ;
RDebugUtils.currentLine=1966086;
 //BA.debugLineNum = 1966086;BA.debugLine="Dim teta As Float = RtoAngle(Coordinate(0).x,Coo";
_teta = __ref._rtoangle /*float*/ (null,_coordinate[(int) (0)].X,_coordinate[(int) (0)].Y);
RDebugUtils.currentLine=1966087;
 //BA.debugLineNum = 1966087;BA.debugLine="If  teta < Max_val Then DrawValue(teta)";
if (_teta<__ref._max_val /*float*/ ) { 
__ref._drawvalue /*String*/ (null,_teta);};
 }else 
{RDebugUtils.currentLine=1966088;
 //BA.debugLineNum = 1966088;BA.debugLine="else if action=0 Then 'Définition du pas en mode";
if (_action==0) { 
RDebugUtils.currentLine=1966089;
 //BA.debugLineNum = 1966089;BA.debugLine="pas=TouchScale";
__ref._pas /*float*/  = __ref._touchscale /*float*/ ;
RDebugUtils.currentLine=1966090;
 //BA.debugLineNum = 1966090;BA.debugLine="Dim teta As Float = RtoAngle(Coordinate(0).x,Coo";
_teta = __ref._rtoangle /*float*/ (null,_coordinate[(int) (0)].X,_coordinate[(int) (0)].Y);
RDebugUtils.currentLine=1966091;
 //BA.debugLineNum = 1966091;BA.debugLine="If teta < Max_val Then DrawValue(teta)";
if (_teta<__ref._max_val /*float*/ ) { 
__ref._drawvalue /*String*/ (null,_teta);};
 }}
;
RDebugUtils.currentLine=1966097;
 //BA.debugLineNum = 1966097;BA.debugLine="End Sub";
return "";
}
public float  _rtoangle(b4a.example3.circularprogressbar __ref,float _x,float _y) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "rtoangle", false))
	 {return ((Float) Debug.delegate(ba, "rtoangle", new Object[] {_x,_y}));}
float _teta = 0f;
RDebugUtils.currentLine=2031616;
 //BA.debugLineNum = 2031616;BA.debugLine="Private Sub RtoAngle(X As Float, Y As Float) As Fl";
RDebugUtils.currentLine=2031618;
 //BA.debugLineNum = 2031618;BA.debugLine="Dim teta As Float";
_teta = 0f;
RDebugUtils.currentLine=2031620;
 //BA.debugLineNum = 2031620;BA.debugLine="If Y <> 0 Then";
if (_y!=0) { 
RDebugUtils.currentLine=2031624;
 //BA.debugLineNum = 2031624;BA.debugLine="teta = (ATan2D((X-cx),(cy-Y))/180)*(Max_val/2) '";
_teta = (float) ((__c.ATan2D((_x-__ref._cx /*float*/ ),(__ref._cy /*float*/ -_y))/(double)180)*(__ref._max_val /*float*/ /(double)2));
RDebugUtils.currentLine=2031627;
 //BA.debugLineNum = 2031627;BA.debugLine="If teta < 0  Then 'à -180° (soit -Max_val/2) on";
if (_teta<0) { 
RDebugUtils.currentLine=2031628;
 //BA.debugLineNum = 2031628;BA.debugLine="teta=(Max_val/2)+((Max_val/2)-Abs(teta))";
_teta = (float) ((__ref._max_val /*float*/ /(double)2)+((__ref._max_val /*float*/ /(double)2)-__c.Abs(_teta)));
 };
RDebugUtils.currentLine=2031635;
 //BA.debugLineNum = 2031635;BA.debugLine="If teta < ((Max_val/2)*60)/100 And current_pos>M";
if (_teta<((__ref._max_val /*float*/ /(double)2)*60)/(double)100 && __ref._current_pos /*float*/ >__ref._max_val /*float*/ /(double)2) { 
RDebugUtils.currentLine=2031637;
 //BA.debugLineNum = 2031637;BA.debugLine="teta=Max_val-0.1";
_teta = (float) (__ref._max_val /*float*/ -0.1);
 }else 
{RDebugUtils.currentLine=2031638;
 //BA.debugLineNum = 2031638;BA.debugLine="Else if teta > ((Max_val)*80)/100 And current_po";
if (_teta>((__ref._max_val /*float*/ )*80)/(double)100 && __ref._current_pos /*float*/ <__ref._max_val /*float*/ /(double)2) { 
RDebugUtils.currentLine=2031640;
 //BA.debugLineNum = 2031640;BA.debugLine="teta=0.1";
_teta = (float) (0.1);
 }}
;
RDebugUtils.currentLine=2031644;
 //BA.debugLineNum = 2031644;BA.debugLine="If teta>current_pos  Then";
if (_teta>__ref._current_pos /*float*/ ) { 
RDebugUtils.currentLine=2031645;
 //BA.debugLineNum = 2031645;BA.debugLine="teta=current_pos+pas";
_teta = (float) (__ref._current_pos /*float*/ +__ref._pas /*float*/ );
 }else 
{RDebugUtils.currentLine=2031646;
 //BA.debugLineNum = 2031646;BA.debugLine="Else if teta<current_pos Then";
if (_teta<__ref._current_pos /*float*/ ) { 
RDebugUtils.currentLine=2031647;
 //BA.debugLineNum = 2031647;BA.debugLine="teta=current_pos-pas";
_teta = (float) (__ref._current_pos /*float*/ -__ref._pas /*float*/ );
 }}
;
RDebugUtils.currentLine=2031652;
 //BA.debugLineNum = 2031652;BA.debugLine="Log(((Max_val/2)*60)/100)";
__c.LogImpl("52031652",BA.NumberToString(((__ref._max_val /*float*/ /(double)2)*60)/(double)100),0);
RDebugUtils.currentLine=2031654;
 //BA.debugLineNum = 2031654;BA.debugLine="current_pos=teta";
__ref._current_pos /*float*/  = _teta;
RDebugUtils.currentLine=2031655;
 //BA.debugLineNum = 2031655;BA.debugLine="Return teta";
if (true) return _teta;
 }else {
RDebugUtils.currentLine=2031658;
 //BA.debugLineNum = 2031658;BA.debugLine="If (X-cx) > 0 Then teta = 235 Else teta = 45";
if ((_x-__ref._cx /*float*/ )>0) { 
_teta = (float) (235);}
else {
_teta = (float) (45);};
 };
RDebugUtils.currentLine=2031663;
 //BA.debugLineNum = 2031663;BA.debugLine="End Sub";
return 0f;
}
public String  _setmaxvalue(b4a.example3.circularprogressbar __ref,float _maxvalue) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "setmaxvalue", false))
	 {return ((String) Debug.delegate(ba, "setmaxvalue", new Object[] {_maxvalue}));}
RDebugUtils.currentLine=2162688;
 //BA.debugLineNum = 2162688;BA.debugLine="Public Sub setMaxValue(MaxValue As Float)";
RDebugUtils.currentLine=2162689;
 //BA.debugLineNum = 2162689;BA.debugLine="Max_val=MaxValue+Offset";
__ref._max_val /*float*/  = (float) (_maxvalue+__ref._offset /*float*/ );
RDebugUtils.currentLine=2162690;
 //BA.debugLineNum = 2162690;BA.debugLine="End Sub";
return "";
}
public String  _setoffsets(b4a.example3.circularprogressbar __ref,float _offset_value) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "setoffsets", false))
	 {return ((String) Debug.delegate(ba, "setoffsets", new Object[] {_offset_value}));}
RDebugUtils.currentLine=3342336;
 //BA.debugLineNum = 3342336;BA.debugLine="Public Sub setOffsets(Offset_Value As Float)";
RDebugUtils.currentLine=3342337;
 //BA.debugLineNum = 3342337;BA.debugLine="Offset=Offset_Value";
__ref._offset /*float*/  = _offset_value;
RDebugUtils.currentLine=3342338;
 //BA.debugLineNum = 3342338;BA.debugLine="End Sub";
return "";
}
public String  _setsweep_scale(b4a.example3.circularprogressbar __ref,float _sweep_scale) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "setsweep_scale", false))
	 {return ((String) Debug.delegate(ba, "setsweep_scale", new Object[] {_sweep_scale}));}
RDebugUtils.currentLine=2424832;
 //BA.debugLineNum = 2424832;BA.debugLine="Public Sub setSweep_Scale(Sweep_Scale As Float)";
RDebugUtils.currentLine=2424833;
 //BA.debugLineNum = 2424833;BA.debugLine="SweepScale=Sweep_Scale";
__ref._sweepscale /*float*/  = _sweep_scale;
RDebugUtils.currentLine=2424834;
 //BA.debugLineNum = 2424834;BA.debugLine="End Sub";
return "";
}
public String  _settouch_scale(b4a.example3.circularprogressbar __ref,float _touch_scale) throws Exception{
__ref = this;
RDebugUtils.currentModule="circularprogressbar";
if (Debug.shouldDelegate(ba, "settouch_scale", false))
	 {return ((String) Debug.delegate(ba, "settouch_scale", new Object[] {_touch_scale}));}
RDebugUtils.currentLine=2293760;
 //BA.debugLineNum = 2293760;BA.debugLine="Public Sub setTouch_Scale(Touch_Scale As Float)";
RDebugUtils.currentLine=2293761;
 //BA.debugLineNum = 2293761;BA.debugLine="TouchScale=TouchScale";
__ref._touchscale /*float*/  = __ref._touchscale /*float*/ ;
RDebugUtils.currentLine=2293762;
 //BA.debugLineNum = 2293762;BA.debugLine="End Sub";
return "";
}
}