mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-10 10:11:31 +00:00
This commit is contained in:
parent
a35a9c0f6a
commit
bdfddfcb52
4 changed files with 14 additions and 4 deletions
|
|
@ -5,7 +5,8 @@
|
|||
<Grid>
|
||||
<Label Height="28" HorizontalAlignment="Left" Margin="16,14,0,0" Name="label1" VerticalAlignment="Top" Width="120">Build Path:</Label>
|
||||
<TextBox Height="23" Margin="16,37,12,0" Name="textBuildPath" VerticalAlignment="Top" />
|
||||
<ListBox Margin="16,100,99,14" Name="lboxTargets" />
|
||||
<ListBox Margin="16,107,12,14" Name="lboxTargets" />
|
||||
<Label Height="28" HorizontalAlignment="Left" Margin="16,73,0,0" Name="label2" VerticalAlignment="Top" Width="120">Build Type:</Label>
|
||||
<Label Height="28" Margin="16,85,111,0" Name="label3" VerticalAlignment="Top">(Press number on main keyboard)</Label>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ namespace Cosmos.Build.Windows {
|
|||
InitializeComponent();
|
||||
|
||||
KeyDown += new KeyEventHandler(BuildOptionsWindow_KeyDown);
|
||||
Loaded += new RoutedEventHandler(BuildOptionsWindow_Loaded);
|
||||
|
||||
textBuildPath.Text = Builder.GetBuildPath();
|
||||
textBuildPath.IsEnabled = false;
|
||||
|
|
@ -29,15 +30,22 @@ namespace Cosmos.Build.Windows {
|
|||
}
|
||||
}
|
||||
|
||||
void BuildOptionsWindow_Loaded(object sender, RoutedEventArgs e) {
|
||||
//Stupid window always shows up behind console, bring it up.
|
||||
this.Activate();
|
||||
}
|
||||
|
||||
void BuildOptionsWindow_KeyDown(object sender, KeyEventArgs e) {
|
||||
char xChar = e.Key.ToString()[0];
|
||||
var xConverter = new KeyConverter();
|
||||
char xChar = xConverter.ConvertToString(e.Key)[0];
|
||||
if (Char.IsDigit(xChar)) {
|
||||
int xValue = int.Parse(xChar.ToString());
|
||||
if (xValue > 0) {
|
||||
if (xValue <= lboxTargets.Items.Count) {
|
||||
string xType = (string)(lboxTargets.Items[xValue - 1]);
|
||||
Hide();
|
||||
var xBuilder = new Builder();
|
||||
xBuilder.Build((Builder.Target)Enum.Parse(typeof(Builder.Target), xType));
|
||||
xBuilder.Build((Builder.Target)Enum.Parse(typeof(Builder.Target), xType.Remove(0, 3)));
|
||||
}
|
||||
}
|
||||
e.Handled = true;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ namespace Cosmos.Build.Windows {
|
|||
xStartInfo.FileName = aEXEPathname;
|
||||
xStartInfo.Arguments = aArgLine;
|
||||
xStartInfo.WorkingDirectory = aWorkDir;
|
||||
xStartInfo.CreateNoWindow = false;
|
||||
xStartInfo.UseShellExecute = false;
|
||||
xStartInfo.RedirectStandardError = aCapture;
|
||||
xStartInfo.RedirectStandardOutput = aCapture;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Cosmos.Shell.Console {
|
|||
[STAThread]
|
||||
public static void Main() {
|
||||
var xBuilder = new Builder();
|
||||
xBuilder.Build(Builder.Target.QEMU_GDB);
|
||||
xBuilder.Build();
|
||||
}
|
||||
|
||||
public static void Init() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue