예제 #1
0
        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));
        }
예제 #2
0
        //connects the UI to the library by matching a plug instance to the interface socket
        public static void PlugSocket()
        {
            LinqOperations plug = new LinqOperations();

            Isocket = plug;
        }
예제 #3
0
 //form constructor
 public Form1(AuthorDb all, ILinqOperations operations)
 {
     InitializeComponent();
     All       = all;
     Operation = operations;
 }