eventlog: fix some window flashes and controller logic
This commit is contained in:
parent
ab344dc92c
commit
505c2c18f1
|
@ -66,7 +66,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
// A short delay is less annoying than
|
// A short delay is less annoying than
|
||||||
// a flashing window
|
// a flashing window
|
||||||
int delay = 500;
|
int delay = 1000;
|
||||||
|
|
||||||
if (watch.ElapsedMilliseconds < delay)
|
if (watch.ElapsedMilliseconds < delay)
|
||||||
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
|
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
|
||||||
|
@ -145,15 +145,27 @@ namespace SparkleShare {
|
||||||
public SparkleEventLogController ()
|
public SparkleEventLogController ()
|
||||||
{
|
{
|
||||||
Program.Controller.ShowEventLogWindowEvent += delegate {
|
Program.Controller.ShowEventLogWindowEvent += delegate {
|
||||||
if (!WindowIsOpen)
|
if (!WindowIsOpen) {
|
||||||
ContentLoadingEvent ();
|
ContentLoadingEvent ();
|
||||||
|
|
||||||
if (this.selected_folder == null) {
|
if (this.selected_folder == null) {
|
||||||
new Thread (() => {
|
new Thread (() => {
|
||||||
UpdateChooserEvent (Folders);
|
Stopwatch watch = new Stopwatch ();
|
||||||
UpdateContentEvent (HTML);
|
|
||||||
|
|
||||||
}).Start ();
|
watch.Start ();
|
||||||
|
string html = HTML;
|
||||||
|
watch.Stop ();
|
||||||
|
|
||||||
|
int delay = 1000;
|
||||||
|
|
||||||
|
if (watch.ElapsedMilliseconds < delay)
|
||||||
|
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
|
||||||
|
|
||||||
|
UpdateChooserEvent (Folders);
|
||||||
|
UpdateContentEvent (html);
|
||||||
|
|
||||||
|
}).Start ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowIsOpen = true;
|
WindowIsOpen = true;
|
||||||
|
|
Loading…
Reference in a new issue