Some clean up and tweaks to get the shell UI shown (finally).
This commit is contained in:
1 parent
b38fed070e
commit
2d6d93b6da
5 files changed
+11
-4
No files matched your search
@@ -11,14 +11,14 @@
|
||||
<ResourceDictionary Source="view/Resources/Buttons.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!--<converters:BooleanToVisibilityConverter x:Key="BoolToVisibility" />
|
||||
<converters:BooleanToVisibilityConverter x:Key="BoolToVisibility" />
|
||||
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" VisibilityForNull="Collapsed" />
|
||||
<converters:ModuleColorConverter x:Key="ModuleToColor" />
|
||||
<converters:CloneConverter x:Key="CloneConverter" />
|
||||
<converters:NotConverter x:Key="NotConverter" />
|
||||
<sys:Double x:Key="MaxMenuHeight">700</sys:Double>
|
||||
<converters:TupleConverter x:Key="TupleConverter" />
|
||||
<PopupAnimation x:Key="{x:Static SystemParameters.MenuPopupAnimationKey}">None</PopupAnimation>-->
|
||||
<PopupAnimation x:Key="{x:Static SystemParameters.MenuPopupAnimationKey}">None</PopupAnimation>
|
||||
|
||||
<sys:Double x:Key="TabWidth">200</sys:Double>
|
||||
<sys:Double x:Key="TabHeight">30</sys:Double>
|
||||
|
||||
@@ -20,6 +20,10 @@ namespace mbts.ui.shell
|
||||
private Window _login;
|
||||
public ShellBootstrapper()
|
||||
{
|
||||
#if DEBUG
|
||||
native.NativeMethods.AllocConsole();
|
||||
Console.WriteLine("Alloced Console");
|
||||
#endif
|
||||
// Get the LoginModel instance on this thread to make sure it performs syncronous config initialization.
|
||||
var lm = LoginModel.instance;
|
||||
// Show the dialog on a background thread so animations aren't blocked during the main application startup
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace mbts.ui
|
||||
{
|
||||
public class Icons
|
||||
{
|
||||
static readonly string base_uri = "pack://application:,,,/Images/Icons/";
|
||||
static readonly string base_uri = "pack://application:,,,/uicore/Images/Icons/";
|
||||
private static ResourceDictionary _resources = (ResourceDictionary)Application.LoadComponent(new Uri("/uicore/Images/Vector/Icons.xaml", UriKind.RelativeOrAbsolute));
|
||||
|
||||
private static Uri uri(string filename) {
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace mbts.ui.shell
|
||||
return _username;
|
||||
}
|
||||
public string get_workspace() {
|
||||
return _workspace;
|
||||
return _workspace ?? "";
|
||||
}
|
||||
public Task<IEnumerable<string>> workspaces_for(string user) {
|
||||
return _enum_workspace.get_workspaces(user);
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
|
||||
using System.Reactive.Linq;
|
||||
using System.IO;
|
||||
using System.Reactive.Disposables;
|
||||
using mbts;
|
||||
|
||||
namespace bts.api.core {
|
||||
|
||||
@@ -17,6 +18,7 @@ namespace bts.api.core {
|
||||
|
||||
public QuickbusClientChannel(ServiceContext context, string type_name, string qualifier) : base(context) {
|
||||
_client = ApiNativeMethods.api_client_create(context.native_context, type_name, qualifier);
|
||||
System.Diagnostics.Trace.Assert(_client != IntPtr.Zero);
|
||||
}
|
||||
|
||||
public override void Dispose() {
|
||||
@@ -48,6 +50,7 @@ namespace bts.api.core {
|
||||
tcs.TrySetResult(new Result<Response>(res.header.Code));
|
||||
}
|
||||
};
|
||||
System.Diagnostics.Trace.Assert(_client != IntPtr.Zero, "Channel may have been disposed");
|
||||
ApiNativeMethods.api_client_send(_client, buffer, buffer.Length, callback, IntPtr.Zero);
|
||||
tcs.Task.ContinueWith(_ => GC.KeepAlive(callback));
|
||||
return tcs.Task;
|
||||
|
||||
Reference in new issue
Block a user