/// <summary> /// 指定したファイルパスから設定をロードします。 /// </summary> /// <param name="path"></param> /// <param name="mode"></param> /// <param name="content"></param> /// <param name="fromAutomation"></param> public void LoadSetting( string path, SettingFileReadWriteModes mode, SettingFileReadContent content = SettingFileReadContent.All, bool fromAutomation = false ) { if (!File.Exists(path)) { LogOutput.Instance.Write($"Setting file load requested (mode={mode}, but file does not exist at: {path}"); return; } try { //NOTE: ファイルロードではメッセージが凄い量になるので、 //コンポジットして「1つの大きいメッセージ」として書き込むためにこうしてます _sender.StartCommandComposite(); LoadSettingSub(path, mode, content, fromAutomation); _sender.EndCommandComposite(); } catch (Exception ex) { MessageBox.Show($"Failed to load setting file {path} : {ex.Message}"); } }
public void ResetToDefault() { _sender.StartCommandComposite(); AutoLoadLastLoadedVrm.Value = false; LastVrmLoadFilePath = ""; LastLoadedVRoidModelId = ""; Window.ResetToDefault(); Motion.ResetToDefault(); Layout.ResetToDefault(); Gamepad.ResetToDefault(); Light.ResetToDefault(); WordToMotion.ResetToDefault(); ExternalTracker.ResetToDefault(); _sender.EndCommandComposite(); }