Exemplo n.º 1
0
 private void UpdateUI(IndexBufferPtrController indexBufferPtrController)
 {
     if (indexBufferPtrController is ZeroIndexBufferPtrController)
     {
         this.lblFirst.Text      = "First Vertex:";
         this.lblCount.Text      = "Vertex Count:";
         this.trackFirst.Minimum = 0;
         this.trackFirst.Maximum = indexBufferPtrController.Count();
         this.trackFirst.Value   = indexBufferPtrController.First();
         this.trackCount.Minimum = 0;
         this.trackCount.Maximum = indexBufferPtrController.Count();
         this.trackCount.Value   = indexBufferPtrController.Count();
         this.lblFirstValue.Text = this.trackFirst.Value.ToString();
         this.lblCountValue.Text = this.trackCount.Value.ToString();
         this.Text = string.Format("{0}", this.controller);
     }
     else if (indexBufferPtrController is OneIndexBufferPtrController)
     {
         this.lblFirst.Text      = "First Index:";
         this.lblCount.Text      = "Element Count:";
         this.trackFirst.Minimum = 0;
         this.trackFirst.Maximum = indexBufferPtrController.Count();
         this.trackFirst.Value   = indexBufferPtrController.First();
         this.trackCount.Minimum = 0;
         this.trackCount.Maximum = indexBufferPtrController.Count();
         this.trackCount.Value   = indexBufferPtrController.Count();
         this.lblFirstValue.Text = this.trackFirst.Value.ToString();
         this.lblCountValue.Text = this.trackCount.Value.ToString();
     }
     else
     {
         throw new NotImplementedException();
     }
 }
Exemplo n.º 2
0
        private void UpdateUI(IndexBufferPtrController indexBufferPtrController)
        {
            int index = -1;

            foreach (var item in this.cmbDrawMode.Items)
            {
                index++;
                if ((DrawMode)item == indexBufferPtrController.IndexBufferPtr.Mode)
                {
                    this.cmbDrawMode.SelectedIndex = index;
                    break;
                }
            }

            if (indexBufferPtrController is ZeroIndexBufferPtrController)
            {
                this.lblFirst.Text      = "First Vertex:";
                this.lblCount.Text      = "Vertex Count:";
                this.trackFirst.Minimum = 0;
                this.trackFirst.Maximum = indexBufferPtrController.OriginalCount();
                this.trackFirst.Value   = indexBufferPtrController.First();
                this.trackCount.Minimum = 0;
                this.trackCount.Maximum = indexBufferPtrController.OriginalCount();
                this.trackCount.Value   = indexBufferPtrController.Count();
                this.lblFirstValue.Text = this.trackFirst.Value.ToString();
                this.lblCountValue.Text = this.trackCount.Value.ToString();
                this.Text = string.Format("{0}", this.controller);
            }
            else if (indexBufferPtrController is OneIndexBufferPtrController)
            {
                this.lblFirst.Text      = "First Index:";
                this.lblCount.Text      = "Element Count:";
                this.trackFirst.Minimum = 0;
                this.trackFirst.Maximum = indexBufferPtrController.OriginalCount();
                this.trackFirst.Value   = indexBufferPtrController.First();
                this.trackCount.Minimum = 0;
                this.trackCount.Maximum = indexBufferPtrController.OriginalCount();
                this.trackCount.Value   = indexBufferPtrController.Count();
                this.lblFirstValue.Text = this.trackFirst.Value.ToString();
                this.lblCountValue.Text = this.trackCount.Value.ToString();
            }
            else
            {
                throw new NotImplementedException();
            }
        }