private void BUTTON_TP_Reload_Click(object sender, EventArgs e) { TP_ListBox.Items.Clear(); foreach (string posname in TXTConvert.GetPositionList().Keys) { TP_ListBox.Items.Add(posname); } }
private void BUTTON_TP_TO_Click(object sender, EventArgs e) { if (TP_ListBox.SelectedItem == null) { MessageBox.Show("Please selected point!"); return; } GTA5Process.TP_to_with_car(TXTConvert.GetPosition(TP_ListBox.SelectedItem.ToString())); }
private void BUTTON_Delete_Pos_Click(object sender, EventArgs e) { if (TP_ListBox.SelectedItem == null) { MessageBox.Show("Please selected point!"); return; } TXTConvert.Remove(TP_ListBox.SelectedItem.ToString()); BUTTON_TP_Reload_Click(sender, e); }
private void BUTTON_SavePos_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(TEXTBOX_SavePos.Text)) { MessageBox.Show("Position name illegal!"); return; } if (TXTConvert.Exists(TEXTBOX_SavePos.Text)) { MessageBox.Show("Position name has exists!"); return; } TXTConvert.Add(TEXTBOX_SavePos.Text, GTA5Process.GetPlayerPosition()); BUTTON_TP_Reload_Click(sender, e); }