示例#1
0
    /// <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;
    }
示例#2
0
    /// <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;
    }
示例#3
0
        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);
            }
        }
示例#4
0
        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;
        }
示例#5
0
        /// <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;
            }
        }
示例#7
0
        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;
            }
        }
示例#9
0
 void FetcherOnShowFetched(object sender, ShowFetchedEventArgs e)
 {
     ProgressBarImdbTvShow.Invoke((MethodInvoker)(() => ProgressBarImdbTvShow.Value = e.Count));
     LabelCount.Invoke((MethodInvoker)(() => LabelCount.Text = e.Count.ToString()));
 }