-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from 9xbt/Development
fix
- Loading branch information
Showing
12 changed files
with
272 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using System.IO; | ||
using PrismAPI.Graphics; | ||
|
||
namespace GoOS.GUI.Apps.GoIDE | ||
{ | ||
public class WelcomeFrame : Window | ||
{ | ||
Button CancelButton; | ||
Button NextButton; | ||
|
||
public WelcomeFrame() | ||
{ | ||
// Create the window. | ||
AutoCreate(WindowDock.Center, 400, 300, "Welcome - GoIDE"); | ||
|
||
// Initialize the controls. | ||
CancelButton = new Button(this, Convert.ToUInt16(Contents.Width - 132), Convert.ToUInt16(Contents.Height - 30), 64, 20, "Cancel") { Clicked = CancelButton_Click }; | ||
NextButton = new Button(this, Convert.ToUInt16(Contents.Width - 58), Convert.ToUInt16(Contents.Height - 30), 48, 20, "Next") { Clicked = NextButton_Click }; | ||
|
||
// Paint the window. | ||
Contents.Clear(Color.LightGray); | ||
RenderSystemStyleBorder(); | ||
Contents.DrawFilledRectangle(2, Convert.ToUInt16(Contents.Height - 40), Convert.ToUInt16(Contents.Width - 4), 38, 0, Color.DeepGray); | ||
Contents.DrawString(10, 10, "Welcome", Fonts.Font_2x, Color.White); | ||
Contents.DrawString(10, 52, "Welcome to GoIDE! This program will let you\ncreate and debug GoOS applications.\n\nGoIDE currently supports GoCode and 9xCode.\n\nPress next to install GoIDE and create a new\nproject.", Fonts.Font_1x, Color.White); | ||
CancelButton.Render(); | ||
NextButton.Render(); | ||
} | ||
|
||
private void NextButton_Click() | ||
{ | ||
Dialogue msg = new Dialogue("Setup Wizard", "Installing GoIDE...", default, Dialogue.infoIcon); | ||
WindowManager.AddWindow(msg); | ||
WindowManager.Update(); | ||
|
||
Directory.CreateDirectory(@"0:\content\prf\GoIDE"); | ||
Directory.CreateDirectory(@"0:\content\prf\GoIDE\Projects"); | ||
Directory.CreateDirectory(@"0:\content\prf\GoIDE\SaveData"); | ||
|
||
msg.Dispose(); | ||
Dispose(); | ||
WindowManager.AddWindow(new NewProjectFrame()); | ||
} | ||
|
||
private void CancelButton_Click() | ||
{ | ||
Dispose(); | ||
Dialogue.Show("GoIDE", "You have canceled GoIDE setup.", default, WindowManager.errorIcon); | ||
} | ||
} | ||
} |
Oops, something went wrong.