我想在进行一些处理时显示加载圈。 我现在正在使用MRG.Conrol。 Loading.cs文件包含MRG.Controls.UI.LoadingCircle。
这是示例应用程序。这里的问题是加载圆圈没有出现在圆周运动中。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LoadingCircle
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Loading loding = new Loading();
loding.SetText = "loading circle";
loding.Show(this); //this form contains MRG conrol in it.
loding.Refresh();
int i = 1;
// here i have some custom logic which takes 2 min to done.
// i cant make this logic in separate thread.
loding.Close();
}
}
}