static void Main() { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //create the connection between the UI and the library DISocket.PlugSocket(); ICalcOperations operations = DISocket.Isocket; Application.Run(new CalcuatorForm(operations)); }
static void Main() { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Dependency Injection Performed DISocket.PlugSocket(); IProductController resProd = DISocket.ISocket; ICartController resCart = DISocket.IAdapter; SQLConnection connect = DISocket.Connect; // Passing the Dependency into the Form Application.Run(new ShoppingCartUI(resProd, resCart, connect)); }
static void Main() { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //create instance of author repository list AuthorDb all = new AuthorDb(); //make GET requests and save author objects to author repository list CreateAuthorsList(all); //create the connection between the UI and the library DISocket.PlugSocket(); ILinqOperations operations = DISocket.Isocket; //run Form app Application.Run(new Form1(all, operations)); }