private void AttachmentWindowExecuted(object sender, ExecutedRoutedEventArgs e) { M2AttachmentsWindow window = ShellService.Instance.AttachmentsWindow; if (window.IsVisible) { window.Hide(); } else { window.Show(); window.Update(); } }
private object InitStage2(object frame) { InitCommandBindings(); _characterContent.Initialize(); _npcContent.Initialize(); _mapModelContent.Initialize(); _wmoContent.Initialize(); _worldM2Content.Initialize(); _clothesContent.Initialize(); _weaponContent.Initialize(); _setContent.Initialize(); _ridableContent.Initialize(); _propertyContent.Initialize(); _animationContent.Initialize(); _m2StateContent.Initialize(); _mapModelContent.Hide(); _mapModelNameContent.Hide(); _propertyContent.Hide(); //model mode if (windowhost.HWnd != IntPtr.Zero) { _controlHostElement.Child = windowhost; } _leftDockablePane.SetValue(ResizingPanel.ResizeWidthProperty, new GridLength(280)); _right2DockablePane.SetValue(ResizingPanel.ResizeWidthProperty, new GridLength(250)); _rightDockablePane.SetValue(ResizingPanel.ResizeWidthProperty, new GridLength(300)); _bottomPanel.SetValue(ResizingPanel.ResizeHeightProperty, new GridLength(200)); _bottomDockablePane.SetValue(ResizingPanel.ResizeWidthProperty, new GridLength(1.0f, GridUnitType.Star)); _bottom2DockablePane.SetValue(ResizingPanel.ResizeWidthProperty, new GridLength(0.2f, GridUnitType.Star)); //dialogs _geosetsWindow = new M2GeosetsWindow(); _geosetsWindow.Owner = this; _attachmentsWindow = new M2AttachmentsWindow(); _attachmentsWindow.Owner = this; _groupsWindow = new WMOGroupsWindow(); _groupsWindow.Owner = this; _equipmentsWindow = new M2EquipmentsWindow(); _equipmentsWindow.Owner = this; _equipmentSelectWindow = new M2EquipmentSelectWindow(); _equipmentSelectWindow.Owner = this; _portalsWindow = new WMOPortalsWindow(); _portalsWindow.Owner = this; _characterInfoWindow = new M2CharacterInfoWindow(); _characterInfoWindow.Owner = this; _armoryWindow = new M2ArmoryWindow(); _armoryWindow.Owner = this; _accelerateWindow = new AccelerateWindow(); _accelerateWindow.Owner = this; _characterContent.Activate(); _setContent.Activate(); //set options Engine.Instance.SceneManager.BackImageFileName = ModelEditorService.Instance.BackImageFileName; Engine.Instance.SceneManager.ShowDebug(E_SCENE_DEBUG_PART.ESDP_BASE, ModelEditorService.Instance.IsShow(EditorShowOptions.DebugText)); Engine.Instance.SceneManager.ShowDebug(E_SCENE_DEBUG_PART.ESDP_M2_GEOSETS, ModelEditorService.Instance.IsShow(EditorShowOptions.DebugGeosets)); ModelSceneService.Instance.GridSceneNode.Visible = ModelEditorService.Instance.IsShow(EditorShowOptions.Plane); ModelSceneService.Instance.CoordSceneNode.Visible = ModelEditorService.Instance.IsShow(EditorShowOptions.Coord); ModelSceneService.Instance.LightCoordSceneNode.Visible = ModelEditorService.Instance.IsShow(EditorShowOptions.LightCoord); #if !WOW60 && !WOW50 && !WOW40 && !WOW30 ShellService.Instance.DisableDialogsForWow70(); #endif timer.Start(); ((DispatcherFrame)frame).Continue = false; return(null); }