private void B_Copy_Click(object sender, EventArgs e) { var Map = Areas[CB_LocationID.SelectedIndex]; if (!Map.HasTables) { WinFormsUtil.Alert("No tables to copy."); return; } CurrentTable.Write(); CopyTable = (byte[])CurrentTable.Data.Clone(); CopyCount = CurrentTable.Encounter7s[0].Count(z => z.Species != 0); B_Paste.Enabled = B_PasteAll.Enabled = true; WinFormsUtil.Alert("Copied table data."); }
private void B_Save_Click(object sender, EventArgs e) { CurrentTable.Write(); var area = Areas[CB_LocationID.SelectedIndex]; area.Tables[CB_TableID.SelectedIndex] = CurrentTable; // Set data back to GARC encdata[area.FileNumber] = getMapData(area.Tables); }
private void B_Save_Click(object sender, EventArgs e) { var sum = TotalEncounterRate; if (sum != 100 && sum != 0) { WinFormsUtil.Error("Encounter rates must add up to either 0% or 100%."); return; } CurrentTable.Write(); var area = Areas[CB_LocationID.SelectedIndex]; area.Tables[CB_TableID.SelectedIndex] = CurrentTable; // Set data back to GARC encdata[area.FileNumber] = Area7.GetDayNightTableBinary(area.Tables); }
private void B_Save_Click(object sender, EventArgs e) { int tot = 0; foreach (var nup in rate_spec) { tot += (int)nup.Value; } if (tot != 100 && tot != 0) { WinFormsUtil.Error("Encounter rates must add up to either 0% or 100%."); return; } CurrentTable.Write(); var area = Areas[CB_LocationID.SelectedIndex]; area.Tables[CB_TableID.SelectedIndex] = CurrentTable; // Set data back to GARC encdata[area.FileNumber] = getMapData(area.Tables); }