Click here to Skip to main content
15,881,882 members
Articles / Programming Languages / XML

Dependency Injection using Spring.NET

Rate me:
Please Sign up or sign in to vote.
4.39/5 (23 votes)
28 May 2008CPOL5 min read 166.9K   4.2K   64  
Dependency Injection and how it is supported in Spring.NET.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WinClient
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void toolStripMenuItemCustomer_Click(object sender, EventArgs e)
        {
            Customer.frmCustomer customerForm = new Customer.frmCustomer();
            customerForm.MdiParent = this;
            customerForm.Show();
        }

        private void toolStripMenuItemEmployee_Click(object sender, EventArgs e)
        {
            Employee.frmEmployee employeeForm = new Employee.frmEmployee();
            employeeForm.MdiParent = this;
            employeeForm.Show();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Cognizant Technology Solutions
United States United States
Solution Architect working for Cognizant Technology Solutions.

Comments and Discussions