Voilà je voulais savoir si mon code ne comporte pas de code "inutile" car je veut que mon code soit propre
!
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PS3Lib;
namespace Black_Ops_1_Platinum_Project_v1
{
public partial class Form2 : Form
{
private PS3API PS3 = new PS3API();
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
PS3.ChangeAPI(SelectAPI.ControlConsole);
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
PS3.ChangeAPI(SelectAPI.TargetManager);
}
private void button1_Click(object sender, EventArgs e)
{
PS3.ConnectTarget();
if (PS3.ConnectTarget())
{
MessageBox.Show("You are now connected", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
PS3.CCAPI.Notify(CCAPI.NotifyIcon.TROPHY4, "Connected !");
}
else
{
MessageBox.Show("Connection failed ...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void button2_Click(object sender, EventArgs e)
{
PS3.AttachProcess();
if (PS3.AttachProcess())
{
MessageBox.Show("You are now attached", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
PS3.CCAPI.Notify(CCAPI.NotifyIcon.TROPHY4, "Attached !");
}
else
{
MessageBox.Show("Attach failed ...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
Sachant que le code fonctionne nikel et qu'il n'y a pas d'erreurs ...