static void Main(string[] args) { using (FtpServer server = new FtpServer(IPAddress.IPv6Any, 21)) { server.Start(); Console.ReadKey(); } }
static void Main(string[] args) { using (FtpServer server = new FtpServer(IPAddress.IPv6Any, 21)) { server.Start(); Console.WriteLine("Press any key to stop..."); Console.ReadKey(true); } }
static void Main(string[] args) { Console.WriteLine("Introduzca el puerto FTP"); int puerto = int.Parse(Console.ReadLine()); using (FtpServer server = new FtpServer(IPAddress.Any, puerto)) { Chord.ChordStart(); using (TCP_Server serverTCP = new TCP_Server(IPAddress.Any, Chord.port + 1)) { serverTCP.Start(); server.Start(); Console.WriteLine("Press any key to stop..."); Console.ReadKey(true); } } }
static void Main(string[] args) { notifyIcon = new NotifyIcon(); notifyIcon.Icon = new Icon("icon1.ico"); notifyIcon.Text = "Monitor"; notifyIcon.Visible = true; ContextMenu menu = new ContextMenu(); HideMenu = new MenuItem("Hide", new EventHandler(Minimize_Click)); RestoreMenu = new MenuItem("Restore", new EventHandler(Maximize_Click)); menu.MenuItems.Add(RestoreMenu); menu.MenuItems.Add(HideMenu); menu.MenuItems.Add(new MenuItem("Exit", new EventHandler(CleanExit))); notifyIcon.ContextMenu = menu; //You need to spin off your actual work in a different thread so that the Notify Icon works correctly //Task.Factory.StartNew(Run); processHandle = Process.GetCurrentProcess().MainWindowHandle; WinShell = GetShellWindow(); WinDesktop = GetDesktopWindow(); //Hide the Window ResizeWindow(false); /////////////////////////////////////////////////// //IPAddress ip = IPAddress.Parse("192.168.102.135"); //using (FtpServer server = new FtpServer(IPAddress.IPv6Any, 21)) using (FtpServer server = new FtpServer()) { server.Start(); Console.WriteLine("Press any key to stop..."); Application.Run(); while (!Console.ReadLine().Equals("Q")) { } } }
static void Main(string[] args) { using (FtpServer server = new FtpServer()) { if (!Directory.Exists("C:\\FtpServer")) { Directory.CreateDirectory("C:\\FtpServer"); } server.ServerPath = "C:\\FtpServer"; try { server.Start(); } catch (Exception e) { Console.WriteLine("Exception: " + e.ToString()); } Console.WriteLine("Press any key to stop..."); Console.ReadKey(true); } }