Exemple #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     //edit
     if (dataGridView1.CurrentRow != null)
     {
         var eef = new EventEditForm();
         eef.SetLang();
         eef.EventData = changeData.Values[dataGridView1.CurrentRow.Index].Clone();
         if (eef.ShowDialog() == DialogResult.OK)
         {
             float time = changeData.Keys[dataGridView1.CurrentRow.Index];
             changeData.RemoveAt(dataGridView1.CurrentRow.Index);
             dataGridView1.Rows.RemoveAt(this.dataGridView1.CurrentRow.Index);
             changeData.Add(time, eef.EventData);
             this.dataGridView1.Rows.Add(1);
             UpdateDataGrid();
             ContentChanged();
         }
     }
 }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //add
            var time = (float)WindowUtility.Seekmain.Currenttime;

            if (!changeData.ContainsKey(time))
            {
                var eef = new EventEditForm();
                eef.SetLang();
                if (changeData.Count == 0 || currentnum < 0)
                {
                    var temp = new EventData
                    {
                        BPM = WindowUtility.IniFileWriter.BPM
                    };
                    eef.EventData = temp;
                }
                else
                {
                    if (currentnum >= 0 && currentnum < changeData.Count)
                    {
                        eef.EventData = changeData.Values[currentnum].Clone();
                    }
                }
                if (eef.ShowDialog() == DialogResult.OK)
                {
                    changeData.Add(time, eef.EventData);
                    this.dataGridView1.Rows.Add(1);
                    UpdateDataGrid();
                    ContentChanged();
                }
            }
            else
            {
                MessageBox.Show(alreadyadded);
            }
        }