private void addToolStripMenuItem_Click(object sender, EventArgs e) { AddServer AddSrv = new AddServer(ServerPath); if (AddSrv.ShowDialog() == DialogResult.OK) { ServerList.Items.Add(new ArkServerListViewItem(AddSrv.ServerData)); } AddSrv.Dispose(); }
private void AddServer() { AddServer AddSrv = new AddServer(ServerPath); if (AddSrv.ShowDialog() == DialogResult.OK) { ServerList.Items.Add(new ArkServerListViewItem(AddSrv.ServerData)); Registry.SaveRegConfig(this); Log(AddSrv.ServerData.AltSaveDirectory + " Added!"); Worker.ForceUpdaterRestart(this); } AddSrv.Dispose(); }
private void editSettingsToolStripMenuItem_Click(object sender, EventArgs e) { if (ServerList.FocusedItem != null) { ArkServerListViewItem ASLVI = ((ArkServerListViewItem)ServerList.FocusedItem); AddServer AddSrv = new AddServer(ASLVI.GetServerData(), ServerPath); if (AddSrv.ShowDialog() == DialogResult.OK) { ASLVI.SetServerData(AddSrv.ServerData); } AddSrv.Dispose(); } }
private void EditServer() { if (ServerList.FocusedItem != null) { ArkServerListViewItem ASLVI = ((ArkServerListViewItem)ServerList.FocusedItem); AddServer AddSrv = new AddServer(ASLVI.GetServerData(), ServerPath); if (AddSrv.ShowDialog() == DialogResult.OK) { ASLVI.SetServerData(AddSrv.ServerData); } Log(ASLVI.GetServerData().AltSaveDirectory + " Edited!"); AddSrv.Dispose(); } }