private void btnSaveStockpile_Click(object sender, EventArgs e) { GlobalWin.Sound.StopSound(); RTC_RPC.SendToKillSwitch("FREEZE"); Stockpile sks = new Stockpile(lbStockpile); Stockpile.Save(sks, true); RTC_RPC.SendToKillSwitch("UNFREEZE"); GlobalWin.Sound.StartSound(); }
private void btnSaveStockpileAs_Click(object sender, EventArgs e) { if (lbStockpile.Items.Count == 0) { GlobalWin.Sound.StopSound(); MessageBox.Show("You cannot save the Stockpile because it is empty"); GlobalWin.Sound.StartSound(); return; } GlobalWin.Sound.StopSound(); RTC_RPC.SendToKillSwitch("FREEZE"); Stockpile sks = new Stockpile(lbStockpile); Stockpile.Save(sks); RTC_RPC.SendToKillSwitch("UNFREEZE"); GlobalWin.Sound.StartSound(); RTC_Restore.SaveRestore(); }
public static void Save(Stockpile sks) { Stockpile.Save(sks, false); }