protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); progress1 = FindViewById <CircleProgressBar> (Resource.Id.progress1); progress2 = FindViewById <CircleProgressBar> (Resource.Id.progress2); progressWithArrow = FindViewById <CircleProgressBar> (Resource.Id.progressWithArrow); progressWithoutBg = FindViewById <CircleProgressBar> (Resource.Id.progressWithoutBg); progress2.SetColorSchemeResources(Android.Resource.Color.HoloGreenLight); progressWithArrow.SetColorSchemeResources(Android.Resource.Color.HoloOrangeLight); progressWithoutBg.SetColorSchemeResources(Android.Resource.Color.HoloRedLight); handler = new Handler(); for (int i = 0; i < 10; i++) { int finalI = i; handler.PostDelayed(() => { if (finalI * 10 >= 90) { progress2.Visibility = ViewStates.Invisible; } else { progress2.Progress = finalI * 10; } }, 1000 * (i + 1)); } }
public ConfigPage() { InitializeComponent(); CircleProgressBar.SetValue(ref this.pathFore, 0, true); CircleProgressBar.SetValue(ref this.pathBack, 0, false); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_main); progress1 = FindViewById<CircleProgressBar>(Resource.Id.progress1); progress2 = FindViewById<CircleProgressBar>(Resource.Id.progress2); progressWithArrow = FindViewById<CircleProgressBar>(Resource.Id.progressWithArrow); progressWithoutBg = FindViewById<CircleProgressBar>(Resource.Id.progressWithoutBg); // progress1.setColorSchemeResources(android.R.color.holo_blue_bright); progress2.SetColorSchemeResources(Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight, Android.Resource.Color.HoloRedLight); progressWithArrow.SetColorSchemeResources(Android.Resource.Color.HoloOrangeLight); progressWithoutBg.SetColorSchemeResources(Android.Resource.Color.HoloRedLight); handler = new Handler(); for(int i = 0; i < 10; i++) { int finalI = i; handler.PostDelayed(() => { if(finalI * 10 >= 90) { progress1.Visibility = ViewStates.Visible; progress2.Visibility = ViewStates.Invisible; } else { progress2.Progress = finalI * 10; } }, 1000 * (i + 1)); } }
public override void Run(Window window) { Log.Debug(TestName, "CircleProgressBar run"); Conformant conformant = new Conformant(window); conformant.Show(); var surface = new CircleSurface(conformant); CircleProgressBar pb1 = new CircleProgressBar(conformant, surface) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, // bar Value = 0, Maximum = 100, Minimum = 0, BarRadius = 100, BarLineWidth = 15, BarColor = Color.Green, // background BackgroundRadius = 100, BackgroundLineWidth = 15, BackgroundColor = Color.Aqua, }; pb1.Show(); conformant.SetContent(pb1); Label lb1 = new Label(window) { Text = string.Format("S {0} %", pb1.Value), }; lb1.Resize(window.ScreenSize.Width, window.ScreenSize.Height); lb1.Move(160, window.ScreenSize.Height / 2 - 40); lb1.Show(); EcoreMainloop.AddTimer(0.05, () => { if (pb1.Value == pb1.Maximum / 2) { // Test purpose : set disable pb1.IsEnabled = false; } if (pb1.Value == pb1.Maximum) { EcoreMainloop.RemoveTimer(pb1); } pb1.Value += 1; lb1.Text = string.Format("S {0} %", pb1.Value); return(true); }); }
private static string PrepareProgress(ILogger logger, ProgressDTO userProgress) { logger.LogInformation($"Progress: {userProgress.TasksSolved}:{userProgress.TasksCount}"); var progressBar = new CircleProgressBar(); var progress = progressBar.GenerateProgressBar(userProgress.TasksSolved, userProgress.TasksCount); return(progress); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.splash); progressWithoutBg = FindViewById <CircleProgressBar>(Resource.Id.progressWithoutBg); progressWithoutBg.SetColorSchemeResources(Android.Resource.Color.HoloRedLight); // Create your application here }
void Start() { circleProgressBar.gameObject.SetActive(false); circleProgressBarComponent = circleProgressBar.GetComponent <CircleProgressBar>(); circleProgressBarGameObject = circleProgressBar.gameObject; button = transform.GetComponent <Button>(); button.onClick.AddListener(CastSpell); }
public override void Run(Window window) { Log.Debug(TestName, "CircleProgressBar run"); Conformant conformant = new Conformant(window); conformant.Show(); Naviframe naviframe = new Naviframe(window); naviframe.Show(); conformant.SetContent(naviframe); var surface = new CircleSurface(conformant); CircleProgressBar pb1 = new CircleProgressBar(naviframe, surface) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, Value = 0, Maximum = 100, Minimum = 0, }; pb1.Show(); naviframe.Push(pb1, null, "empty"); Label lb1 = new Label(window) { Text = string.Format("S {0} %", pb1.Value), }; lb1.Resize(window.ScreenSize.Width, window.ScreenSize.Height); lb1.Move(160, window.ScreenSize.Height / 2 - 40); lb1.Show(); EcoreMainloop.AddTimer(0.05, () => { if (pb1.Value == pb1.Maximum / 2) { // Test purpose : set disable pb1.IsEnabled = false; } if (pb1.Value == pb1.Maximum) { EcoreMainloop.RemoveTimer(pb1); } pb1.Value += 1; lb1.Text = string.Format("S {0} %", pb1.Value); return(true); }); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.activity_main); mLineProgressBar = (CircleProgressBar)FindViewById(Resource.Id.line_progress); mSolidProgressBar = (CircleProgressBar)FindViewById(Resource.Id.solid_progress); mCustomProgressBar1 = (CircleProgressBar)FindViewById(Resource.Id.custom_progress1); mCustomProgressBar2 = (CircleProgressBar)FindViewById(Resource.Id.custom_progress2); mCustomProgressBar3 = (CircleProgressBar)FindViewById(Resource.Id.custom_progress3); mCustomProgressBar4 = (CircleProgressBar)FindViewById(Resource.Id.custom_progress4); mCustomProgressBar5 = (CircleProgressBar)FindViewById(Resource.Id.custom_progress5); mCustomProgressBar6 = (CircleProgressBar)FindViewById(Resource.Id.custom_progress6); }
public override void Run(Window window) { Log.Debug(TestName, "CircleProgressBar run"); Conformant conformant = new Conformant(window); conformant.Show(); var surface = new CircleSurface(conformant); CircleProgressBar pb1 = new CircleProgressBar(conformant, surface) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, // default Value = 20, Maximum = 100, Minimum = 0, BarRadius = 80, BarLineWidth = 6, // background BackgroundRadius = 80, BackgroundLineWidth = 6, }; pb1.Show(); conformant.SetContent(pb1); Label lb1 = new Label(window) { Text = string.Format("{0} %", pb1.Value), }; lb1.Resize(window.ScreenSize.Width, window.ScreenSize.Height); lb1.Move(170, window.ScreenSize.Height / 2 - 20); lb1.Show(); EcoreMainloop.AddTimer(0.05, () => { pb1.Value += 1; lb1.Text = string.Format("{0} %", pb1.Value); return(true); }); }
private async void DownloadButton_Click(Object sender, RoutedEventArgs e) { this.DownloadButton.IsEnabled = false; Double counter = 0; //(7.2 / 3.6); Int32 count = 0; CircleProgressBar.SetValue(ref this.pathFore, counter, true); CircleProgressBar.SetValue(ref this.pathBack, counter, false); #if false const String session = ""; // 戦績リザルト 50試合 String resultJson = Ikaring2API.GetJson(Ikaring2API.RESULT_URL, session); TextFile.Write(@"iksmResult.json", resultJson, TextFile.OVER_WRITE); var resultmodel = JsonSerializser.ConvertToClass <ResultModel>(resultJson); #else var resultmodel = JsonSerializser.Load <ResultModel>(@"iksmResult.json"); #endif String filename; // 戦績詳細 バトルNo必要 foreach (var item in resultmodel.results) { counter += (7.2 / 3.6); count++; filename = $@".\Battle\BattleResult_{item.battle_number}.json"; #if false if (!System.IO.File.Exists(filename)) { String data = Ikaring2API.GetJson(String.Format(Ikaring2API.BATTLE_URL, item.battle_number), session); TextFile.Write(filename, data, TextFile.OVER_WRITE); await System.Threading.Tasks.Task.Delay(2000); } #else await System.Threading.Tasks.Task.Delay(2000); #endif CircleProgressBar.SetValue(ref this.pathFore, counter, true); CircleProgressBar.SetValue(ref this.pathBack, counter, false); this.valueBlock.Text = count.ToString(); } this.DownloadButton.IsEnabled = true; }
private static void CurrentOutputValueChanged( DependencyObject d, DependencyPropertyChangedEventArgs e) { var DstView = d as Ev3MotorDeviceView; double NewValue = (double)e.NewValue; double NewValueAbs = Math.Abs(NewValue); CircleProgressBar.SetValue(ref DstView.ForegroundBar_TargetOutput, NewValueAbs, true); CircleProgressBar.SetValue(ref DstView.BackgroundBar_TargetOutput, NewValueAbs, false); if (NewValue > 0) { DstView.ForegroundBar_TargetOutput.Stroke = new SolidColorBrush(Colors.DodgerBlue); } else { DstView.ForegroundBar_TargetOutput.Stroke = new SolidColorBrush(Colors.Fuchsia); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.activity_main); progress1 = FindViewById <CircleProgressBar>(Resource.Id.progress1); progress2 = FindViewById <CircleProgressBar>(Resource.Id.progress2); progressWithArrow = FindViewById <CircleProgressBar>(Resource.Id.progressWithArrow); progressWithoutBg = FindViewById <CircleProgressBar>(Resource.Id.progressWithoutBg); // progress1.setColorSchemeResources(android.R.color.holo_blue_bright); progress2.SetColorSchemeResources(Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight, Android.Resource.Color.HoloRedLight); progressWithArrow.SetColorSchemeResources(Android.Resource.Color.HoloOrangeLight); progressWithoutBg.SetColorSchemeResources(Android.Resource.Color.HoloRedLight); handler = new Handler(); for (int i = 0; i < 10; i++) { int finalI = i; handler.PostDelayed(() => { if (finalI * 10 >= 90) { progress1.Visibility = ViewStates.Visible; progress2.Visibility = ViewStates.Invisible; } else { progress2.Progress = finalI * 10; } }, 1000 * (i + 1)); } }
static public void HideCircleProgessbar(CircleProgressBar cpb) { cpb.Visibility = Android.Views.ViewStates.Invisible; }
public override void Run(Window window) { Log.Debug(TestName, "CircleProgressBar run"); Conformant conformant = new Conformant(window); conformant.Show(); var surface = new CircleSurface(conformant); CircleProgressBar pb1 = new CircleProgressBar(conformant, surface) { AlignmentX = -1, AlignmentY = -1, WeightX = 1, WeightY = 1, // Test purpose : to test property related with angle // bar Maximum = 100, BarRadius = 100, BarLineWidth = 20, BarColor = Color.Green, BarAngleOffset = 90, BarAngle = 90, BarAngleMaximum = 180, // background BackgroundRadius = 100, BackgroundLineWidth = 20, BackgroundColor = Color.Aqua, BackgroundAngleOffset = 90, BackgroundAngle = 180, }; pb1.Show(); conformant.SetContent(pb1); Label lb1 = new Label(window) { Text = string.Format("V {0} %", pb1.Value), }; lb1.Resize(window.ScreenSize.Width, window.ScreenSize.Height); lb1.Move(160, window.ScreenSize.Height / 2 - 40); lb1.Show(); Label lb2 = new Label(window) { Text = string.Format("A {0} ", pb1.BarAngle), }; lb2.Resize(window.ScreenSize.Width, window.ScreenSize.Height); lb2.Move(160, window.ScreenSize.Height / 2); lb2.Show(); EcoreMainloop.AddTimer(0.5, () => { pb1.Value += 1; lb1.Text = string.Format("V {0} %", pb1.Value); lb2.Text = string.Format("A {0} ", pb1.BarAngle); return(true); }); }
private void RestartProgressBar(CircleProgressBar bar) { bar.StopAnimation(); bar.ResetProgressView(); bar.ClearUpgradeAnimations(); }