I can't use the function "tranferfiles" in my function.
Where I have to change this?
Should the function be a public function? or can i use other functions only when I create a new class?
namespace Webshopfiletransfer
{
public partial class Webshopfiletransfer : ServiceBase
{
private static System.Timers.Timer aTimer;
public Webshopfiletransfer()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
SetTimer();
aTimer.Start();
}
private static void SetTimer()
{
// Create a timer with a two second interval.
aTimer = new System.Timers.Timer(30000);
// Hook up the Elapsed event for the timer.
aTimer.Elapsed += OnTimedEvent;
aTimer.AutoReset = true;
aTimer.Enabled = true;
}
private static void OnTimedEvent(Object source, ElapsedEventArgs e)
{
transferfiles("download");
//transferfiles("upload");
}
private void transferfiles(string modus)
{
}
}
}