示例#1
0
        public void Push(int length)
        {
            int           expr_16 = (this.m_Ranges.Count != 0) ? this.PercentComplete : 0;
            ProgressRange item    = new ProgressRange(expr_16, expr_16 + length);

            this.m_Ranges.Add(item);
            this.Check();
        }
示例#2
0
        public void Pop()
        {
            int           index         = this.m_Ranges.Count - 1;
            ProgressRange progressRange = this.m_Ranges[index];

            this.m_Ranges.RemoveAt(index);
            this.m_Ranges[this.m_Ranges.Count - 1].Progress = progressRange.end;
            this.Check();
        }
示例#3
0
        public void Set(long value, long max = 100L)
        {
            value = (long)((int)(value * 100L / max));
            ProgressRange progressRange = this.m_Ranges[this.m_Ranges.Count - 1];
            int           num           = progressRange.end - progressRange.start;

            progressRange.Progress = progressRange.start + (int)(value * (long)num / 100L);
            this.Check();
        }
示例#4
0
        public void Push()
        {
            ProgressRange progressRange = this.m_Ranges[this.m_Ranges.Count - 1];

            this.Push(progressRange.end - progressRange.Progress);
        }