//Load default values
        public void initializeDialog(mainWindow.programSettings progSettings)
        {
            encodingCombo.SelectedIndex = progSettings.titleEncoding;
            interpolationCombo.SelectedIndex = progSettings.iconInterpolationMode;
            iconSizeCombo.SelectedIndex = progSettings.iconPropertiesSize;
            formatCombo.SelectedIndex = progSettings.formatType;
            SavedComPort = progSettings.communicationPort;
            if (progSettings.showListGrid == 1) gridCheckbox.Checked = true; else gridCheckbox.Checked = false;
            if (progSettings.backupMemcards == 1) backupCheckbox.Checked = true; else backupCheckbox.Checked = false;
            if (progSettings.glassStatusBar == 1) glassCheckbox.Checked = true; else glassCheckbox.Checked = false;
            if (progSettings.warningMessage == 1) backupWarningCheckBox.Checked = true; else backupWarningCheckBox.Checked = false;
            if (progSettings.restoreWindowPosition == 1) restorePositionCheckbox.Checked = true; else restorePositionCheckbox.Checked = false;

            //Load all COM ports found on the system
            foreach (string port in SerialPort.GetPortNames())
            {
                dexDriveCombo.Items.Add(port);
            }

            //If there are no ports disable combobox
            if(dexDriveCombo.Items.Count < 1)dexDriveCombo.Enabled = false;

            //Select a com port (if it exists)
            dexDriveCombo.SelectedItem = progSettings.communicationPort;

            //Load all fonts installed on system
            foreach (FontFamily font in FontFamily.Families)
            {
                //Add the font on the list
                fontCombo.Items.Add(font.Name);
            }

            //Find font used in the save list
            fontCombo.SelectedItem = progSettings.listFont;
        }
        //Show compare dialog
        public void initializeDialog(mainWindow hostWindow, string appName, byte[] save1Data, string save1Title, byte[] save2Data, string save2Title)
        {
            //Set window title
            this.Text = "Compare saves";

            //Set save titles
            save1Label.Text = "Save 1: " + save1Title;
            save2Label.Text = "Save 2: " + save2Title;

            //Compare saves
            for (int i = 0; i < save1Data.Length; i++)
            {
                //Check if the bytes are different
                if (save1Data[i] != save2Data[i])
                {
                    compareListView.Items.Add("0x" + i.ToString("X4") + " (" + i.ToString() + ")");
                    compareListView.Items[compareListView.Items.Count - 1].SubItems.Add("0x" + save1Data[i].ToString("X2") + " (" + save1Data[i].ToString() + ")");
                    compareListView.Items[compareListView.Items.Count - 1].SubItems.Add("0x" + save2Data[i].ToString("X2") + " (" + save2Data[i].ToString() + ")");
                }
            }

            //Check if the list contains any items
            if (compareListView.Items.Count < 1)
            {
                new messageWindow().ShowMessage(hostWindow, appName, "Compared saves are identical.", "OK", null, true);
                return;
            }

            this.ShowDialog(hostWindow);
        }
        //Load default values
        public void initializeDialog(mainWindow hostForm, List<pluginMetadata> plgMetadata)
        {
            hostFrm = hostForm;
            loadedMetadata = plgMetadata;

            //Apply the native theme to the listview
            //glassSupport.SetWindowTheme(pluginListView.Handle, "Explorer", null);

            //Check if list contains any members
            if (loadedMetadata.Count > 0)
            {
                //Populate list with plugins
                for (int i = 0; i < loadedMetadata.Count; i++)
                {
                    pluginListView.Items.Add(loadedMetadata[i].pluginName);
                    pluginListView.Items[i].SubItems.Add(loadedMetadata[i].pluginAuthor);
                    pluginListView.Items[i].SubItems.Add(loadedMetadata[i].pluginSupportedGames);

                    //Select first item in the list
                    pluginListView.Items[0].Selected = true;
                }
            }
        }