Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Commit

Permalink
Bring a butchered version of MonoTorrent UI (neutered, it does nothin…
Browse files Browse the repository at this point in the history
…g), but shows how to use gui.cs
  • Loading branch information
migueldeicaza committed Nov 11, 2017
1 parent e0ff73b commit c52ff3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -30,12 +30,15 @@ all: config.make mono-curses.dll libmono-curses.so mono-curses.zip mono-curses.p
test.exe: test.cs mono-curses.dll libmono-curses.so
mcs -debug test.cs -r:mono-curses.dll

grun: gtest.exe
MONO_PATH=. mono --debug gtest.exe
grun: gtest.exe guitest.exe
MONO_PATH=. mono --debug guitest.exe

gtest.exe: gtest.cs mono-curses.dll
dmcs -debug gtest.cs -r:mono-curses.dll

guitest.exe: guitest.cs mono-curses.dll
mcs -debug guitest.cs -r:mono-curses.dll

mltest.exe: mltest.cs mono-curses.dll
dmcs -debug mltest.cs -r:mono-curses.dll

Expand Down
4 changes: 2 additions & 2 deletions guitest.cs
Expand Up @@ -23,7 +23,7 @@ bool IListProvider.IsMarked (int n)

void IListProvider.Render (int line, int col, int width, int item)
{
string s = $"{item}";
string s = $"{item} This is item {item}";
if (s.Length > width){
s = s.Substring (0, width);
Curses.addstr (s);
Expand Down Expand Up @@ -182,7 +182,7 @@ static void UpdateStatus ()
status_state.Text = $"{DateTime.Now}";
status_peers.Text = $"{DateTime.Now}";
status_up.Text = "1000";
status_up_speed.Text = "Lots of bytes";
status_up_speed.Text = "Lots";
}

static void Main ()
Expand Down

0 comments on commit c52ff3a

Please sign in to comment.