private void Ready(Vector3 position, Vector3 rotation) { Status = FeatureStatus.Ready; origin = home; destination = position; this.angle = rotation.y > 180 ? rotation.y - 360 : rotation.y; Vector3 angle = Quaternion.LookRotation(home, position).eulerAngles; offset = Vector3.zero; offset.x += distance * Mathf.Sin(angle.y * Mathf.Deg2Rad); offset.y += height; offset.z += distance * Mathf.Cos(angle.y * Mathf.Deg2Rad); camera.localPosition = offset; platform.transform.eulerAngles = Vector3.zero; SetActive(true); Status = FeatureStatus.Follow; }
protected void RefreshFeatureNode(FeatureInfo feature, TreeNode node, FeatureStatus status) { node.ToolTipText = TooltipHelper.CreateFeatureTooltip(feature); node.ForeColor = ConverterUtil.GetStatusColor(status); node.ImageKey = GetImageKey(status); node.SelectedImageKey = node.ImageKey; }
public FeatureFlagsFeatureViewModel( string name, FeatureStatus status) { Name = name; Status = status; }
internal void Merge(FeatureLevel other) { IsExperimental |= other.IsExperimental; SupportsFrameLevelMultithreading = (FeatureStatus)Math.Max((int)SupportsFrameLevelMultithreading, (int)other.SupportsFrameLevelMultithreading); SupportsSliceLevelMultithreading = (FeatureStatus)Math.Max((int)SupportsSliceLevelMultithreading, (int)other.SupportsSliceLevelMultithreading); SupportsDrawHorizBand = (FeatureStatus)Math.Max((int)SupportsDrawHorizBand, (int)other.SupportsDrawHorizBand); SupportsDirectRendering = (FeatureStatus)Math.Max((int)SupportsDirectRendering, (int)other.SupportsDirectRendering); }
public static AuditedFeatureFlagFeature CreateFrom(string name, FeatureStatus status) { return(new AuditedFeatureFlagFeature { Name = name, Status = status }); }
public override int GetHashCode() { unchecked { int result = (FeatureDescription != null ? FeatureDescription.GetHashCode() : 0); result = (result * 397) ^ (FeatureStatus != null ? FeatureStatus.GetHashCode() : 0); result = (result * 397) ^ (FeatureId != null ? FeatureId.GetHashCode() : 0); return(result); } }
public override int GetHashCode() { unchecked { int result = FeatureDescription?.GetHashCode() ?? 0; result = (result * 397) ^ (FeatureStatus?.GetHashCode() ?? 0); result = (result * 397) ^ (FeatureId?.GetHashCode() ?? 0); return(result); } }
private void Binding_Format(object sender, ConvertEventArgs e) { FeatureStatus featureStatus = FeatureStatus.Unknown; if (e.Value != null && typeof(bool).IsAssignableFrom(e.Value.GetType())) { featureStatus = (((bool)e.Value) ? FeatureStatus.Enabled : FeatureStatus.Disabled); } e.Value = featureStatus; }
private void AddAudit(Guid featureId, FeatureStatus status, bool? value = null) { _connection.Execute( "insert into FeatureToggleAudit (Id, Status, Enable, ModificationDate) values (@Id, @Status, @Enable, @ModificationDate)", new { Id = featureId, Status = status, Enable = value, ModificationDate = DateTime.Now }); }
private void SetCurrentFeatureStatus(FeatureStatus status) { this.CurrentFeature.Status = status; bool flag = FeatureStatus.Enabled == status; this.enableButton.Enabled = !flag; this.disableButton.Enabled = flag; this.SetPropertyButtonEnabled(); this.featureListView.Sort(); base.NotifyExposedPropertyIsModified(this.CurrentFeature.StatusBindingName); }
public Task ReturnsViewWithFailureForExisting(bool hasLastUpdated, FeatureStatus status) { var model = new ModifyFeatureFlagsFlightViewModel { Name = Flight1Name, ContentId = "c" }; return(AssertFailure( hasLastUpdated, model, GetTryAddExistingErrorMessage(model))); }
public Task ReturnsViewWithFailureForMissing(bool hasLastUpdated, FeatureStatus status) { var model = new ModifyFeatureFlagsFeatureViewModel { Name = "MissingFeature", Status = status, ContentId = "c" }; return(AssertFailure( hasLastUpdated, model, GetTryDeleteMissingErrorMessage(model))); }
private void Feature() { step += Time.deltaTime * speed; progress = step; rotation = Mathf.Lerp(0, angle, progress) * Vector3.up; platform.transform.eulerAngles = rotation; if (step >= 1) { Status = FeatureStatus.End; } }
private void HighlightFeature(FeatureInfo featureInfo, FeatureStatus status) { this.InvokeIfRequired((() => { if (!mChildNodes.ContainsKey(featureInfo)) { return; } foreach (var node in mChildNodes[featureInfo]) { RefreshFeatureNode(featureInfo, node, status); } })); }
public Task ReturnsViewWithFailureForMissing(bool hasLastUpdated, FeatureStatus status) { var model = new ModifyFeatureFlagsFlightViewModel { Name = "MissingFlight", All = true, SiteAdmins = true, Accounts = new[] { ExistingAccount }, Domains = new[] { "a.com", "b.com" }, ContentId = "c" }; return(AssertFailure( hasLastUpdated, model, GetTryDeleteMissingErrorMessage(model))); }
public static Color GetColor(this FeatureStatus status) { switch (status) { case FeatureStatus.Supported: return(Color.Green); case FeatureStatus.NotSupported: return(Color.Red); case FeatureStatus.Undefined: return(Color.Gray); default: throw new ArgumentOutOfRangeException("status"); } }
protected String GetImageKey(FeatureStatus status) { switch (status) { case FeatureStatus.Supported: return(IMG_SUPPORTED); case FeatureStatus.NotSupported: return(IMG_NOTSUPPORTED); case FeatureStatus.Undefined: return(IMG_UNDEFINED); default: throw new ArgumentOutOfRangeException("status"); } }
/// <summary> /// Sets the bluetooth feature on/off. /// </summary> /// <param name="status">Status of the bluetooth to be set.</param> /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation.</exception> public void ManageBluetooth(FeatureStatus status) { int ret = -1; if (status == FeatureStatus.Off) { ret = Interop.CallManager.BluetoothOff(_handle); } else if (status == FeatureStatus.On) { ret = Interop.CallManager.BluetoothOn(_handle); } if (ret != (int)CmError.None) { Log.Error(CmUtility.LogTag, "Failed to manage bluetooth, Error: " + (CmError)ret); CmUtility.ThrowCmException(ret, _handle); } }
private void Follow() { step += Time.deltaTime * speed; progress = curve.Evaluate(step); position = Vector3.Lerp(origin, destination, progress); rotation = Quaternion.LookRotation(position + offset, destination).eulerAngles; rotation.z = ZERO; camera.eulerAngles = rotation; platform.transform.position = position; if (step >= 1) { Status = FeatureStatus.Feature; } }
private void Start() { Status = FeatureStatus.Idle; SetActive(false); }
// Extension methods public static bool IsEnabled(this FeatureStatus status, UserAccount account = null) => default;
public static bool IsEnabled(this FeatureStatus status, bool isAdmin) => default;
public static void AssertIsEnabled(this FeatureStatus status, bool isAdmin, string featureName) { }
/// <summary> /// Returns the features that match the sent-in <paramref name="status"/> /// </summary> /// <param name="status">the status that sent-in features should match</param> /// <returns>features matching the status</returns> public IList<Feature> ByStatus(FeatureStatus status) { return (from f in _featureDb where f.Status == status select f).ToList(); }
public void WriteOptionStatus(FeatureStatus value) => Write((ushort)value);
public static void AssertIsEnabled(this FeatureStatus status, UserAccount account, string featureName) { }
public IQueryable <Feature> GetAllByStatus(FeatureStatus featureStatus) { return(_context.Features.Where(x => x.Status == featureStatus)); }
public static Color GetStatusColor(FeatureStatus status) { return(status.GetColor()); }
public FeatureFlagStateBuilder WithFeature(string name, FeatureStatus status) { _features[name] = status; return(this); }
public IQueryable <Feature> GetByStatus(FeatureStatus featureStatus, int listSize) { return(_context.Features.Where(x => x.Status == featureStatus).OrderByDescending(f => f.FeatureId).Take(listSize)); }