// Update is called once per frame //void Update() //{ // if (Input.GetKeyDown(KeyCode.P)) // { // Screen.fullScreen = !Screen.fullScreen; // } //} /// <summary> /// 获取系统设置 /// </summary> public static void GetSystemSetting() { string path = Application.dataPath + ConfigPath; if (!File.Exists(path)) { CreateSystemSettingXml(); } else { systemSetting = SerializeHelper.DeserializeFromFile <SystemSetting>(path); } Log.Error("SystemSettingHelper.GetSystemSetting" + systemSetting.IsShowLeftTopo); resolutionSetting = systemSetting.ResolutionSetting; cinemachineSetting = systemSetting.CinemachineSetting; communicationSetting = systemSetting.CommunicationSetting; versionSetting = systemSetting.VersionSetting; refreshSetting = systemSetting.RefreshSetting; assetLoadSetting = systemSetting.AssetLoadSetting; honeyWellSetting = systemSetting.HoneyWellSetting; deviceSetting = systemSetting.DeviceSetting; historyPathSetting = systemSetting.HistoryPathSetting; alarmSetting = systemSetting.AlarmSetting; ///如果版本号不一致,自动更新 if (versionSetting.VersionNumber != SystemSettingHelper.instance.versionNum) { versionSetting.VersionNumber = SystemSettingHelper.instance.versionNum; SaveSystemSetting(); } locationSetting = systemSetting.LocationSetting; debugSetting = systemSetting.DebugSetting; }
public async Task <IActionResult> Edit(int id, [Bind("locationIndex,Location")] LocationSetting locationSetting) { if (id != locationSetting.locationIndex) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(locationSetting); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LocationSettingExists(locationSetting.locationIndex)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(locationSetting)); }
public void Execute(object parameter) { var values = (object[])parameter; var content = values[0] as string; var window = values[1] as Window; if (content.Equals("특성 고르기!")) { PersonalSetting personal = new PersonalSetting(); window.Close(); personal.ShowDialog(); } else if (content.Equals("옷 고르기!")) { ClothesSetting clothes = new ClothesSetting(); window.Close(); clothes.ShowDialog(); } else if (content.Equals("위치 선택!")) { LocationSetting location = new LocationSetting(); window.Close(); location.ShowDialog(); } }
public async Task <IActionResult> Create([Bind("locationIndex,Location")] LocationSetting locationSetting) { if (ModelState.IsValid) { _context.Add(locationSetting); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(locationSetting)); }
public SystemSetting() { ResolutionSetting = new ResolutionSetting(); CinemachineSetting = new CinemachineSetting(); CommunicationSetting = new CommunicationSetting(); VersionSetting = new VersionSetting(); RefreshSetting = new RefreshSetting(); AssetLoadSetting = new AssetLoadSetting(); HoneyWellSetting = new HoneyWellSetting(); DeviceSetting = new DeviceSetting(); HistoryPathSetting = new HistoryPathSetting(); LocationSetting = new LocationSetting(); DebugSetting = new DebugSetting(); AlarmSetting = new AlarmSetting(); }