public SubmitGame(GameInformation game) : this() { Debug.Assert(game != null); if (game == null) { throw new ArgumentNullException("game"); } _game = game; this.Icon = IconUtilities.ConvertToIcon(Properties.Resources.ReportIcon); _googleIcon = Properties.Resources.Google; _service = new Service(); _service.ListGamesCompleted += new ListGamesCompletedEventHandler(ServiceListGamesCompleted); _service.AddGameCompleted += new AddGameCompletedEventHandler(ServiceAddGameCompleted); _service.AddReleaseCompleted += new AddReleaseCompletedEventHandler(ServiceAddReleaseCompleted); if (_gameList == null) { _service.ListGamesAsync(); _outstandingRefresh = true; } else { this.ServiceListGamesCompleted(null, null); } this.titleLabel.Text = _game.Parameters.Title; this.discIdLabel.Text = _game.Parameters.DiscID; this.firmwareLabel.Text = _game.Parameters.SystemVersion.ToString(); this.regionLabel.Text = _game.Parameters.Region.ToString(); this.versionLabel.Text = _game.Parameters.GameVersion.ToString(); Image gameImage; if (_game.Icon != null) { _game.Icon.Position = 0; gameImage = Image.FromStream(_game.Icon); } else { gameImage = Image.FromStream(new MemoryStream(Resources.InvalidIcon, false)); } this.iconPictureBox.Image = gameImage; _release = new GameRelease(); _release.Title = _game.Parameters.Title; _release.DiscID = _game.Parameters.DiscID; _release.Region = _game.Parameters.Region; _release.SystemVersion = VersionToSingle(_game.Parameters.SystemVersion); _release.GameVersion = VersionToSingle(_game.Parameters.GameVersion); if (_game.Icon != null) { _game.Icon.Position = 0; using (BinaryReader reader = new BinaryReader(_game.Icon)) _iconBytes = reader.ReadBytes(( int )_game.Icon.Length); } }
public DisassemblyDocument( Studio studio ) : this() { Debug.Assert( studio != null ); if( studio == null ) throw new ArgumentNullException( "studio" ); _studio = studio; this.Icon = IconUtilities.ConvertToIcon( Properties.Resources.DisassemblyIcon ); _statementIcon = codeEditorControl.GutterIcons.Images.Add( Properties.Resources.StatementIcon, Color.Transparent ); _statementCallIcon = codeEditorControl.GutterIcons.Images.Add( Properties.Resources.StatementCallIcon, Color.Transparent ); _statementDeadIcon = codeEditorControl.GutterIcons.Images.Add( Properties.Resources.StatementDeadIcon, Color.Transparent ); _statements = new Dictionary<int, Statement>(); this.PopulateMethods(); //CodeEditorSyntaxLoader.SetSyntax( _editor, SyntaxLanguage.Text ); }
public CpuPane(Studio studio) : this() { Debug.Assert(studio != null); if (studio == null) { throw new ArgumentNullException("studio"); } _studio = studio; this.Icon = IconUtilities.ConvertToIcon(Properties.Resources.RegistersIcon); _cpu = _studio.Debugger.Host.CurrentInstance.Cpu; _core0 = _cpu.Cores[0]; _studio.GlobalRefreshRequested += new EventHandler(StudioGlobalRefreshRequested); this.generalRegistersLabel_SizeChanged(this, EventArgs.Empty); _useFriendlyLabels = true; this.friendlyCheckbox.Checked = _useFriendlyLabels; this.UpdateValues(); }