像Visual Studio一样让积分进步?

时间:2014-07-12 18:12:20

标签: c# winforms visual-studio-2012

我是一个新手程序员,他基本上刚刚开始,我不知道我应该搜索我的问题,我想做的是如果有人已经看到VS 2012-13已经安装,那些点就像Visual Studio那些点继续进行消失,希望有些人可以帮助我。

ttp://i.stack.imgur.com/WlBqg.png

2 个答案:

答案 0 :(得分:1)

您是否尝试过使用ascii和标签? 您可以设法等待进程加载和填充,同时您可以显示:

label l1 = new label();
label.Location = new Point(X location, Y location) //Location despends on you

然后只需添加:

public Form1()
{
InitializeComponent();
label l1 = new label();
label.Location = new Point(X location, Y location) //Location despends on you
_load();
}

创建一个timmer方法:

    private async void _load()
    {
        string[] n = { " ", "  ", "   ", "    ", "     ", "      ", "       ", "        ", "         ", "          " };
        while (true)
        {
            l1.Text = "• • • • •";
            await Task.Delay(500);
            for(int i=0; i<10; i++)
            {
                if (i < 4)
                {
                    await Task.Delay(50);
                    l1.Text = "• • • •" + n[i] + "•";
                }
                else if(i >4 && i< 7)
                {
                    await Task.Delay(100);
                    l1.Text = "• • • •" + n[i] + "•";
                }
                else
                {
                    await Task.Delay(180);
                    l1.Text = "• • • •" + n[i] + "•";
                }
            }
        }
    }

你只需要用头来猜测如何让它看起来像VS的一个D: 字符串很有趣:3

答案 1 :(得分:0)

不要这样做。微软违反了他们自己的UI guidelines。 (见#11 here]。

相反,请使用标准ProgressBar control表示进度。这是它的用途,以及所有your users already recognize its meaning

您指定的动画与标准进度条的the Marquee style最相似。

enter image description here