public MainViewModel() { var hwnd = new HwndSource(0, 0, 0, 0, 0, "HwndSource for MainViewModel", IntPtr.Zero); Framework = new Framework(hwnd.Handle, 0, 0, RenderSettings.MediaPath); Framework.AssetManager.RegisterAssetFactory(new LayoutFactory()); // View-models ErrorListViewModel = new ErrorListViewModel(); OutputViewModel = new OutputViewModel(); StatusBarViewModel = new StatusBarViewModel(); // Commands ExitCommand = new DelegateCommand(() => Application.Current.Shutdown()); ShowAssetBrowserCommand = new DelegateCommand(() => DocumentService.ShowDocument(AssetBrowserDoc, false)); ExecuteBitmapFontBuilderCommand = new DelegateCommand(() => Process.Start(Settings.BitmapFontBuilderPath)); // Services StatusBarService.SetStatusBarViewModel(StatusBarViewModel); StatusBarService.StatusText = "Ready"; }
public static void SetStatusBarViewModel(StatusBarViewModel vm) { statusBarViewModel = vm; }