public MainWindowViewModel() { BackgroundSetting = new WindowSettingViewModel(UdpSender); LayoutSetting = new LayoutSettingViewModel(UdpSender); LightSetting = new LightSettingViewModel(UdpSender); StartupSetting = new StartupSettingViewModel(); }
public MainWindowViewModel() { Model = new RootSettingSync(MessageSender, MessageIo.Receiver); SettingFileIo = new SettingFileIo(Model, MessageSender); SaveFileManager = new SaveFileManager(SettingFileIo, Model, MessageSender); WindowSetting = new WindowSettingViewModel(Model.Window, MessageSender); MotionSetting = new MotionSettingViewModel(Model.Motion, MessageSender, MessageIo.Receiver); GamepadSetting = new GamepadSettingViewModel(Model.Gamepad, MessageSender); LayoutSetting = new LayoutSettingViewModel(Model.Layout, Model.Gamepad, MessageSender, MessageIo.Receiver); LightSetting = new LightSettingViewModel(Model.Light, MessageSender); WordToMotionSetting = new WordToMotionSettingViewModel(Model.WordToMotion, MessageSender, MessageIo.Receiver); ExternalTrackerSetting = new ExternalTrackerViewModel(Model.ExternalTracker, Model.Motion, MessageSender, MessageIo.Receiver); SettingIo = new SettingIoViewModel(Model, Model.Automation, SaveFileManager, MessageSender); //オートメーションの配線: 1つしかないのでザツにやる。OC<T>をいじる関係でUIスレッド必須なことに注意 Model.Automation.LoadSettingFileRequested += v => Application.Current.Dispatcher.BeginInvoke(new Action( () => SaveFileManager.LoadSetting(v.Index, v.LoadCharacter, v.LoadNonCharacter, true)) ); _runtimeHelper = new RuntimeHelper(MessageSender, MessageIo.Receiver, Model); LoadVrmCommand = new ActionCommand(LoadVrm); LoadVrmByFilePathCommand = new ActionCommand <string>(LoadVrmByFilePath); ConnectToVRoidHubCommand = new ActionCommand(ConnectToVRoidHubAsync); OpenVRoidHubCommand = new ActionCommand(() => UrlNavigate.Open("https://hub.vroid.com/")); AutoAdjustCommand = new ActionCommand(() => MessageSender.SendMessage(MessageFactory.Instance.RequestAutoAdjust())); OpenSettingWindowCommand = new ActionCommand(() => SettingWindow.OpenOrActivateExistingWindow(this)); ResetToDefaultCommand = new ActionCommand(ResetToDefault); LoadPrevSettingCommand = new ActionCommand(LoadPrevSetting); TakeScreenshotCommand = new ActionCommand(_runtimeHelper.TakeScreenshot); OpenScreenshotFolderCommand = new ActionCommand(_runtimeHelper.OpenScreenshotSavedFolder); MessageIo.Receiver.ReceivedCommand += OnReceiveCommand; SaveFileManager.VRoidModelLoadRequested += id => LoadSavedVRoidModel(id, false); }
public DeviceFreeLayoutHelper(LayoutSettingViewModel layout, WindowSettingViewModel window) { _layout = layout; _window = window; }