36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Threading;
|
|
|
|
namespace mbts.ui.tests
|
|
{
|
|
class TestShellWindow : IShellWindow
|
|
{
|
|
#region IShellWindow boilerplate
|
|
public string Title { get; set; }
|
|
public event Action TitleChanged = () => { };
|
|
public System.Windows.Media.ImageSource Icon { get { return null; } }
|
|
public event Action IconChanged = () => { };
|
|
public IShellModule Owner { get; set; }
|
|
public void GetState(System.IO.Stream save_here) { }
|
|
#endregion
|
|
|
|
public Dispatcher Dispatcher { get; private set; }
|
|
public ShellWindowUI GetContent() {
|
|
this.Dispatcher = Dispatcher.CurrentDispatcher;
|
|
var content = new System.Windows.Forms.Button() { Text = "Click Me!", Width = 100, Height = 100 };
|
|
return new ShellWindowUI(new System.Runtime.InteropServices.HandleRef(content, content.Handle));
|
|
}
|
|
|
|
public bool IsDisposed { get; set; }
|
|
public void Dispose() { IsDisposed = true; }
|
|
}
|
|
|
|
class TestSlowWindow : TestShellWindow, ISlowWindow {
|
|
public void thread_init() { }
|
|
}
|
|
}
|