static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); CustomServiceContainer.AddService <IFileManager, FileManager>(new FileManager()); CustomServiceContainer.AddService <IWeatherApi, WeatherApi>(new WeatherApi()); MyFileWatcher fw = new MyFileWatcher(); var frm = new Form1(fw); Application.Run(frm); }
public Form1(MyFileWatcher fw) { InitializeComponent(); leftBorderbtn = new Panel(); leftBorderbtn.Size = new Size(7, 60); panelMenu.Controls.Add(leftBorderbtn); panelMenu.Controls.Add(leftBorderbtn); this.Text = string.Empty; this.ControlBox = false; this.DoubleBuffered = true; notifyIcon1.Visible = false; //this.MaximizedBounds = Screen.FromHandle(this.Handle).WorkingArea; fw._fileSystemWatcher.SynchronizingObject = this; InitComponents(); }