Beispiel #1
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button4_Click(object sender, EventArgs e)
 {
     if (this.textBox1.Text == String.Empty)
     {
         MessageBox.Show(@"正常按钮图不可以为空");
         return;
     }
     if (this.textBox4.Text == String.Empty)
     {
         MessageBox.Show(@"跳转目标标签不可以为空");
         return;
     }
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditButton(this.numericUpDown3.Value.ToString(), this.numericUpDown1.Value.ToString(),
                                               this.numericUpDown2.Value.ToString(),
                                               this.textBox4.Text, this.comboBox1.SelectedItem.ToString(), this.textBox1.Text,
                                               this.textBox2.Text, this.textBox3.Text);
     }
     else
     {
         Halation.GetInstance().DashButton(this.numericUpDown3.Value.ToString(), this.numericUpDown1.Value.ToString(),
                                           this.numericUpDown2.Value.ToString(),
                                           this.textBox4.Text, this.comboBox1.SelectedItem.ToString(), this.textBox1.Text,
                                           this.textBox2.Text, this.textBox3.Text);
     }
     this.Close();
 }
Beispiel #2
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.textBox1.Text == String.Empty)
     {
         MessageBox.Show(@"目标值不能为空");
         return;
     }
     if (this.propertyItem[this.comboBox2.SelectedIndex] == "opacity" &&
         Double.TryParse(this.textBox1.Text, out double topa) &&
         (topa < 0 || topa > 1))
     {
         MessageBox.Show(@"不透明度的范围是[0, 1]之间的浮点数");
         return;
     }
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditMove(this.comboBox1.SelectedItem.ToString(),
                                             this.numericUpDown1.Value.ToString(), this.numericUpDown3.Value.ToString(),
                                             this.propertyItem[this.comboBox2.SelectedIndex], this.textBox1.Text,
                                             this.numericUpDown2.Value.ToString());
     }
     else
     {
         Halation.GetInstance().DashMove(this.comboBox1.SelectedItem.ToString(),
                                         this.numericUpDown1.Value.ToString(), this.numericUpDown3.Value.ToString(),
                                         this.propertyItem[this.comboBox2.SelectedIndex], this.textBox1.Text,
                                         this.numericUpDown2.Value.ToString());
     }
     this.Close();
 }
Beispiel #3
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.isEditing)
     {
         if (this.Text == "显示对话")
         {
             Halation.GetInstance().DashEditDialog(this.textBox1.Text);
         }
         else
         {
             Halation.GetInstance().DashEditScript(this.textBox1.Text);
         }
     }
     else
     {
         if (this.Text == "显示对话")
         {
             Halation.GetInstance().DashDialog(this.textBox1.Text);
         }
         else
         {
             Halation.GetInstance().DashScript(this.textBox1.Text);
         }
     }
     this.Close();
 }
Beispiel #4
0
        /// <summary>
        /// 按钮:确定
        /// </summary>
        private void button1_Click(object sender, EventArgs e)
        {
            // 检查空值并处理参数
            string argStr = String.Empty;

            for (int i = 0; i < this.argsGridDataView.Rows.Count; i++)
            {
                if (this.argsGridDataView.Rows[i].Cells[1].Value == null ||
                    (string)(this.argsGridDataView.Rows[i].Cells[1].Value) == String.Empty)
                {
                    MessageBox.Show("请完整填写", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    argStr += String.Format(",{0}:{1}", this.argsGridDataView.Rows[i].Cells[0].Value.ToString(),
                                            this.argsGridDataView.Rows[i].Cells[1].Value.ToString());
                }
            }
            if (argStr.Length > 0)
            {
                argStr = argStr.Substring(1);
            }
            // 提交给后台
            if (this.isEditing)
            {
                Halation.GetInstance().DashEditFuncall(this.comboBox1.SelectedItem.ToString(), argStr);
            }
            else
            {
                Halation.GetInstance().DashFuncall(this.comboBox1.SelectedItem.ToString(), argStr);
            }
            // 关闭
            this.Close();
        }
Beispiel #5
0
        /// <summary>
        /// 按钮:确定
        /// </summary>
        private void button1_Click(object sender, EventArgs e)
        {
            // 处理参数列表
            List <string> argvList = new List <string>();
            int           nrows    = this.switchDataGridView.Rows.Count - 1;

            for (int i = 0; i < nrows; i++)
            {
                // 文字不能为空
                if (this.switchDataGridView.Rows[i].Cells[0].Value == null)
                {
                    MessageBox.Show("文本不能为空", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                string branchName = this.switchDataGridView.Rows[i].Cells[0].Value.ToString();
                // 标签不能为空
                if (this.switchDataGridView.Rows[i].Cells[1].Value == null)
                {
                    MessageBox.Show(String.Format("{0} 的标签不能为空", branchName), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                string vartype = this.switchDataGridView.Rows[i].Cells[1].Value.ToString();
                argvList.Add(String.Format("{0},{1}", branchName, vartype));
            }
            if (argvList.Count > 0)
            {
                Halation.GetInstance().DashBranch(argvList);
            }
            this.Close();
        }
 /// <summary>
 /// 重做命令
 /// </summary>
 /// <param name="key">当前代码</param>
 public static void Redo(string key)
 {
     if (HalationInvoker.redoStackDict[key].Count > 0)
     {
         IHalationCommand command = HalationInvoker.redoStackDict[key].Pop();
         command.Dash();
         HalationInvoker.commandStackDict[key].Push(command);
     }
     Halation.GetInstance().RefreshRedoUndo();
 }
Beispiel #7
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.comboBox1.SelectedIndex < 14 && this.textBox1.Text == String.Empty)
     {
         MessageBox.Show("请正确填写目标值");
         return;
     }
     Halation.GetInstance().DashMsgLayerOpt(this.numericUpDown1.Value.ToString(), this.msgLayOptions[this.comboBox1.SelectedIndex], this.textBox1.Text);
     this.Close();
 }
Beispiel #8
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditWait(this.numericUpDown1.Value.ToString());
     }
     else
     {
         Halation.GetInstance().DashWait(this.numericUpDown1.Value.ToString());
     }
     this.Close();
 }
Beispiel #9
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.isEditing == false)
     {
         Halation.GetInstance().DashA(this.comboBox1.SelectedItem.ToString(), this.textBox1.Text, this.numericUpDown1.Value.ToString(), this.textBox2.Text);
     }
     else
     {
         Halation.GetInstance().DashEditA(this.comboBox1.SelectedItem.ToString(), this.textBox1.Text, this.numericUpDown1.Value.ToString(), this.textBox2.Text);
     }
     this.Close();
 }
Beispiel #10
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditJump(this.textBox1.Text, this.comboBox1.SelectedItem.ToString(), this.textBox2.Text);
     }
     else
     {
         Halation.GetInstance().DashJump(this.textBox1.Text, comboBox1.SelectedItem?.ToString() ?? String.Empty, this.textBox2.Text);
     }
     this.Close();
 }
Beispiel #11
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditNotation(this.textBox1.Text);
     }
     else
     {
         Halation.GetInstance().DashNotation(this.textBox1.Text);
     }
     this.Close();
 }
Beispiel #12
0
 /// <summary>
 /// 确定
 /// </summary>
 private void button2_Click(object sender, EventArgs e)
 {
     if (this.textBox1.Text != String.Empty && this.textBox2.Text != String.Empty && !this.textBox2.Text.Contains("\\"))
     {
         Halation.GetInstance().NewProject(this.textBox1.Text, this.textBox2.Text);
         this.Close();
         this.InitSuccess = true;
     }
     else
     {
         MessageBox.Show("请选择文件夹并正确填写工程名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #13
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.textBox1.Text.Trim() == String.Empty)
     {
         MessageBox.Show(@"vid不可以为空");
         return;
     }
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditVocal(this.comboBox1.SelectedItem.ToString(), this.textBox1.Text.Trim());
     }
     else
     {
         Halation.GetInstance().DashVocal(this.comboBox1.SelectedItem.ToString(), this.textBox1.Text.Trim());
     }
     this.Close();
 }
Beispiel #14
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button2_Click(object sender, EventArgs e)
 {
     if (this.textBox1.Text == String.Empty)
     {
         MessageBox.Show(@"请选择图像");
         return;
     }
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditBg(this.radioButton1.Checked ? "0" : "1", this.textBox1.Text, this.textBox2.Text);
     }
     else
     {
         Halation.GetInstance().DashBg(this.radioButton1.Checked ? "0" : "1", this.textBox1.Text, this.textBox2.Text);
     }
     this.Close();
 }
Beispiel #15
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.radioButton5.Checked && this.textBox1.Text.Trim() == String.Empty)
     {
         MessageBox.Show(@"聚焦比不能为空");
         return;
     }
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditSCamera(this.scameraAct,
                                                this.numericUpDown1.Value.ToString(), this.numericUpDown2.Value.ToString(), this.textBox1.Text.Trim());
     }
     else
     {
         Halation.GetInstance().DashSCamera(this.scameraAct,
                                            this.numericUpDown1.Value.ToString(), this.numericUpDown2.Value.ToString(), this.textBox1.Text.Trim());
     }
     this.Close();
 }
Beispiel #16
0
        /// <summary>
        /// 按钮:确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            if (this.textBox1.Text == String.Empty)
            {
                MessageBox.Show("请选择图像");
                return;
            }
            var nameItem = this.textBox1.Text.Split(new char[] { '_', '.' });

            if (this.radioButton1.Checked)
            {
                Halation.GetInstance().DashCstand(this.numericUpDown3.Value.ToString(), nameItem[0], nameItem[1], this.numericUpDown1.Value.ToString(), this.numericUpDown2.Value.ToString(), String.Empty);
            }
            else
            {
                Halation.GetInstance().DashCstand(this.numericUpDown3.Value.ToString(), nameItem[0], nameItem[1], String.Empty, String.Empty, this.numericUpDown4.Value.ToString());
            }
            this.Close();
        }
Beispiel #17
0
        /// <summary>
        /// 按钮:确定
        /// </summary>
        private void button1_Click(object sender, EventArgs e)
        {
            // 开关操作时没有选择就不要应用
            if (this.Text != @"开关管理器" && this.switchDataGridView.SelectedCells.Count < 1)
            {
                return;
            }
            // 更新开关描述
            var desList = new List <string>();

            for (int i = 0; i < Halation.project.Config.GameMaxSwitchCount; i++)
            {
                if (this.switchDataGridView.Rows[i].Cells[1].Value == null)
                {
                    desList.Add(String.Empty);
                }
                else
                {
                    string descript = this.switchDataGridView.Rows[i].Cells[1].Value.ToString();
                    desList.Add(descript);
                }
            }
            Halation.project.SwitchDescriptorList = desList;
            // 开关操作
            if (this.Text != @"开关管理器")
            {
                // 提交到后台
                if (this.isEditing)
                {
                    Halation.GetInstance().DashEditSwitches(
                        this.switchDataGridView.SelectedCells[0].RowIndex.ToString(), this.comboBox1.SelectedItem.ToString());
                }
                else
                {
                    Halation.GetInstance().DashSwitches(
                        this.switchDataGridView.SelectedCells[0].RowIndex.ToString(), this.comboBox1.SelectedItem.ToString());
                }
            }
            this.Close();
        }
Beispiel #18
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.textBox1.Text == String.Empty)
     {
         MessageBox.Show(@"请填写标签");
         return;
     }
     if (!Halation.IsValidVarname(this.textBox1.Text) && this.textBox1.Text != @"~finalizer")
     {
         MessageBox.Show(@"标签名只能是由下划线、数字和字母组成,并且不能以数字开头。");
         return;
     }
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditLabel(this.textBox1.Text);
     }
     else
     {
         Halation.GetInstance().DashLabel(this.textBox1.Text);
     }
     this.Close();
 }
Beispiel #19
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button2_Click(object sender, EventArgs e)
 {
     if (this.textBox1.Text == String.Empty)
     {
         MessageBox.Show("请选择图片文件");
         return;
     }
     if (this.isEditing)
     {
         Halation.GetInstance().DashEditPicture(this.numericUpDown3.Value.ToString(),
                                                this.textBox1.Text, this.numericUpDown1.Value.ToString(), this.numericUpDown2.Value.ToString(),
                                                this.numericUpDown4.Value.ToString(), this.numericUpDown5.Value.ToString(),
                                                this.numericUpDown7.Value.ToString(), this.numericUpDown6.Value.ToString());
     }
     else
     {
         Halation.GetInstance().DashPicture(this.numericUpDown3.Value.ToString(),
                                            this.textBox1.Text, this.numericUpDown1.Value.ToString(), this.numericUpDown2.Value.ToString(),
                                            this.numericUpDown4.Value.ToString(), this.numericUpDown5.Value.ToString(),
                                            this.numericUpDown7.Value.ToString(), this.numericUpDown6.Value.ToString());
     }
     this.Close();
 }
Beispiel #20
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.radioButton1.Checked)
     {
         if (this.isEditing)
         {
             Halation.GetInstance().DashEditDeletepicture(this.numericUpDown1.Value.ToString());
         }
         else
         {
             Halation.GetInstance().DashDeletepicture(this.numericUpDown1.Value.ToString());
         }
     }
     else if (this.radioButton2.Checked)
     {
         if (this.isEditing)
         {
             Halation.GetInstance().DashEditDeletecstand(this.numericUpDown1.Value.ToString());
         }
         else
         {
             Halation.GetInstance().DashDeletecstand(this.numericUpDown3.Value.ToString());
         }
     }
     else
     {
         if (this.isEditing)
         {
             Halation.GetInstance().DashEditDeletebutton(this.numericUpDown2.Value.ToString());
         }
         else
         {
             Halation.GetInstance().DashDeletebutton(this.numericUpDown2.Value.ToString());
         }
     }
     this.Close();
 }
Beispiel #21
0
        /// <summary>
        /// 按钮:确定
        /// </summary>
        private void button1_Click(object sender, EventArgs e)
        {
            // 处理条件表达
            string op1, op2, opr, expr;

            if (this.checkBox2.Checked)
            {
                if (this.textBox2.Text == String.Empty)
                {
                    MessageBox.Show("请填写表达式");
                    return;
                }
                expr = this.textBox2.Text;
                op1  = op2 = opr = String.Empty;
            }
            else
            {
                // 处理操作数1
                if (this.radioButton1.Checked)
                {
                    if (!Halation.IsValidVarname(this.textBox4.Text))
                    {
                        MessageBox.Show("操作数A变量名不合法");
                        return;
                    }
                    op1 = "1#" + this.textBox4.Text;
                }
                else if (this.radioButton2.Checked)
                {
                    if (!Halation.IsValidVarname(this.textBox1.Text))
                    {
                        MessageBox.Show("操作数A变量名不合法");
                        return;
                    }
                    op1 = "2#" + this.textBox1.Text;
                }
                else if (this.radioButton15.Checked)
                {
                    if (!Halation.IsValidVarname(this.textBox7.Text))
                    {
                        MessageBox.Show("操作数A变量名不合法");
                        return;
                    }
                    op1 = "0#" + this.textBox7.Text;
                }
                else
                {
                    op1 = "3#" + (Convert.ToInt32(this.comboBox3.SelectedItem.ToString().Split(':')[0])).ToString();
                }
                // 处理操作符号
                if (this.radioButton3.Checked)
                {
                    opr = "==";
                }
                else if (this.radioButton4.Checked)
                {
                    opr = "<>";
                }
                else if (this.radioButton5.Checked)
                {
                    opr = ">";
                }
                else if (this.radioButton6.Checked)
                {
                    opr = "<";
                }
                else if (this.radioButton7.Checked)
                {
                    opr = ">=";
                }
                else
                {
                    opr = "<=";
                }
                // 处理操作数2
                if (this.radioButton9.Checked)
                {
                    op2 = "1#" + this.numericUpDown1.Value.ToString();
                }
                else if (this.radioButton14.Checked)
                {
                    op2 = "2#" + this.textBox6.Text.Replace('#', ' ');
                }
                else if (this.radioButton10.Checked)
                {
                    if (!Halation.IsValidVarname(this.textBox5.Text))
                    {
                        MessageBox.Show("操作数A变量名不合法");
                        return;
                    }
                    op2 = "3#" + this.textBox5.Text;
                }
                else if (this.radioButton11.Checked)
                {
                    if (!Halation.IsValidVarname(this.textBox3.Text))
                    {
                        MessageBox.Show("操作数A变量名不合法");
                        return;
                    }
                    op2 = "4#" + this.textBox3.Text;
                }
                else if (this.radioButton16.Checked)
                {
                    if (!Halation.IsValidVarname(this.textBox8.Text))
                    {
                        MessageBox.Show("操作数A变量名不合法");
                        return;
                    }
                    op2 = "0#" + this.textBox8.Text;
                }
                else
                {
                    op2 = "5#" + this.comboBox4.SelectedItem.ToString();
                }
                expr = String.Empty;
            }
            if (this.isEditing)
            {
                Halation.GetInstance().DashEditIf(this.checkBox1.Checked, expr, op1, opr, op2);
            }
            else
            {
                Halation.GetInstance().DashIf(this.checkBox1.Checked, expr, op1, opr, op2);
            }
            this.Close();
        }
Beispiel #22
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     Halation.GetInstance().DashTrans(this.comboBox1.SelectedItem.ToString());
     this.Close();
 }
Beispiel #23
0
 /// <summary>
 /// 执行指定的命令
 /// </summary>
 /// <param name="key">当前代码</param>
 /// <param name="command">命令实例</param>
 public static void Dash(string key, IHalationCommand command)
 {
     command.Dash();
     HalationInvoker.commandStackDict[key].Push(command);
     Halation.GetInstance().RefreshRedoUndo();
 }
Beispiel #24
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     Halation.GetInstance().DashDraw(this.textBox1.Text);
     this.Close();
 }
Beispiel #25
0
        /// <summary>
        /// 按钮:确定
        /// </summary>
        private void button1_Click(object sender, EventArgs e)
        {
            // 处理左值
            string leftOp;

            if (this.radioButton1.Checked)
            {
                if (!Halation.IsValidVarname(this.textBox1.Text))
                {
                    MessageBox.Show(@"变量名不合法");
                    return;
                }
                leftOp = "&" + this.textBox1.Text;
            }
            else if (this.radioButton14.Checked)
            {
                if (!Halation.IsValidVarname(this.textBox7.Text))
                {
                    MessageBox.Show(@"变量名不合法");
                    return;
                }
                leftOp = "%" + this.textBox7.Text;
            }
            else
            {
                if (!Halation.IsValidVarname(this.textBox2.Text))
                {
                    MessageBox.Show(@"变量名不合法");
                    return;
                }
                leftOp = "$" + this.textBox2.Text;
            }
            // 处理操作符
            string opr;

            if (this.radioButton3.Checked)
            {
                opr = "=";
            }
            else if (this.radioButton4.Checked)
            {
                opr = "+=";
            }
            else if (this.radioButton5.Checked)
            {
                opr = "-=";
            }
            else if (this.radioButton6.Checked)
            {
                opr = "*=";
            }
            else
            {
                opr = "/=";
            }
            // 处理右值
            string rightOp;

            if (this.radioButton9.Checked)
            {
                rightOp = String.Format("1#{0}", this.numericUpDown1.Value);
            }
            else if (this.radioButton8.Checked)
            {
                rightOp = String.Format("2#{0}", this.textBox5.Text.Replace('#', ' '));
            }
            else if (this.radioButton10.Checked)
            {
                if (!Halation.IsValidVarname(this.textBox3.Text))
                {
                    MessageBox.Show(@"变量名不合法");
                    return;
                }
                rightOp = String.Format("3#{0}", this.textBox3.Text);
            }
            else if (this.radioButton11.Checked)
            {
                if (!Halation.IsValidVarname(this.textBox4.Text))
                {
                    MessageBox.Show(@"变量名不合法");
                    return;
                }
                rightOp = String.Format("4#{0}", this.textBox4.Text);
            }
            else if (this.radioButton12.Checked)
            {
                rightOp = String.Format("5#{0}:{1}", this.numericUpDown2.Value, this.numericUpDown3.Value);
            }
            else if (this.radioButton15.Checked)
            {
                rightOp = String.Format("0#{0}", this.textBox8.Text);
            }
            else
            {
                rightOp = String.Format("6#{0}", this.textBox6.Text);
            }
            // 除0检查
            if (opr == "/=" && rightOp == "1#0")
            {
                MessageBox.Show(@"0不可以作为除数");
                return;
            }
            // 提交到后台
            if (this.isEditing)
            {
                Halation.GetInstance().DashEditVar(leftOp, opr, rightOp);
            }
            else
            {
                Halation.GetInstance().DashVar(leftOp, opr, rightOp);
            }
            this.Close();
        }
Beispiel #26
0
 /// <summary>
 /// 按钮:确定
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     Halation.GetInstance().DashMsgLayer(this.numericUpDown1.Value.ToString());
     this.Close();
 }
Beispiel #27
0
        /// <summary>
        /// 按钮:播放
        /// </summary>
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.isMusicMana)
            {
                switch (this.tabControl1.SelectedTab.Text)
                {
                case "BGM":
                    if (this.listBoxBGM.SelectedIndex != -1)
                    {
                        Musician.GetInstance().PlayBGM(this.listBoxBGM.SelectedItem.ToString(), this.BGMVec[this.listBoxBGM.SelectedIndex], this.volTrackBar.Value);
                    }
                    break;

                case "BGS":
                    if (this.listBoxBGS.SelectedIndex != -1)
                    {
                        Musician.GetInstance().PlayBGS(this.BGSVec[this.listBoxBGS.SelectedIndex], this.volTrackBar.Value);
                    }
                    break;

                case "SE":
                    if (this.listBoxSE.SelectedIndex != -1)
                    {
                        Musician.GetInstance().PlaySE(this.SEVec[this.listBoxSE.SelectedIndex], this.volTrackBar.Value);
                    }
                    break;

                case "Vocal":
                    if (this.listBoxVocal.SelectedIndex != -1)
                    {
                        Musician.GetInstance().PlayVocal(this.VocalVec[this.listBoxVocal.SelectedIndex], this.volTrackBar.Value);
                    }
                    break;
                }
            }
            else
            {
                switch (this.tabControl1.SelectedTab.Text)
                {
                case "BGM":
                    if (this.listBoxBGM.SelectedIndex != -1)
                    {
                        if (this.isEditing)
                        {
                            Halation.GetInstance().DashEditPlayBGM(
                                this.listBoxBGM.SelectedItem.ToString(), this.volTrackBar.Value.ToString());
                        }
                        else
                        {
                            Halation.GetInstance().DashPlayBGM(
                                this.listBoxBGM.SelectedItem.ToString(), this.volTrackBar.Value.ToString());
                        }
                    }
                    break;

                case "BGS":
                    if (this.listBoxBGS.SelectedIndex != -1)
                    {
                        Halation.GetInstance().DashPlayBGS(this.listBoxBGS.SelectedItem.ToString(), this.volTrackBar.Value.ToString());
                    }
                    break;

                case "SE":
                    if (this.listBoxSE.SelectedIndex != -1)
                    {
                        Halation.GetInstance().DashPlaySE(this.listBoxSE.SelectedItem.ToString(), this.volTrackBar.Value.ToString());
                    }
                    break;
                }
                this.Close();
            }
        }