Esempio n. 1
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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        public void AddProgressBar(ListViewItem item)
        {
            ProgressBar pb = new ProgressBar();

            pb.Minimum = 0;
            pb.Maximum = 255;
            pb.Step    = 10;
            pb.Value   = 0;
            RSSIListView.Items.Add(item);
            RSSIListView.AddEmbeddedControl(pb, 2, item.Index);
            summary[numReaders].rdrID    = Convert.ToUInt16(item.SubItems[0].Text);
            summary[numReaders].numRuns  = 0;
            summary[numReaders].numPass  = 0;
            summary[numReaders].lowRSSI  = 0;
            summary[numReaders].highRSSI = 0;
            summary[numReaders].aveRSSI  = 0;
            numReaders += 1;
        }