/// <summary> /// 场景配置完成事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ViewModel_SceneConfigurationCompleted(object sender, SceneConfigurationCompletedEventArgs e) { if (e.Scene != null) { //注册场景 SceneManager.RegisterScene(e.Scene); ScenesListView.Items.Clear(); foreach (var item in SceneManager.Scenes.Values) { ScenesListView.Items.Add(item); } } SceneConfigWindow.Close(); }
/// <summary> /// 场景配置完成事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ViewModel_SceneConfigurationCompleted(object sender, SceneConfigurationCompletedEventArgs e) { try { if (e.Scene != null) { //注册场景 SceneManager.RegisterScene(e.Scene); ScenesListView.Items.Clear(); foreach (var item in SceneManager.Scenes.Values) { ScenesListView.Items.Add(item); } } SceneConfigWindow.Close(); } catch (Exception ex) { Logging.Error(ex); MessageBox.Show(ex.Message); } }