コード例 #1
0
        public static void Execute(GenericMeshImport gmi)
        {
            GenericImportForm f = new GenericImportForm();

            f.gmi = gmi;
            f.Setup();
            f.ShowDialog();
            f.Dispose();
        }
コード例 #2
0
        public MeshListViewItem(ListViewEx lv, Ambertation.Scenes.Mesh mesh, GenericMeshImport gmi, ActionChangedEvent fkt) : base()
        {
            this.fkt  = fkt;
            parent    = lv;
            this.mesh = mesh;
            this.gmi  = gmi;

            cbact = new ComboBox();
            cbact.DropDownStyle         = ComboBoxStyle.DropDownList;
            cbact.SelectedIndexChanged += new EventHandler(cbact_SelectedIndexChanged);
            GenericMeshImport.ImportAction[] acts = (GenericMeshImport.ImportAction[])Enum.GetValues(typeof(GenericMeshImport.ImportAction));
            foreach (GenericMeshImport.ImportAction a in acts)
            {
                cbact.Items.Add(a);
            }
            cbact.SelectedItem = GenericMeshImport.ImportAction.Add;

            cbgroup = new ComboBox();
            cbgroup.DropDownStyle = ComboBoxStyle.DropDownList;
            cbgroup.Items.Add("[" + SimPe.Localization.GetString("none") + "]");
            foreach (GmdcGroup g in gmi.Gmdc.Groups)
            {
                cbgroup.Items.Add(g);
            }
            cbgroup.SelectedItem = 0;

            cbenv           = new Ambertation.Windows.Forms.TransparentCheckBox();
            cbenv.BackColor = Color.Transparent;
            cbenv.Checked   = mesh.Envelopes.Count > 0;


            int i = gmi.Gmdc.FindGroupByName(mesh.Name);

            if (i >= 0)
            {
                Group  = gmi.Gmdc.Groups[i];
                Action = GenericMeshImport.ImportAction.Replace;
            }

            Setup();
            parent.Items.Add(this);
            parent.AddEmbeddedControl(cbact, 1, parent.Items.Count - 1);
            parent.AddEmbeddedControl(cbgroup, 2, parent.Items.Count - 1);
            parent.AddEmbeddedControl(cbenv, 5, parent.Items.Count - 1);
        }
コード例 #3
0
        public virtual void Dispose()
        {
            if (cbact != null)
            {
                cbact.SelectedIndexChanged -= new EventHandler(cbact_SelectedIndexChanged);
                cbact.Dispose();
            }
            cbact = null;

            if (cbgroup != null)
            {
                cbgroup.Dispose();
            }

            parent = null;
            joint  = null;
            gmi    = null;
            fkt    = null;
        }
コード例 #4
0
        public BoneListViewItem(ListViewEx lv, Ambertation.Scenes.Joint joint, GenericMeshImport gmi, ActionChangedEvent fkt) : base()
        {
            this.fkt   = fkt;
            parent     = lv;
            this.joint = joint;
            this.gmi   = gmi;

            cbact = new ComboBox();
            cbact.DropDownStyle         = ComboBoxStyle.DropDownList;
            cbact.SelectedIndexChanged += new EventHandler(cbact_SelectedIndexChanged);
            GenericMeshImport.JointImportAction[] acts = (GenericMeshImport.JointImportAction[])Enum.GetValues(typeof(GenericMeshImport.JointImportAction));
            foreach (GenericMeshImport.JointImportAction a in acts)
            {
                cbact.Items.Add(a);
            }
            cbact.SelectedItem = GenericMeshImport.JointImportAction.Ignore;

            cbgroup = new ComboBox();
            cbgroup.DropDownStyle = ComboBoxStyle.DropDownList;
            cbgroup.Items.Add("[" + SimPe.Localization.GetString("none") + "]");
            foreach (GmdcJoint j in gmi.Gmdc.Joints)
            {
                cbgroup.Items.Add(j);
            }
            cbgroup.SelectedItem = 0;


            int i = gmi.Gmdc.FindJointByName(joint.Name);

            if (i >= 0)
            {
                Joint  = gmi.Gmdc.Joints[i];
                Action = GenericMeshImport.JointImportAction.Update;
            }

            Setup();
            parent.Items.Add(this);
            parent.AddEmbeddedControl(cbact, 1, parent.Items.Count - 1);
            parent.AddEmbeddedControl(cbgroup, 2, parent.Items.Count - 1);
        }
コード例 #5
0
 public MeshListViewItemExt(ListViewEx lv, Ambertation.Scenes.Mesh mesh, GenericMeshImport gmi, ActionChangedEvent fkt)
     : base(lv, mesh, gmi, fkt)
 {
 }
コード例 #6
0
 public BoneListViewItemExt(ListViewEx lv, Ambertation.Scenes.Joint joint, GenericMeshImport gmi, ActionChangedEvent fkt)
     : base(lv, joint, gmi, fkt)
 {
 }