/// <summary> /// 停止牌桌倒计时 /// </summary> /// <param name="go">Go.</param> /// <param name="str">String.</param> public static void StopLabelCount(GameObject go, string str) { LabelCount lc = MonoExtendUtil.GetOrAddComponent <LabelCount>(go); lc.label.text = str; lc.enabled = false; }
/// <summary> /// 牌桌倒计时 /// </summary> /// <param name="go">Go.</param> /// <param name="start">开始Date.</param> /// <param name="stop">结束Date.</param> /// <param name="speed">间隔速度.</param> public static void SetCountLabelTime(GameObject go, int start, int stop, int speed) { LabelCount lc = MonoExtendUtil.GetOrAddComponent <LabelCount>(go); lc.enabled = false; lc.startTime = start; lc.stopTime = stop; lc.speed = speed; lc.enabled = true; }
private void RenderItemLabelsContinuous(VisualPayload payload, List <ICriterionMetaSelector> criteria) { if (MinValue.UseLiteralValue) { MinimumValue = MinValue.GetLastKeyValue(payload.Data); } else { var entries = MinValue.GetEntries(payload.Data); MinimumValue = entries.Min(e => MinValue.GetValue(e)); } if (MaxValue.UseLiteralValue) { MaximumValue = MaxValue.GetLastKeyValue(payload.Data); } else { var entries = MaxValue.GetEntries(payload.Data); MaximumValue = entries.Max(e => MaxValue.GetValue(e)); } var numLabels = LabelCount.GetLastKeyValue(payload.Data); var totalLength = AxisLength.GetLastKeyValue(payload.Data); if (numLabels > 0) { float sizePeriod; if (numLabels > 1) { sizePeriod = totalLength / (float)(numLabels - 1); } else { sizePeriod = totalLength; } foreach (var criterion in criteria) { var rangeCriterion = criterion as CriterionRangeMetaSelector; if (rangeCriterion == null) { return; } rangeCriterion.RangeWidth = (MaximumValue - MinimumValue) / ((numLabels - 1) * 2f); } RenderItemLabelsInternal(payload, numLabels, sizePeriod, 0.0f, false, criteria); } }
public override void SetInputModelValues() { OrganizationUidInput.Value = OrganizationUid.ToUidString(); CloningProjectUidInput.Value = CloningProjectUid.ToUidString(); NameInput.Value = Name; UrlInput.Value = Url; DescriptionInput.Value = Description; LabelCountInput.Value = LabelCount.ToString(); LabelTranslationCountInput.Value = LabelTranslationCount.ToString(); IsSuperProjectInput.Value = IsSuperProject; }
/// <summary> /// Compares the current instance with another name and returns an integer that indicates whether the current instance /// precedes, follows, or occurs in the same position in the sort order as the other name. /// </summary> /// <param name="other">A name to compare with this instance.</param> /// <returns>A value that indicates the relative order of the objects being compared.</returns> public int CompareTo(DomainName other) { for (int i = 1; i <= Math.Min(LabelCount, other.LabelCount); i++) { int labelCompare = String.Compare(Labels[LabelCount - i].ToLowerInvariant(), other.Labels[other.LabelCount - i].ToLowerInvariant(), StringComparison.Ordinal); if (labelCompare != 0) { return(labelCompare); } } return(LabelCount.CompareTo(other.LabelCount)); }
void ReleaseDesignerOutlets() { if (LabelCount != null) { LabelCount.Dispose(); LabelCount = null; } if (LabelLunch != null) { LabelLunch.Dispose(); LabelLunch = null; } }
public async Task LabelCountDAOSave() { //setup LabelCount label = new LabelCount(); label.TimeStamp = DateTime.UtcNow; label.Label = "IntegrationTest"; label.Count = 11; //act await labelCountDAO.Save(label); // assert this.iHttpHandler.Verify(x => x.PostAsync(It.IsAny <Uri>(), It.IsAny <StringContent>()), Times.AtLeastOnce); }
void ReleaseDesignerOutlets() { if (LabelCount != null) { LabelCount.Dispose(); LabelCount = null; } if (LabelTimespan != null) { LabelTimespan.Dispose(); LabelTimespan = null; } if (LabelTrip != null) { LabelTrip.Dispose(); LabelTrip = null; } }
void FetcherOnShowFetched(object sender, ShowFetchedEventArgs e) { ProgressBarImdbTvShow.Invoke((MethodInvoker)(() => ProgressBarImdbTvShow.Value = e.Count)); LabelCount.Invoke((MethodInvoker)(() => LabelCount.Text = e.Count.ToString())); }