自动运行C#文件 [英] Run C# file automatically

查看:87
本文介绍了自动运行C#文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好上堆栈溢出大家。
我有Asp.net的Web应用程序从一个文件夹拾起图像,调整它们的大小和其他文件夹倾倒。为了这个,我必须点击一个按钮来选择图片上有一个工作非常频繁。

Hello all of you on stack overflow. I have Asp.net web application which picks up image from a folder , resize them and dump in other folder. For this i have to click on a button to pick image an work on it very often.

有没有办法通过从文件夹中选择图像和工作就可以了,然后在其他文件夹中倾倒自动进行应用程序运行。

Is there a way to make application run automatically by picking image from folder and working on it and then dump in other folder.

设置可以像启动应用程序并运行五分钟,停止,然后等待1分钟,然后再次启动并持续5分钟用。

Setting can be like start application and run for five minutes and stop and then wait for 1 minute and then start and run again for 5 minute.

重要的是,它已经完成调整大小和间隔倾销最后的图像后,它应该只停下来。

IMPORTANT thing is it should only stop after it has finished resizing and dumping the last image in interval.

因为我必须在点击链接非常频繁,打扰我这会节省我很多麻烦。

this will save me lot of trouble because I have to click on button very frequently and disturb me .

我只是想的办法和相关链接他们.Lots。请回复。

I only want the approach and related LINKS .Lots of them . Please reply.

推荐答案

使用计时器控件做这个任务

use a timer control to do this task

        timer.Tick += new EventHandler(timer_Tick); // Everytime timer ticks, timer_Tick will be called
        timer.Interval = (1000) * (1);              // Timer will tick evert second
        timer.Enabled = true;                       // Enable the timer
        timer.Start();  

void timer_Tick(object sender, EventArgs e)
    {
        do whatever you want
    }

这篇关于自动运行C#文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆