void SetupGUI()
{
left = Panel.Create (this, "left", 4);
right = Panel.Create (this, "right", 4);
bar = new ButtonBar (bar_labels);
menu = new MenuBar (mc_menu);
prompt = new Label (0, Application.Lines-2, "bash$ ") {
Color = Application.ColorBasic
};
entry = new Entry (prompt.Text.Length, Application.Lines-2, Application.Cols - prompt.Text.Length, "") {
Color = Application.ColorBasic,
CanFocus = false,
};
bar.Action += delegate (int n) {
switch (n) {
case 5:
CurrentPanel.Copy (OtherPanel.CurrentPath);
break;
case 9:
menu.Activate (0);
break;
case 10:
var r = MessageBox.Query (56, 7, "Midnight Commander NG", "Do you really want to quit?", "Yes", "No");
if (r == 0)
Running = false;
break;
default:
break;
}
};
Add (left);
Add (right);
Add (bar);
Add (menu);
Add (prompt);
Add (entry);
SetFocus (left);
}