public RestartData(int restartHour, int restartMinute, RestartType restartType, int minuteWarning) { RestartHour = restartHour; RestartMinute = restartMinute; RestartType = restartType; MinuteWarning = minuteWarning; }
public WindowsFeature(DismFeatureInfo feature) { this._featureName = feature.FeatureName; this._featureState = feature.FeatureState; this._displayName = feature.DisplayName; this._description = feature.Description; this._restartRequired = feature.RestartRequired; this._customProperties = Utilites.PtrToArray <DismCustomProperty>( feature.CustomProperty, feature.CustomPropertyCount ).ToDictionary( f => string.Format("{0}\\{1}", f.Path, f.Name), f => f.Value ); }
public void SetControlPoints(RestartType restart = RestartType.FullRestart, params object[] controlPoints) { if (controlPoints?.Length > 0) { this.ControlPoints = controlPoints; } for (var i = 0; i < this.ControlPoints.Length; i = i + 2) { var index = (uint)(int)this.ControlPoints[i]; var controlPoint = this.ControlPoints[i + 1]; if (controlPoint is float) { this.Effect.SetControlPoint(index, new Vector3((float)controlPoint, 255, 0)); } else if (controlPoint is Color) { var controlPointAsColor = (Color)controlPoint; this.Effect.SetControlPoint(index, new Vector3(controlPointAsColor.R, controlPointAsColor.G, controlPointAsColor.B)); } else if (controlPoint is bool) { this.Effect.SetControlPoint(index, (bool)controlPoint ? new Vector3(1, 0, 0) : Vector3.Zero); } else if (controlPoint is Vector3) { this.Effect.SetControlPoint(index, (Vector3)controlPoint); } } if (restart == RestartType.FullRestart) { this.Effect.FullRestart(); } else if (restart == RestartType.NormalRestart) { this.Effect.Restart(); } }
private static void Execute(RestartType restartType) { ThreadHelper.ThrowIfNotOnUIThread(); _openInSafeMode = false; switch (restartType) { case RestartType.Normal: ((IVsShell3)_shell).IsRunningElevated(out var elevated); __VSRESTARTTYPE type = elevated ? __VSRESTARTTYPE.RESTART_Elevated : __VSRESTARTTYPE.RESTART_Normal; _shell.Restart((uint)type); break; case RestartType.Elevated: _shell.Restart((uint)__VSRESTARTTYPE.RESTART_Elevated); break; case RestartType.Safemode: _openInSafeMode = true; _dte.ExecuteCommand("File.Exit"); break; } }
public WindowsPackage(DismPackageInfo pkg) { this._packageName = pkg.PackageName; this._packageState = pkg.PackageState; this._releaseType = pkg.ReleaseType; this._installTime = pkg.InstallTime.ToDateTime(); this._applicable = pkg.Applicable; this._copyright = pkg.Copyright; this._company = pkg.Company; this._creationTime = pkg.CreationTime.ToDateTime(); this._displayName = pkg.DisplayName; this._description = pkg.Description; this._installClient = pkg.InstallClient; this._installPackageName = pkg.InstallPackageName; this._lastUpdatedTime = pkg.LastUpdateTime.ToDateTime(); this._productName = pkg.ProductName; this._productVersion = pkg.ProductVersion; this._restartRequired = pkg.RestartRequired; this._fullyOffline = pkg.FullyOffline; this._supportInformation = pkg.SupportInformation; this._customProperties = Utilites.PtrToArray <DismCustomProperty>( pkg.CustomProperty, pkg.CustomPropertyCount ).ToDictionary( p => string.Format("{0}\\{1}", p.Path, p.Name), p => p.Value ); this._features = new Collection <WindowsFeature>( Utilites.PtrToArray <DismFeature>( pkg.Feature, pkg.FeatureCount ) .Select(f => new WindowsFeature(f)) .ToList() ); }
public void AddOrUpdate(Entity unit, string name, string file, ParticleAttachment attachment, RestartType restart = RestartType.FullRestart, params object[] controlPoints) { if (unit == null) { throw new ArgumentNullException(nameof(unit)); } if (!unit.IsValid) { throw new ArgumentException("Value should be valid.", nameof(unit)); } if (name == null) { throw new ArgumentNullException(nameof(name)); } if (file == null) { throw new ArgumentNullException(nameof(file)); } var particle = Particles.FirstOrDefault(p => p.Name == name); if (particle == null) { Particles.Add(new ParticleEffectContainer(name, file, unit, attachment, controlPoints)); } else { // parts changed if (particle.Unit != unit || particle.File != file || particle.Attachment != attachment) { particle.Dispose(); Particles.Remove(particle); Particles.Add(new ParticleEffectContainer(name, file, unit, attachment, controlPoints)); return; } // control points changed // var hash = controlPoints.Sum(p => p.GetHashCode()); var hash = controlPoints.Aggregate(0, (sum, p) => unchecked (sum + p.GetHashCode())); if (particle.GetControlPointsHashCode() != hash) { particle.SetControlPoints(restart, controlPoints); } } }
public RefreshRequiredAttribute(RestartType type = RestartType.None) => this.Type = type;
/// <summary> 회군 후 재시작. 1: 일반, 2: 강화석 2배 획득 </summary> public IEnumerator Restart(RestartType restartType) { LoadingManager.Show(); string result = null; string php = "Battle.php"; WWWForm form = new WWWForm(); form.AddField("type", (int)restartType); form.AddField("userID", User.Instance.userID); form.AddField("enhanceType", GameDataManager.dungeonBaseDataDic[dungeonID].dropItemID); form.AddField("stage", stage); //유물에 의한 획득량 보정. 유물 스택값을 서버로 보냄 int artifactStack = 0; Artifact artifact = artifactController.artifactList.Find(x => x.baseData.type == "IncreaseEnhanceStone"); if (artifact != null) { artifactStack = artifact.stack; } form.AddField("artifactStack", artifactStack); //서버 통신 & 결과 대기 yield return(StartCoroutine(WebServerConnectManager.Instance.WWWCoroutine(php, form, x => result = x))); Debug.Log(result); if (result == "false") { LoadingManager.Close(); UIPopupManager.ShowOKPopup("", "루비가 부족합니다.", null); yield break; } if (DailyMissionManager.Instance && DailyMissionManager.Instance.retreatCount < 3) { DailyMissionManager.Instance.retreatCount += 1; StartCoroutine(DailyMissionManager.Instance.SetDailyMission(DailyMissionType.Retreat)); } if (UserQuestManager.Instance && UserQuestManager.Instance.retreatCount < 1) { UserQuestManager.Instance.retreatCount += 1; StartCoroutine(UserQuestManager.Instance.SetUserQuest(UserQuestType.Retreat)); } if (UserQuestManager.Instance && UserQuestManager.Instance.dungeonArrivalCount < 30 && stage > 300) { UserQuestManager.Instance.dungeonArrivalCount += 1; StartCoroutine(UserQuestManager.Instance.SetUserQuest(UserQuestType.DungeonArrival)); } LoadingManager.Close(); //배틀 그룹 전투 프로세서 종료 StopBattle(); //재시작 ReStartBattle(); //정보화면 초기화 UIBattleInfo.InitDungeonInfo(); }