This commit is contained in:
kudzu_cp 2010-07-27 00:44:41 +00:00
parent e2990d4c00
commit ec8ede01f6
5 changed files with 25 additions and 5 deletions

View file

@ -86,8 +86,10 @@ namespace Cosmos.Debug.GDB {
private void FormMain_Load(object sender, EventArgs e) {
Windows.mMainForm = this;
Settings.Load();
if (mitmConnect.Enabled) {
if (Settings.Filename != "") {
Settings.Load();
}
if (Settings.AutoConnect) {
Connect(true);
}
}

View file

@ -7,8 +7,13 @@ namespace Cosmos.Debug.GDB {
static class Program {
[STAThread]
static void Main() {
var xCLine = System.Environment.GetCommandLineArgs();
Settings.Filename = xCLine[1];
var xArgs = System.Environment.GetCommandLineArgs();
if (xArgs.Length > 1) {
Settings.Filename = xArgs[1];
}
if (xArgs.Length > 2) {
Settings.AutoConnect = string.Compare(xArgs[2], "/Connect", true) == 0;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

View file

@ -7,12 +7,18 @@ using System.Windows.Forms;
namespace Cosmos.Debug.GDB {
public class Settings {
static protected string mFilename;
static protected string mFilename = "";
static public string Filename {
get { return mFilename; }
set { mFilename = value; }
}
static protected bool mAutoConnect = false;
static public bool AutoConnect {
get { return mAutoConnect; }
set { mAutoConnect = value; }
}
static public SettingsDS DS = new SettingsDS();
static public void Save() {

View file

@ -57,6 +57,11 @@
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Breakpoints.cgdb">
<SubType>Content</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
<Target Name="BeforeBuild">
</Target>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" standalone="yes"?>
<SettingsDS xmlns="http://tempuri.org/SettingsDS.xsd" />