public AttackVariation convertFrom(string value) { if (value.Equals(new AttackVariation().mDescription)) { return(new AttackVariation()); } else { SynthesizerType type = SynthesizerType.VOCALOID2; VsqFileEx vsq = AppManager.getVsqFile(); if (vsq != null) { string svalue = (string)value; foreach (var aconfig in VocaloSysUtil.attackConfigIterator(type)) { string display_string = aconfig.getDisplayString(); if (svalue.Equals(display_string)) { return(new AttackVariation(display_string)); } } } return(new AttackVariation()); } }
public List <Object> getStandardValues() { SynthesizerType type = SynthesizerType.VOCALOID2; VsqFileEx vsq = AppManager.getVsqFile(); List <Object> list = new List <Object>(); list.Add(new AttackVariation()); foreach (var aconfig in VocaloSysUtil.attackConfigIterator(type)) { list.Add(new AttackVariation(aconfig.getDisplayString())); } return(list);//new StandardValuesCollection( list.toArray( new AttackVariation[] { } ) ); }
public FormNoteExpressionConfig(SynthesizerType type, NoteHeadHandle note_head_handle) { InitializeComponent(); registerEventHandlers(); setResources(); Util.applyFontRecurse(this, AppManager.editorConfig.getBaseFont()); applyLanguage(); if (note_head_handle != null) { m_note_head_handle = (NoteHeadHandle)note_head_handle.clone(); } if (type == SynthesizerType.VOCALOID1) { flowLayoutPanel.Controls.Remove(groupDynamicsControl); flowLayoutPanel.Controls.Remove(panelVocaloid2Template); flowLayoutPanel.Controls.Remove(groupPitchControl); } else { flowLayoutPanel.Controls.Remove(groupAttack); } //comboAttackTemplateを更新 NoteHeadHandle empty = new NoteHeadHandle(); comboAttackTemplate.Items.Clear(); empty.IconID = "$01010000"; empty.setCaption("[Non Attack]"); comboAttackTemplate.Items.Add(empty); comboAttackTemplate.SelectedItem = empty; string icon_id = ""; if (m_note_head_handle != null) { icon_id = m_note_head_handle.IconID; txtDuration.Text = m_note_head_handle.getDuration() + ""; txtDepth.Text = m_note_head_handle.getDepth() + ""; } else { txtDuration.Enabled = false; txtDepth.Enabled = false; trackDuration.Enabled = false; trackDepth.Enabled = false; } foreach (var item in VocaloSysUtil.attackConfigIterator(SynthesizerType.VOCALOID1)) { comboAttackTemplate.Items.Add(item); if (item.IconID.Equals(icon_id)) { comboAttackTemplate.SelectedItem = comboAttackTemplate.Items[comboAttackTemplate.Items.Count - 1]; } } comboAttackTemplate.SelectedIndexChanged += new EventHandler(comboAttackTemplate_SelectedIndexChanged); comboTemplate.Items.Clear(); string[] strs = new string[] { "[Select a template]", "normal", "accent", "strong accent", "legato", "slow legate", }; for (int i = 0; i < strs.Length; i++) { comboTemplate.Items.Add(strs[i]); } Size current_size = this.ClientSize; this.ClientSize = new Size(current_size.Width, flowLayoutPanel.ClientSize.Height + flowLayoutPanel.Top * 2); this.FormBorderStyle = FormBorderStyle.FixedDialog; }