コード例 #1
0
ファイル: Form9.cs プロジェクト: levyilan/pbPSCReAlpha
 public Form9(List <ClGameStructure> lcgs, String sFolderPath, int bleemsyncVersion, ClVersionHelper cvh, SimpleLogger sl, Form1 frm)
 {
     InitializeComponent();
     slLogger = sl;
     m_SelectionDBCreation = 1;
     m_bsversion           = bleemsyncVersion;
     m_lcgs        = lcgs;
     m_sFolderPath = sFolderPath;
     m_cvh         = cvh;
     m_frmParent   = frm;
     manageRadioButton();
 }
コード例 #2
0
        public Form23(String sFolderPath, SimpleLogger sl, Dictionary <String, ClPS1Game> dcClPS1Games, ClVersionHelper cvh)
        {
            InitializeComponent();
            _folderPath                = sFolderPath;
            slLogger                   = sl;
            dcPs1Games                 = dcClPS1Games;
            _versionBS                 = cvh;
            newGame                    = null;
            _currentFilePathIni        = String.Empty;
            _docHtmlStr                = String.Empty;
            lbCurrentGameIniFile.Text  = _currentFilePathIni;
            btSaveIni.Enabled          = false;
            btReloadTitleDiscs.Enabled = false;
            btIniReload.Enabled        = false;

            pbCover.AllowDrop       = true;
            _currentFilePathImg     = String.Empty;
            lbCurrentPngFile.Text   = _currentFilePathImg;
            btSave.Enabled          = false;
            btPictureReload.Enabled = false;
        }
コード例 #3
0
        public Form11(String sFolderPath, SimpleLogger sl, ClGameStructure myGame, ClVersionHelper cvh)
        {
            InitializeComponent();
            slLogger          = sl;
            newGame           = myGame;
            _versionBS        = cvh;
            _originFolderPath = sFolderPath;
            _folderPath       = sFolderPath + "\\" + newGame.FolderIndex + cvh.GameDataFolder;
            _sDefaultContent  = String.Empty;

            if (newGame.BypassLaunchScript)
            {
                tbLaunchContent.Clear();
                try
                {
                    using (StreamReader sr = new StreamReader(_folderPath + "\\" + "launch.sh"))
                    {
                        String sline = String.Empty;
                        while ((sline = sr.ReadLine()) != null)
                        {
                            tbLaunchContent.AppendText(sline.Trim() + Environment.NewLine);
                            _sDefaultContent += sline.Trim() + Environment.NewLine;
                        }
                    }
                }
                catch (Exception ex)
                {
                    slLogger.Fatal(ex.Message);
                }
            }
            lbFiles.Items.Clear();
            if (newGame.Filenames.Count > 0)
            {
                foreach (String s in newGame.Filenames)
                {
                    lbFiles.Items.Add(s);
                }
            }
        }
コード例 #4
0
ファイル: Form9.cs プロジェクト: bakedmuffinman/pbPSCReAlpha
        public Form9(List <ClGameStructure> lcgs, String sFolderPath, int bleemsyncVersion, ClVersionHelper cvh, SimpleLogger sl, Form1 frm)
        {
            InitializeComponent();
            slLogger = sl;
            m_SelectionDBCreation = 1;
            m_bsversion           = bleemsyncVersion;
            m_lcgs        = lcgs;
            m_sFolderPath = sFolderPath;
            m_cvh         = cvh;
            m_frmParent   = frm;
            int iMaxGames = Properties.Settings.Default.iMaxGamesPerFolder;

            if ((iMaxGames >= nudMaxGamesPerFolder.Minimum) && (iMaxGames <= nudMaxGamesPerFolder.Maximum))
            {
                nudMaxGamesPerFolder.Value = (decimal)(iMaxGames);
            }
            else
            {
                Properties.Settings.Default.iMaxGamesPerFolder = 40;
                nudMaxGamesPerFolder.Value = (decimal)(40);
            }
            manageRadioButton();
        }
コード例 #5
0
ファイル: Form4.cs プロジェクト: pascl/pbPSCReAlpha
        public Form4(String sFolderPath, SimpleLogger sl, ClGameStructure myGame, ClVersionHelper cvh)
        {
            InitializeComponent();
            slLogger   = sl;
            newGame    = myGame;
            _versionBS = cvh;

            _folderPath = sFolderPath + "\\" + newGame.FolderIndex + cvh.GameDataFolder;

            if (!newGame.CueMissing)
            {
                int cueCount = 0;

                foreach (String s in newGame.Filenames)
                {
                    if (s.EndsWith(".cue"))
                    {
                        cueCount++;
                        GroupBox gb = new GroupBox();
                        gb.Text   = s;
                        gb.Width  = 400;
                        gb.Height = 250;
                        gb.Parent = flpCueFiles;


                        TextBox tb = new TextBox();
                        tb.Multiline  = true;
                        tb.Parent     = gb;
                        tb.Dock       = DockStyle.Top;
                        tb.Height     = 200;
                        tb.ScrollBars = ScrollBars.Both;
                        //tb.ReadOnly = true;

                        if (File.Exists(_folderPath + "\\" + s))
                        {
                            using (StreamReader sr = new StreamReader(_folderPath + "\\" + s))
                            {
                                String sline = String.Empty;
                                while ((sline = sr.ReadLine()) != null)
                                {
                                    tb.AppendText(sline + Environment.NewLine);
                                }
                            }
                        }

                        Button btSave = new Button();
                        btSave.Text   = "Save";
                        btSave.Parent = gb;
                        btSave.Top    = 220;
                        btSave.Left   = 4;
                        //btSave.Enabled = false;
                        btSave.Tag    = (object)(gb);
                        btSave.Click += cueSave;

                        Button btAutoedit = new Button();
                        btAutoedit.Text   = "Auto";
                        btAutoedit.Parent = gb;
                        btAutoedit.Top    = 220;
                        btAutoedit.Left   = 90;
                        //btAutoedit.Enabled = false;
                        btAutoedit.Tag    = (object)(gb);
                        btAutoedit.Click += cueAuto;
                    }
                }
                if (cueCount > 2)
                {
                    this.Width = 994;
                }
            }
            lbBinFiles.Items.Clear();
            if (!newGame.BinMissing)
            {
                if (newGame.Filenames.Count > 0)
                {
                    foreach (String s in newGame.Filenames)
                    {
                        if (s.EndsWith(".bin"))
                        {
                            lbBinFiles.Items.Add(s);
                        }
                    }
                }
            }
        }
コード例 #6
0
        public Form23(String sFolderPath, SimpleLogger sl, Dictionary <String, ClPS1Game> dcClPS1Games, ClVersionHelper cvh, ClGameStructure myGame)
        {
            InitializeComponent();
            slLogger            = sl;
            dcPs1Games          = dcClPS1Games;
            _versionBS          = cvh;
            newGame             = myGame;
            _folderPath         = sFolderPath + "\\" + newGame.FolderIndex + _versionBS.GameDataFolder;
            _currentFilePathIni = String.Empty;
            _docHtmlStr         = String.Empty;
            btSaveIni.Enabled   = false;

            if (!newGame.IniMissing)
            {
                tbGeneTitle.Text      = newGame.Title;
                tbGeneDiscs.Text      = newGame.Discs;
                tbGenePublisher.Text  = newGame.Publisher;
                tbGeneAlphaTitle.Text = newGame.Alphatitle;
                try
                {
                    nuGenePlayers.Value = (decimal)int.Parse(newGame.Players);
                }
                catch (Exception ex)
                {
                    //
                }
                try
                {
                    nuGeneYear.Value = (decimal)int.Parse(newGame.Year);
                }
                catch (Exception ex)
                {
                    //
                }
                _currentFilePathIni        = _folderPath + "\\" + "Game.ini";
                lbCurrentGameIniFile.Text  = _currentFilePathIni;
                btSaveIni.Enabled          = true;
                btReloadTitleDiscs.Enabled = true;
                btIniReload.Enabled        = true;
                tbGeneSearchText.Text      = newGame.Title;
            }

            _currentFilePathImg     = String.Empty;
            lbCurrentPngFile.Text   = _currentFilePathImg;
            btSave.Enabled          = false;
            btPictureReload.Enabled = false;

            if (!newGame.PngMissing)
            {
                try
                {
                    pbCover.Image           = ClPbHelper.ResizeImage((Image)(new Bitmap(newGame.PictureFile)), 226, 226);
                    _currentFilePathImg     = newGame.PictureFileName;
                    lbCurrentPngFile.Text   = _currentFilePathImg;
                    btSave.Enabled          = true;
                    btPictureReload.Enabled = true;
                }
                catch (Exception ex)
                {
                    if (null != slLogger)
                    {
                        slLogger.Fatal(ex.Message);
                    }
                }
            }
            pbCover.AllowDrop = true;
        }