private void DeleteWarpLocation(object sender, EventArgs e) { try { pListWarps.RemoveAt(dgvWarps.SelectedRows[0].Index); SFM.UpdateWarpList(pListWarps.ToList <SFM.WarpInterface>()); } catch { } }
private void AddWarpLocation(object sender, EventArgs e) { if (tbWarpAddX.Text != string.Empty && tbWarpAddY.Text != string.Empty && tbWarpAddName.Text != string.Empty) { string[] val = { tbWarpAddX.Text, tbWarpAddY.Text, tbWarpAddName.Text }; pListWarps.Add(new SFM.WarpInterface(val)); SFM.UpdateWarpList(pListWarps.ToList <SFM.WarpInterface>()); tbWarpAddX.Text = "X"; tbWarpAddX.Text = "Y"; tbWarpAddName.Text = "Location name"; } }