示例#1
0
		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);
		}
示例#2
0
		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();
			}
		}