public Scene(MainWindow wnd) { wnd_ = wnd; name_ = "Scene"; skybox_name_ = ""; active_camera_id_ = 0; var category_list = new SceneEntityViewModel[3]; var entity = new SceneEntity(); entity.Id = 0; entity.Name = "Models"; entity.Type = SceneEntityType.ET_Model; category_list[0] = new SceneEntityViewModel(wnd, entity); entity = new SceneEntity(); entity.Id = 0; entity.Name = "Lights"; entity.Type = SceneEntityType.ET_Light; category_list[1] = new SceneEntityViewModel(wnd, entity); entity = new SceneEntity(); entity.Id = 0; entity.Name = "Cameras"; entity.Type = SceneEntityType.ET_Camera; category_list[2] = new SceneEntityViewModel(wnd, entity); scene_entity_category_ = new ReadOnlyCollection <SceneEntityViewModel>(category_list); }
public MainWindow() { InitializeComponent(); DataContext = this; var category_list = new SceneEntityViewModel[3]; var entity = new SceneEntity(); entity.ID = 0; entity.Name = "Models"; entity.Type = KGEditorCoreWrapper.EntityType.ET_Model; category_list[0] = new SceneEntityViewModel(this, entity); entity = new SceneEntity(); entity.ID = 0; entity.Name = "Lights"; entity.Type = KGEditorCoreWrapper.EntityType.ET_Light; category_list[1] = new SceneEntityViewModel(this, entity); entity = new SceneEntity(); entity.ID = 0; entity.Name = "Cameras"; entity.Type = KGEditorCoreWrapper.EntityType.ET_Camera; category_list[2] = new SceneEntityViewModel(this, entity); scene_entity_category_ = new ReadOnlyCollection<SceneEntityViewModel>(category_list); CameraItemsSource.items.Clear(); CameraItemsSource.items.Add("System"); system_properties_obj_.ActiveCamera = CameraItemsSource.items[0].Value as string; system_properties_obj_.SSVO = true; system_properties_obj_.HDR = true; system_properties_obj_.AA = true; system_properties_obj_.Gamma = true; system_properties_obj_.ColorGrading = true; properties.SelectedObject = system_properties_obj_; save.IsEnabled = false; save_as.IsEnabled = false; undo.IsEnabled = false; redo.IsEnabled = false; Uri iconUri = new Uri("pack://application:,,,/Images/klayge_logo.ico", UriKind.RelativeOrAbsolute); this.Icon = BitmapFrame.Create(iconUri); }