private void MeshModel_OnElementLoaded(int percentageOfTotal, ElementMesh element)
        {
            if (this.progressBar.InvokeRequired)
            {
                this.progressBar.Invoke(new Action(delegate { this.progressBar.Value = percentageOfTotal; }));
            }
            string name = "Elements";

            switch (element)
            {
            case ElementMesh.Vertex:
                name = "Vertices";
                break;

            case ElementMesh.VextexIndice:
                name = "Triangles";
                break;

            case ElementMesh.VertexNormal:
                name = "Vertices Normals";
                break;
            }
            if (this.lblInfo.InvokeRequired)
            {
                this.lblInfo.Invoke(
                    new Action(
                        delegate { this.lblInfo.Text = string.Format("Loading {0}... {1}%", name, percentageOfTotal); }));
            }
        }
Esempio n. 2
0
 private void TriangleModel_OnElementLoaded(int percentageOfTotal, ElementMesh element)
 {
     if (this.OnElementLoaded != null)
     {
         this.OnElementLoaded(percentageOfTotal, element);
     }
 }
 private void MeshModel_OnElementLoaded(int percentageOfTotal, ElementMesh element)
 {
     if (this.progressBar.InvokeRequired) {
         this.progressBar.Invoke(new Action(delegate { this.progressBar.Value = percentageOfTotal; }));
     }
     string name = "Elements";
     switch (element) {
         case ElementMesh.Vertex:
             name = "Vertices";
             break;
         case ElementMesh.VextexIndice:
             name = "Triangles";
             break;
         case ElementMesh.VertexNormal:
             name = "Vertices Normals";
             break;
     }
     if (this.lblInfo.InvokeRequired) {
         this.lblInfo.Invoke(
             new Action(
                 delegate { this.lblInfo.Text = string.Format("Loading {0}... {1}%", name, percentageOfTotal); }));
     }
 }
Esempio n. 4
0
 private void TriangleModel_OnElementLoaded(int percentageOfTotal, ElementMesh element)
 {
     if (this.OnElementLoaded != null)
     {
         this.OnElementLoaded(percentageOfTotal, element);
     }
 }