public MainForm(ServiseOptions options) { Rewards = new RewardsBL(options); Users = new UsersBL(options); InitializeComponent(); DisplayUsers(); DisplayRewards(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var context = ConfigurationManager.AppSettings["context"]; var connectionString = ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString; var service = new ServiseOptions { Context = context, ConnectionString = connectionString }; Application.Run(new MainForm(service)); }