private void FormClosed(object sender, FormClosedEventArgs e) { mainView.Dispose(); mainView = null; Utils.ReleaseMemory(true); System.Environment.Exit(0); }
public void Start() { if (mainView == null) { // 虽然是单例,但是只能在Controller层使用 exchangeManager = ExchangeManager.GetInstance(); exchangeManager.Controller = this; mainView = new View.exchanger(this); mainView.FormClosed += FormClosed; mainView.Show(); } mainView.Activate(); }