예제 #1
0
        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();
        }
예제 #2
0
        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();
        }
예제 #3
0
 public static void Save(Stockpile sks)
 {
     Stockpile.Save(sks, false);
 }