コード例 #1
0
        public FileManager(List <WatchVariableControlPrecursor> variables, TabPage tabControl, WatchVariablePanel watchVariablePanelFile, FileImageGui gui)
            : base(variables, watchVariablePanelFile)
        {
            _tabControl = tabControl;
            _gui        = gui;

            _filePictureBoxList         = new List <FilePictureBox>();
            _fileTextboxList            = new List <FileTextbox>();
            _courseStarsAddressOffsets  = new uint[numRows];
            _courseStarsMasks           = new byte[numRows];
            _courseCannonAddressOffsets = new uint?[numRows];
            _courseCannonMasks          = new byte?[numRows];
            _courseDoorAddressOffsets   = new uint?[numRows];
            _courseDoorMasks            = new byte?[numRows];

            CurrentFileMode        = FileMode.FileA;
            currentAllCoinsMeaning = AllCoinsMeaning.Coins100;

            SplitContainer splitContainerFile = tabControl.Controls["splitContainerFile"] as SplitContainer;

            GroupBox fileGroupbox = splitContainerFile.Panel1.Controls["groupBoxFile"] as GroupBox;

            (fileGroupbox.Controls["radioButtonFileA"] as RadioButton).Click
                += (sender, e) => FileMode_Click(FileMode.FileA);
            (fileGroupbox.Controls["radioButtonFileB"] as RadioButton).Click
                += (sender, e) => FileMode_Click(FileMode.FileB);
            (fileGroupbox.Controls["radioButtonFileC"] as RadioButton).Click
                += (sender, e) => FileMode_Click(FileMode.FileC);
            (fileGroupbox.Controls["radioButtonFileD"] as RadioButton).Click
                += (sender, e) => FileMode_Click(FileMode.FileD);
            (fileGroupbox.Controls["radioButtonFileASaved"] as RadioButton).Click
                += (sender, e) => FileMode_Click(FileMode.FileASaved);
            (fileGroupbox.Controls["radioButtonFileBSaved"] as RadioButton).Click
                += (sender, e) => FileMode_Click(FileMode.FileBSaved);
            (fileGroupbox.Controls["radioButtonFileCSaved"] as RadioButton).Click
                += (sender, e) => FileMode_Click(FileMode.FileCSaved);
            (fileGroupbox.Controls["radioButtonFileDSaved"] as RadioButton).Click
                += (sender, e) => FileMode_Click(FileMode.FileDSaved);

            TableLayoutPanel fileTable = splitContainerFile.Panel1.Controls["tableLayoutPanelFile"] as TableLayoutPanel;

            // stars
            for (int row = 0; row < numRows; row++)
            {
                for (int col = 0; col < 7; col++)
                {
                    string             controlName        = String.Format("filePictureBoxTableRow{0}Col{1}", row + 1, col + 1);
                    FileStarPictureBox fileStarPictureBox = fileTable.Controls[controlName] as FileStarPictureBox;
                    if (fileStarPictureBox == null)
                    {
                        continue;
                    }

                    uint   addressOffset = GetStarAddressOffset(row);
                    byte   mask          = GetStarMask(row, col);
                    string missionName   = TableConfig.Missions.GetMissionName(row + 1, col + 1);
                    fileStarPictureBox.Initialize(_gui, addressOffset, mask, _gui.PowerStarImage, _gui.PowerStarBlackImage, missionName);
                    _filePictureBoxList.Add(fileStarPictureBox);

                    _courseStarsAddressOffsets[row] = addressOffset;
                    _courseStarsMasks[row]          = (byte)(_courseStarsMasks[row] | mask);
                }
            }

            // course labels
            for (int row = 0; row < numRows; row++)
            {
                string          controlName     = String.Format("labelFileTableRow{0}", row + 1);
                FileCourseLabel fileCourseLabel = fileTable.Controls[controlName] as FileCourseLabel;
                fileCourseLabel.Initialize(_courseStarsAddressOffsets[row], _courseStarsMasks[row], row + 1);
            }

            // cannons
            for (int row = 0; row < numRows; row++)
            {
                int    col         = 7;
                string controlName = String.Format("filePictureBoxTableRow{0}Col{1}", row + 1, col + 1);
                FileBinaryPictureBox fileCannonPictureBox = fileTable.Controls[controlName] as FileBinaryPictureBox;
                if (fileCannonPictureBox == null)
                {
                    continue;
                }

                uint addressOffset = GetCannonAddressOffset(row);
                byte mask          = FileConfig.CannonMask;
                fileCannonPictureBox.Initialize(addressOffset, mask, _gui.CannonImage, _gui.CannonLidImage);
                _filePictureBoxList.Add(fileCannonPictureBox);

                _courseCannonAddressOffsets[row] = addressOffset;
                _courseCannonMasks[row]          = mask;
            }

            // doors
            for (int row = 0; row < numRows; row++)
            {
                int    col         = 8;
                string controlName = String.Format("filePictureBoxTableRow{0}Col{1}", row + 1, col + 1);
                FileBinaryPictureBox fileBinaryPictureBox = fileTable.Controls[controlName] as FileBinaryPictureBox;
                if (fileBinaryPictureBox == null)
                {
                    continue;
                }

                uint addressOffset = GetDoorAddressOffset(row);
                byte mask          = GetDoorMask(row);
                (Image onImage, Image offImage) = GetDoorImages(row);
                fileBinaryPictureBox.Initialize(addressOffset, mask, onImage, offImage);
                _filePictureBoxList.Add(fileBinaryPictureBox);

                _courseDoorAddressOffsets[row] = addressOffset;
                _courseDoorMasks[row]          = mask;
            }

            // coin scores
            for (int row = 0; row < 15; row++)
            {
                int    col         = 9;
                string controlName = String.Format("textBoxTableRow{0}Col{1}", row + 1, col + 1);
                FileCoinScoreTextbox fileCoinScoreTextBox = fileTable.Controls[controlName] as FileCoinScoreTextbox;
                fileCoinScoreTextBox.Initialize(FileConfig.CoinScoreOffsetStart + (uint)row);
                _fileTextboxList.Add(fileCoinScoreTextBox);
            }

            GroupBox hatLocationGroupbox = splitContainerFile.Panel1.Controls["groupBoxHatLocation"] as GroupBox;

            // hat location radio button pictures
            FileHatLocationPictureBox filePictureBoxHatLocationMario = hatLocationGroupbox.Controls["filePictureBoxHatLocationMario"] as FileHatLocationPictureBox;

            filePictureBoxHatLocationMario.Initialize(HatLocation.Mario, _gui.HatOnMarioImage, _gui.HatOnMarioGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationMario);

            FileHatLocationPictureBox filePictureBoxHatLocationKlepto = hatLocationGroupbox.Controls["filePictureBoxHatLocationKlepto"] as FileHatLocationPictureBox;

            filePictureBoxHatLocationKlepto.Initialize(HatLocation.SSLKlepto, _gui.HatOnKleptoImage, _gui.HatOnKleptoGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationKlepto);

            FileHatLocationPictureBox filePictureBoxHatLocationSnowman = hatLocationGroupbox.Controls["filePictureBoxHatLocationSnowman"] as FileHatLocationPictureBox;

            filePictureBoxHatLocationSnowman.Initialize(HatLocation.SLSnowman, _gui.HatOnSnowmanImage, _gui.HatOnSnowmanGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationSnowman);

            FileHatLocationPictureBox filePictureBoxHatLocationUkiki = hatLocationGroupbox.Controls["filePictureBoxHatLocationUkiki"] as FileHatLocationPictureBox;

            filePictureBoxHatLocationUkiki.Initialize(HatLocation.TTMUkiki, _gui.HatOnUkikiImage, _gui.HatOnUkikiGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationUkiki);

            FileHatLocationPictureBox filePictureBoxHatLocationSSLGround = hatLocationGroupbox.Controls["filePictureBoxHatLocationSSLGround"] as FileHatLocationPictureBox;

            filePictureBoxHatLocationSSLGround.Initialize(HatLocation.SSLGround, _gui.HatOnGroundInSSLImage, _gui.HatOnGroundInSSLGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationSSLGround);

            FileHatLocationPictureBox filePictureBoxHatLocationSLGround = hatLocationGroupbox.Controls["filePictureBoxHatLocationSLGround"] as FileHatLocationPictureBox;

            filePictureBoxHatLocationSLGround.Initialize(HatLocation.SLGround, _gui.HatOnGroundInSLImage, _gui.HatOnGroundInSLGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationSLGround);

            FileHatLocationPictureBox filePictureBoxHatLocationTTMGround = hatLocationGroupbox.Controls["filePictureBoxHatLocationTTMGround"] as FileHatLocationPictureBox;

            filePictureBoxHatLocationTTMGround.Initialize(HatLocation.TTMGround, _gui.HatOnGroundInTTMImage, _gui.HatOnGroundInTTMGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationTTMGround);

            // hat position textboxes
            FileHatPositionTextbox textboxHatLocationPositionX = hatLocationGroupbox.Controls["textboxHatLocationPositionX"] as FileHatPositionTextbox;

            textboxHatLocationPositionX.Initialize(FileConfig.HatPositionXOffset);
            _fileTextboxList.Add(textboxHatLocationPositionX);

            FileHatPositionTextbox textboxHatLocationPositionY = hatLocationGroupbox.Controls["textboxHatLocationPositionY"] as FileHatPositionTextbox;

            textboxHatLocationPositionY.Initialize(FileConfig.HatPositionYOffset);
            _fileTextboxList.Add(textboxHatLocationPositionY);

            FileHatPositionTextbox textboxHatLocationPositionZ = hatLocationGroupbox.Controls["textboxHatLocationPositionZ"] as FileHatPositionTextbox;

            textboxHatLocationPositionZ.Initialize(FileConfig.HatPositionZOffset);
            _fileTextboxList.Add(textboxHatLocationPositionZ);

            // miscellaneous checkbox pictures
            FileBinaryPictureBox filePictureBoxFileStarted = splitContainerFile.Panel1.Controls["filePictureBoxFileStarted"] as FileBinaryPictureBox;

            filePictureBoxFileStarted.Initialize(FileConfig.FileStartedOffset, FileConfig.FileStartedMask, _gui.FileStartedImage, _gui.FileNotStartedImage);
            _filePictureBoxList.Add(filePictureBoxFileStarted);

            FileBinaryPictureBox filePictureBoxRedCapSwitchPressed = splitContainerFile.Panel1.Controls["filePictureBoxRedCapSwitchPressed"] as FileBinaryPictureBox;

            filePictureBoxRedCapSwitchPressed.Initialize(FileConfig.CapSwitchPressedOffset, FileConfig.RedCapSwitchMask, _gui.CapSwitchRedPressedImage, _gui.CapSwitchRedUnpressedImage);
            _filePictureBoxList.Add(filePictureBoxRedCapSwitchPressed);

            FileBinaryPictureBox filePictureBoxGreenCapSwitchPressed = splitContainerFile.Panel1.Controls["filePictureBoxGreenCapSwitchPressed"] as FileBinaryPictureBox;

            filePictureBoxGreenCapSwitchPressed.Initialize(FileConfig.CapSwitchPressedOffset, FileConfig.GreenCapSwitchMask, _gui.CapSwitchGreenPressedImage, _gui.CapSwitchGreenUnpressedImage);
            _filePictureBoxList.Add(filePictureBoxGreenCapSwitchPressed);

            FileBinaryPictureBox filePictureBoxBlueCapSwitchPressed = splitContainerFile.Panel1.Controls["filePictureBoxBlueCapSwitchPressed"] as FileBinaryPictureBox;

            filePictureBoxBlueCapSwitchPressed.Initialize(FileConfig.CapSwitchPressedOffset, FileConfig.BlueCapSwitchMask, _gui.CapSwitchBluePressedImage, _gui.CapSwitchBlueUnpressedImage);
            _filePictureBoxList.Add(filePictureBoxBlueCapSwitchPressed);

            FileKeyDoorPictureBox filePictureBoxKeyDoor1Opened = splitContainerFile.Panel1.Controls["filePictureBoxKeyDoor1Opened"] as FileKeyDoorPictureBox;

            filePictureBoxKeyDoor1Opened.Initialize(FileConfig.KeyDoorOffset, FileConfig.KeyDoor1KeyMask, FileConfig.KeyDoor1OpenedMask, _gui.KeyDoorOpenKeyImage, _gui.KeyDoorClosedKeyImage, _gui.KeyDoorOpenImage, _gui.KeyDoorClosedImage);
            _filePictureBoxList.Add(filePictureBoxKeyDoor1Opened);

            FileKeyDoorPictureBox filePictureBoxKeyDoor2Opened = splitContainerFile.Panel1.Controls["filePictureBoxKeyDoor2Opened"] as FileKeyDoorPictureBox;

            filePictureBoxKeyDoor2Opened.Initialize(FileConfig.KeyDoorOffset, FileConfig.KeyDoor2KeyMask, FileConfig.KeyDoor2OpenedMask, _gui.KeyDoorOpenKeyImage, _gui.KeyDoorClosedKeyImage, _gui.KeyDoorOpenImage, _gui.KeyDoorClosedImage);
            _filePictureBoxList.Add(filePictureBoxKeyDoor2Opened);

            FileBinaryPictureBox filePictureBoxMoatDrained = splitContainerFile.Panel1.Controls["filePictureBoxMoatDrained"] as FileBinaryPictureBox;

            filePictureBoxMoatDrained.Initialize(FileConfig.MoatDrainedOffset, FileConfig.MoatDrainedMask, _gui.MoatDrainedImage, _gui.MoatNotDrainedImage);
            _filePictureBoxList.Add(filePictureBoxMoatDrained);

            FileBinaryPictureBox filePictureBoxDDDMovedBack = splitContainerFile.Panel1.Controls["filePictureBoxDDDMovedBack"] as FileBinaryPictureBox;

            filePictureBoxDDDMovedBack.Initialize(FileConfig.DDDMovedBackOffset, FileConfig.DDDMovedBackMask, _gui.DDDPaintingMovedBackImage, _gui.DDDPaintingNotMovedBackImage);
            _filePictureBoxList.Add(filePictureBoxDDDMovedBack);

            //checkbox
            _inGameCopyPasteCheckbox = splitContainerFile.Panel1.Controls["checkboxInGameCopyPaste"] as CheckBox;

            // buttons
            Button saveFileButton = splitContainerFile.Panel1.Controls["buttonFileSave"] as Button;

            saveFileButton.Click += FileSaveButton_Click;

            Button eraseFileButton = splitContainerFile.Panel1.Controls["buttonFileErase"] as Button;

            eraseFileButton.Click += FileEraseButton_Click;

            Button copyFileButton = splitContainerFile.Panel1.Controls["buttonFileCopy"] as Button;

            copyFileButton.Click += FileCopyButton_Click;

            Button pasteFileButton = splitContainerFile.Panel1.Controls["buttonFilePaste"] as Button;

            pasteFileButton.Click += FilePasteButton_Click;

            Button allStarsButton = splitContainerFile.Panel1.Controls["buttonAllStars"] as Button;

            allStarsButton.Click += (sender, e) => FileSetCategory(true, new List <FileCategory> {
                FileCategory.Stars
            });

            Button noStarsButton = splitContainerFile.Panel1.Controls["buttonNoStars"] as Button;

            noStarsButton.Click += (sender, e) => FileSetCategory(false, new List <FileCategory> {
                FileCategory.Stars
            });

            Button allCannonsButton = splitContainerFile.Panel1.Controls["buttonAllCannons"] as Button;

            allCannonsButton.Click += (sender, e) => FileSetCategory(true, new List <FileCategory> {
                FileCategory.Cannons
            });

            Button noCannonsButton = splitContainerFile.Panel1.Controls["buttonNoCannons"] as Button;

            noCannonsButton.Click += (sender, e) => FileSetCategory(false, new List <FileCategory> {
                FileCategory.Cannons
            });

            Button allDoorsButton = splitContainerFile.Panel1.Controls["buttonAllDoors"] as Button;

            allDoorsButton.Click += (sender, e) => FileSetCategory(true, new List <FileCategory> {
                FileCategory.Doors
            });

            Button noDoorsButton = splitContainerFile.Panel1.Controls["buttonNoDoors"] as Button;

            noDoorsButton.Click += (sender, e) => FileSetCategory(false, new List <FileCategory> {
                FileCategory.Doors
            });

            Button allCoinsButton = splitContainerFile.Panel1.Controls["buttonAllCoins"] as Button;

            allCoinsButton.Click += (sender, e) => FileSetCategory(true, new List <FileCategory> {
                FileCategory.Coins
            });

            Button noCoinsButton = splitContainerFile.Panel1.Controls["buttonNoCoins"] as Button;

            noCoinsButton.Click += (sender, e) => FileSetCategory(false, new List <FileCategory> {
                FileCategory.Coins
            });

            Button everythingButton = splitContainerFile.Panel1.Controls["buttonEverything"] as Button;

            everythingButton.Click += (sender, e) =>
                                      FileSetCategory(
                true,
                new List <FileCategory>
            {
                FileCategory.Stars,
                FileCategory.Cannons,
                FileCategory.Doors,
                FileCategory.Coins,
                FileCategory.Misc
            });

            Button nothingButton = splitContainerFile.Panel1.Controls["buttonNothing"] as Button;

            nothingButton.Click += (sender, e) =>
                                   FileSetCategory(
                false,
                new List <FileCategory>
            {
                FileCategory.Stars,
                FileCategory.Cannons,
                FileCategory.Doors,
                FileCategory.Coins,
                FileCategory.Misc
            });

            _numStarsButton        = splitContainerFile.Panel1.Controls["buttonFileNumStars"] as Button;
            _numStarsButton.Click += NumStarsButton_Click;

            // everything coin score radio buttons
            GroupBox allCoinsMeaningGroupbox = splitContainerFile.Panel1.Controls["groupBoxAllCoinsMeaning"] as GroupBox;

            (allCoinsMeaningGroupbox.Controls["radioButtonAllCoinsMeaning100Coins"] as RadioButton).Click
                += (sender, e) => { currentAllCoinsMeaning = AllCoinsMeaning.Coins100; };
            (allCoinsMeaningGroupbox.Controls["radioButtonAllCoinsMeaning255Coins"] as RadioButton).Click
                += (sender, e) => { currentAllCoinsMeaning = AllCoinsMeaning.Coins255; };
            (allCoinsMeaningGroupbox.Controls["radioButtonAllCoinsMeaningMaxWithoutGlitches"] as RadioButton).Click
                += (sender, e) => { currentAllCoinsMeaning = AllCoinsMeaning.MaxWithoutGlitches; };
            (allCoinsMeaningGroupbox.Controls["radioButtonAllCoinsMeaningMaxWithGlitches"] as RadioButton).Click
                += (sender, e) => { currentAllCoinsMeaning = AllCoinsMeaning.MaxWithGlitches; };
        }
コード例 #2
0
ファイル: FileTab.cs プロジェクト: chaosBrick/STROOP
        public override void InitializeTab()
        {
            base.InitializeTab();
            gui = Config.FileImageGui;

            _filePictureBoxList         = new List <FilePictureBox>();
            _fileTextboxList            = new List <FileTextbox>();
            _courseStarsAddressOffsets  = new uint[numRows];
            _courseStarsMasks           = new byte[numRows];
            _courseCannonAddressOffsets = new uint?[numRows];
            _courseCannonMasks          = new byte?[numRows];
            _courseDoorAddressOffsets   = new uint?[numRows];
            _courseDoorMasks            = new byte?[numRows];

            CurrentFileMode        = FileMode.FileA;
            currentAllCoinsMeaning = AllCoinsMeaning.Coins100;

            radioButtonFileA.Click
                += (sender, e) => FileMode_Click(FileMode.FileA);
            radioButtonFileB.Click
                += (sender, e) => FileMode_Click(FileMode.FileB);
            radioButtonFileC.Click
                += (sender, e) => FileMode_Click(FileMode.FileC);
            radioButtonFileD.Click
                += (sender, e) => FileMode_Click(FileMode.FileD);
            radioButtonFileASaved.Click
                += (sender, e) => FileMode_Click(FileMode.FileASaved);
            radioButtonFileBSaved.Click
                += (sender, e) => FileMode_Click(FileMode.FileBSaved);
            radioButtonFileCSaved.Click
                += (sender, e) => FileMode_Click(FileMode.FileCSaved);
            radioButtonFileDSaved.Click
                += (sender, e) => FileMode_Click(FileMode.FileDSaved);


            // stars
            for (int row = 0; row < numRows; row++)
            {
                for (int col = 0; col < 7; col++)
                {
                    string             controlName        = String.Format("filePictureBoxTableRow{0}Col{1}", row + 1, col + 1);
                    FileStarPictureBox fileStarPictureBox = tableLayoutPanelFile.Controls[controlName] as FileStarPictureBox;
                    if (fileStarPictureBox == null)
                    {
                        continue;
                    }

                    uint   addressOffset = GetStarAddressOffset(row);
                    byte   mask          = GetStarMask(row, col);
                    string missionName   = TableConfig.Missions.GetMissionName(row + 1, col + 1);
                    fileStarPictureBox.Initialize(gui, addressOffset, mask, gui.PowerStarImage, gui.PowerStarBlackImage, missionName);
                    _filePictureBoxList.Add(fileStarPictureBox);

                    _courseStarsAddressOffsets[row] = addressOffset;
                    _courseStarsMasks[row]          = (byte)(_courseStarsMasks[row] | mask);
                }
            }

            // course labels
            for (int row = 0; row < numRows; row++)
            {
                string          controlName     = String.Format("labelFileTableRow{0}", row + 1);
                FileCourseLabel fileCourseLabel = tableLayoutPanelFile.Controls[controlName] as FileCourseLabel;
                fileCourseLabel.Initialize(_courseStarsAddressOffsets[row], _courseStarsMasks[row], row + 1);
            }

            // cannons
            for (int row = 0; row < numRows; row++)
            {
                int    col         = 7;
                string controlName = String.Format("filePictureBoxTableRow{0}Col{1}", row + 1, col + 1);
                FileBinaryPictureBox fileCannonPictureBox = tableLayoutPanelFile.Controls[controlName] as FileBinaryPictureBox;
                if (fileCannonPictureBox == null)
                {
                    continue;
                }

                uint addressOffset = GetCannonAddressOffset(row);
                byte mask          = FileConfig.CannonMask;
                fileCannonPictureBox.Initialize(addressOffset, mask, gui.CannonImage, gui.CannonLidImage);
                _filePictureBoxList.Add(fileCannonPictureBox);

                _courseCannonAddressOffsets[row] = addressOffset;
                _courseCannonMasks[row]          = mask;
            }

            // doors
            for (int row = 0; row < numRows; row++)
            {
                int    col         = 8;
                string controlName = String.Format("filePictureBoxTableRow{0}Col{1}", row + 1, col + 1);
                FileBinaryPictureBox fileBinaryPictureBox = tableLayoutPanelFile.Controls[controlName] as FileBinaryPictureBox;
                if (fileBinaryPictureBox == null)
                {
                    continue;
                }

                uint addressOffset = GetDoorAddressOffset(row);
                byte mask          = GetDoorMask(row);
                (Image onImage, Image offImage) = GetDoorImages(row);
                fileBinaryPictureBox.Initialize(addressOffset, mask, onImage, offImage);
                _filePictureBoxList.Add(fileBinaryPictureBox);

                _courseDoorAddressOffsets[row] = addressOffset;
                _courseDoorMasks[row]          = mask;
            }

            // coin scores
            for (int row = 0; row < 15; row++)
            {
                int    col         = 9;
                string controlName = String.Format("textBoxTableRow{0}Col{1}", row + 1, col + 1);
                FileCoinScoreTextbox fileCoinScoreTextBox = tableLayoutPanelFile.Controls[controlName] as FileCoinScoreTextbox;
                fileCoinScoreTextBox.Initialize(FileConfig.CoinScoreOffsetStart + (uint)row);
                _fileTextboxList.Add(fileCoinScoreTextBox);
            }

            // hat location radio button pictures
            filePictureBoxHatLocationMario.Initialize(HatLocation.Mario, gui.HatOnMarioImage, gui.HatOnMarioGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationMario);

            filePictureBoxHatLocationKlepto.Initialize(HatLocation.SSLKlepto, gui.HatOnKleptoImage, gui.HatOnKleptoGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationKlepto);

            filePictureBoxHatLocationSnowman.Initialize(HatLocation.SLSnowman, gui.HatOnSnowmanImage, gui.HatOnSnowmanGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationSnowman);

            filePictureBoxHatLocationUkiki.Initialize(HatLocation.TTMUkiki, gui.HatOnUkikiImage, gui.HatOnUkikiGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationUkiki);

            filePictureBoxHatLocationSSLGround.Initialize(HatLocation.SSLGround, gui.HatOnGroundInSSLImage, gui.HatOnGroundInSSLGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationSSLGround);

            filePictureBoxHatLocationSLGround.Initialize(HatLocation.SLGround, gui.HatOnGroundInSLImage, gui.HatOnGroundInSLGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationSLGround);

            filePictureBoxHatLocationTTMGround.Initialize(HatLocation.TTMGround, gui.HatOnGroundInTTMImage, gui.HatOnGroundInTTMGreyImage);
            _filePictureBoxList.Add(filePictureBoxHatLocationTTMGround);

            // hat position textboxes
            textBoxHatLocationPositionX.Initialize(FileConfig.HatPositionXOffset);
            _fileTextboxList.Add(textBoxHatLocationPositionX);

            textBoxHatLocationPositionY.Initialize(FileConfig.HatPositionYOffset);
            _fileTextboxList.Add(textBoxHatLocationPositionY);

            textBoxHatLocationPositionZ.Initialize(FileConfig.HatPositionZOffset);
            _fileTextboxList.Add(textBoxHatLocationPositionZ);

            // miscellaneous checkbox pictures
            filePictureBoxFileStarted.Initialize(FileConfig.FileStartedOffset, FileConfig.FileStartedMask, gui.FileStartedImage, gui.FileNotStartedImage);
            _filePictureBoxList.Add(filePictureBoxFileStarted);

            filePictureBoxRedCapSwitchPressed.Initialize(FileConfig.CapSwitchPressedOffset, FileConfig.RedCapSwitchMask, gui.CapSwitchRedPressedImage, gui.CapSwitchRedUnpressedImage);
            _filePictureBoxList.Add(filePictureBoxRedCapSwitchPressed);

            filePictureBoxGreenCapSwitchPressed.Initialize(FileConfig.CapSwitchPressedOffset, FileConfig.GreenCapSwitchMask, gui.CapSwitchGreenPressedImage, gui.CapSwitchGreenUnpressedImage);
            _filePictureBoxList.Add(filePictureBoxGreenCapSwitchPressed);

            filePictureBoxBlueCapSwitchPressed.Initialize(FileConfig.CapSwitchPressedOffset, FileConfig.BlueCapSwitchMask, gui.CapSwitchBluePressedImage, gui.CapSwitchBlueUnpressedImage);
            _filePictureBoxList.Add(filePictureBoxBlueCapSwitchPressed);

            filePictureBoxKeyDoor1Opened.Initialize(FileConfig.KeyDoorOffset, FileConfig.KeyDoor1KeyMask, FileConfig.KeyDoor1OpenedMask, gui.KeyDoorOpenKeyImage, gui.KeyDoorClosedKeyImage, gui.KeyDoorOpenImage, gui.KeyDoorClosedImage);
            _filePictureBoxList.Add(filePictureBoxKeyDoor1Opened);

            filePictureBoxKeyDoor2Opened.Initialize(FileConfig.KeyDoorOffset, FileConfig.KeyDoor2KeyMask, FileConfig.KeyDoor2OpenedMask, gui.KeyDoorOpenKeyImage, gui.KeyDoorClosedKeyImage, gui.KeyDoorOpenImage, gui.KeyDoorClosedImage);
            _filePictureBoxList.Add(filePictureBoxKeyDoor2Opened);

            filePictureBoxMoatDrained.Initialize(FileConfig.MoatDrainedOffset, FileConfig.MoatDrainedMask, gui.MoatDrainedImage, gui.MoatNotDrainedImage);
            _filePictureBoxList.Add(filePictureBoxMoatDrained);

            filePictureBoxDDDMovedBack.Initialize(FileConfig.DDDMovedBackOffset, FileConfig.DDDMovedBackMask, gui.DDDPaintingMovedBackImage, gui.DDDPaintingNotMovedBackImage);
            _filePictureBoxList.Add(filePictureBoxDDDMovedBack);

            // buttons
            buttonFileSave.Click  += FileSaveButton_Click;
            buttonFileErase.Click += FileEraseButton_Click;
            buttonFileCopy.Click  += FileCopyButton_Click;
            buttonFilePaste.Click += FilePasteButton_Click;

            buttonAllStars.Click += (sender, e) => FileSetCategory(true, new List <FileCategory> {
                FileCategory.Stars
            });
            buttonNoStars.Click += (sender, e) => FileSetCategory(false, new List <FileCategory> {
                FileCategory.Stars
            });
            buttonAllCannons.Click += (sender, e) => FileSetCategory(true, new List <FileCategory> {
                FileCategory.Cannons
            });
            buttonNoCannons.Click += (sender, e) => FileSetCategory(false, new List <FileCategory> {
                FileCategory.Cannons
            });
            buttonAllDoors.Click += (sender, e) => FileSetCategory(true, new List <FileCategory> {
                FileCategory.Doors
            });
            buttonNoDoors.Click += (sender, e) => FileSetCategory(false, new List <FileCategory> {
                FileCategory.Doors
            });
            buttonAllCoins.Click += (sender, e) => FileSetCategory(true, new List <FileCategory> {
                FileCategory.Coins
            });
            buttonNoCoins.Click += (sender, e) => FileSetCategory(false, new List <FileCategory> {
                FileCategory.Coins
            });
            buttonEverything.Click += (sender, e) =>
                                      FileSetCategory(
                true,
                new List <FileCategory>
            {
                FileCategory.Stars,
                FileCategory.Cannons,
                FileCategory.Doors,
                FileCategory.Coins,
                FileCategory.Misc
            });

            buttonNothing.Click += (sender, e) =>
                                   FileSetCategory(
                false,
                new List <FileCategory>
            {
                FileCategory.Stars,
                FileCategory.Cannons,
                FileCategory.Doors,
                FileCategory.Coins,
                FileCategory.Misc
            });

            buttonFileNumStars.Click += NumStarsButton_Click;

            // everything coin score radio buttons
            radioButtonAllCoinsMeaning100Coins.Click
                += (sender, e) => { currentAllCoinsMeaning = AllCoinsMeaning.Coins100; };
            radioButtonAllCoinsMeaning255Coins.Click
                += (sender, e) => { currentAllCoinsMeaning = AllCoinsMeaning.Coins255; };
            radioButtonAllCoinsMeaningMaxWithoutGlitches.Click
                += (sender, e) => { currentAllCoinsMeaning = AllCoinsMeaning.MaxWithoutGlitches; };
            radioButtonAllCoinsMeaningMaxWithGlitches.Click
                += (sender, e) => { currentAllCoinsMeaning = AllCoinsMeaning.MaxWithGlitches; };
        }