public MainForm(MainModel mainModel) { InitializeComponent(); m_ImagesSplitter.SplitterDistance = m_ImagesSplitter.Width / 2; m_Model = mainModel; UpdateFromModel(); Application.Idle += ProcessFrame; m_Model.Changed += new EventHandler(OnModelChanged); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainModel model = new MainModel(); try { Application.Run(new MainForm(model)); } finally { if (model != null) { model.Dispose(); } Settings.Default.Save(); } }