Exemplo n.º 1
0
        private void btnToVIZ_Click(object sender, EventArgs e)
        {
            if (OnToVIZEvent == null)
            {
                return;
            }

            string source = txtSource.Text;
            string output = txtOutput.Text;

            foreach (ListViewItem item in lvFiles.Items)
            {
                ToVIZEventArgs args = new ToVIZEventArgs();
                args.Source = string.Format("{0}\\{1}", txtSource.Text, item.Text);
                args.Output = output;
                args.Mode   = ToVIZMode.EXPORT;

                this.Cursor = Cursors.WaitCursor;
                bool result = OnToVIZEvent(this, args);
                this.Cursor = Cursors.Default;

                lvFiles.Invoke(new EventHandler(delegate
                {
                    item.SubItems[1].Text = result == true ? "OK" : "NG";
                    item.EnsureVisible();
                    lvFiles.Refresh();
                }));
            }
        }
Exemplo n.º 2
0
 private bool FileExplorer_OnToVIZEvent(object sender, ToVIZEventArgs e)
 {
     if (this.InvokeRequired == true)
     {
         DToVIZ call = new DToVIZ(ToVIZ);
         return((bool)this.Invoke(call, new object[] { e.Source, e.Output, e.Mode }));
     }
     else
     {
         return(ToVIZ(e.Source, e.Output, e.Mode));
     }
 }
Exemplo n.º 3
0
 private bool FileExplorer_OnToVIZEvent(object sender, ToVIZEventArgs e)
 {
     if (this.InvokeRequired == true)
     {
         DToVIZ call = new DToVIZ(ToVIZ);
         return((bool)this.Invoke(call, new object[] { e.Source, e.Output, e.Mode, e.MergeMode, e.IncludeEdge, e.Version, e.SimplifiedUnit, e.EnableProgressBar }));
     }
     else
     {
         return(ToVIZ(e.Source, e.Output, e.Mode, e.MergeMode, e.IncludeEdge, e.Version, e.SimplifiedUnit, e.EnableProgressBar));
     }
 }
Exemplo n.º 4
0
        private void btnToVIZ_Click(object sender, EventArgs e)
        {
            if (OnToVIZEvent == null)
            {
                return;
            }

            string source = txtSource.Text;
            string output = txtOutput.Text;

            foreach (ListViewItem item in lvFiles.Items)
            {
                ToVIZEventArgs args = new ToVIZEventArgs();
                args.Source = string.Format("{0}\\{1}", txtSource.Text, item.Text);
                args.Output = output;

                if (rbExport.Checked)
                {
                    args.Mode = ToVIZMode.EXPORT;
                }
                else if (rbConversion.Checked)
                {
                    args.Mode = ToVIZMode.CONVERT;
                }
                else if (rbOutside.Checked)
                {
                    args.Mode = ToVIZMode.OUTSIDE;
                }
                else if (rbSimplified.Checked)
                {
                    args.Mode = ToVIZMode.SIMPLIFIED;
                }
                else
                {
                    args.Mode = ToVIZMode.EXPORT;
                }

                if (rbAsIs.Checked)
                {
                    args.MergeMode = Data.MergeStructureModes.NONE;
                }
                else if (rbLeafAssembly.Checked)
                {
                    args.MergeMode = Data.MergeStructureModes.LEAF_ASM_TO_PART;
                }
                else if (rbPart.Checked)
                {
                    args.MergeMode = Data.MergeStructureModes.ALL_TO_PART;
                }
                else
                {
                    args.MergeMode = Data.MergeStructureModes.NONE;
                }

                args.IncludeEdge = ckIncludeEdge.Checked;

                int nVersion = cbVersion.SelectedIndex;
                if (nVersion == 0)
                {
                    args.Version = Manager.ModelManager.FileVersion.V203;
                }
                else if (nVersion == 1)
                {
                    args.Version = Manager.ModelManager.FileVersion.V204;
                }
                else if (nVersion == 2)
                {
                    args.Version = Manager.ModelManager.FileVersion.V208;
                }
                else if (nVersion == 3)
                {
                    args.Version = Manager.ModelManager.FileVersion.V303;
                }

                this.Cursor = Cursors.WaitCursor;
                bool result = OnToVIZEvent(this, args);
                this.Cursor = Cursors.Default;

                lvFiles.Invoke(new EventHandler(delegate
                {
                    item.SubItems[1].Text = result == true ? "OK" : "NG";
                    item.EnsureVisible();
                    lvFiles.Refresh();
                }));
            }
        }