Die Potato (or music), locken beim Zeichnen, Threads von Parse, Receiver und Sender laufen nun im Hintergrund

This commit is contained in:
2014-05-13 19:15:41 +02:00
parent c3088bb36a
commit f8c1993c9f
8 changed files with 22 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ namespace WorldOfPeacecraft
private Font MessageFont;
private Font SenderFont;
private Font IregularSenderFont;
private Music m = new Music();
//private Music m = new Music();
public ChatOutputBox (IBackend backend)
{
@@ -43,7 +43,7 @@ namespace WorldOfPeacecraft
this.SelectionFont = MessageFont;
this.AppendText (message.GetMessage ());
if (message.GetMessage().Contains("nyancat")) {
m.Playmusic ("poptart");
//m.Playmusic ("poptart");
}
}
}

View File

@@ -16,7 +16,7 @@ namespace WorldOfPeacecraft
private ChatPanel ChatPanel;
private OnlinePlayerList OnlinePlayerList;
private Music m = new Music();
//private Music m = new Music();
public Gui ()
{
@@ -40,6 +40,13 @@ namespace WorldOfPeacecraft
Backend.StartThreads ();
}
protected override void OnPaint (PaintEventArgs e)
{
lock (Backend) {
base.OnPaint(e);
}
}
public void InitializeComponents ()
{
MapPanel.InitializeComponents ();
@@ -65,7 +72,7 @@ namespace WorldOfPeacecraft
this.ResumeLayout();
m.Playmusic ("overworld");
//m.Playmusic ("overworld");
}
protected override void OnClosing (System.ComponentModel.CancelEventArgs e)

View File

@@ -17,8 +17,10 @@ namespace WorldOfPeacecraft
Application.Run (splash);
}
private static void OnGuiLoaded(SplashScreen screen, Gui gui){
screen.Hide ();
gui.Show ();
screen.BeginInvoke(new MethodInvoker(delegate {
screen.Hide ();
gui.Show ();
}));
}
}
}

View File

@@ -10,7 +10,7 @@ namespace WorldOfPeacecraft
{
private string ImagesFolder = "textures/";
private Image Logo;
private Music m = new Music();
//private Music m = new Music();
private Gui gui;
private IBackend backend;
@@ -25,7 +25,7 @@ namespace WorldOfPeacecraft
t.Start ();
this.SetClientSizeCore (450, 150);
Logo = Image.FromFile (ImagesFolder + "splashscreen.png");
m.Playmusic ("splashscreen");
//m.Playmusic ("splashscreen");
}
protected override void OnPaint (PaintEventArgs e)