using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
namespace FTPUPLOAD
{
class Program
{
static string PolingFilePath;
static string AnswerFilePath;
delegate void _Sync(string s1,string s2);
static void Main(string[] args)
{
/*
string s = @"s:\pgg\a.jpg333.3";
if (System.Text.RegularExpressions.Regex.IsMatch(s, @"^[a-zA-Z]{1}:\\\w+\\?\.?.+$"))//w*\?\w+\.\w{3,}
{
Console.WriteLine("ok");
}
*/
Program P = new Program();
string path = System.IO.File.ReadAllText(System.Windows.Forms.Application.StartupPath + @"\ftpset\path.txt", System.Text.Encoding.UTF8);
PolingFilePath = System.IO.File.ReadAllText(System.Windows.Forms.Application.StartupPath + @"\ftpset\PolingFilePath.txt", System.Text.Encoding.UTF8);
AnswerFilePath = System.IO.File.ReadAllText(System.Windows.Forms.Application.StartupPath + @"\ftpset\AnswerFilePath.txt", System.Text.Encoding.UTF8);
//
string[] fis = Directory.GetFiles(AnswerFilePath);
foreach (string fi in fis)
File.Delete(fi);
//
//s.BeginInvoke(PolingFilePath, AnswerFilePath, null, null);
System.IO.FileSystemWatcher fsw = new FileSystemWatcher(PolingFilePath);
fsw.Created += fsw_Created;
fsw.EnableRaisingEvents = true;
fsw = new FileSystemWatcher(path);
fsw.Created += fsw_CreatedX;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
namespace FTPUPLOAD
{
class Program
{
static string PolingFilePath;
static string AnswerFilePath;
delegate void _Sync(string s1,string s2);
static void Main(string[] args)
{
/*
string s = @"s:\pgg\a.jpg333.3";
if (System.Text.RegularExpressions.Regex.IsMatch(s, @"^[a-zA-Z]{1}:\\\w+\\?\.?.+$"))//w*\?\w+\.\w{3,}
{
Console.WriteLine("ok");
}
*/
Program P = new Program();
string path = System.IO.File.ReadAllText(System.Windows.Forms.Application.StartupPath + @"\ftpset\path.txt", System.Text.Encoding.UTF8);
PolingFilePath = System.IO.File.ReadAllText(System.Windows.Forms.Application.StartupPath + @"\ftpset\PolingFilePath.txt", System.Text.Encoding.UTF8);
AnswerFilePath = System.IO.File.ReadAllText(System.Windows.Forms.Application.StartupPath + @"\ftpset\AnswerFilePath.txt", System.Text.Encoding.UTF8);
//
string[] fis = Directory.GetFiles(AnswerFilePath);
foreach (string fi in fis)
File.Delete(fi);
//
//s.BeginInvoke(PolingFilePath, AnswerFilePath, null, null);
System.IO.FileSystemWatcher fsw = new FileSystemWatcher(PolingFilePath);
fsw.Created += fsw_Created;
fsw.EnableRaisingEvents = true;
fsw = new FileSystemWatcher(path);
fsw.Created += fsw_CreatedX;