static async Task GetDiagnostics()
        {
            var log = await DriverDaemon.InvokeAsync(d => d.GetCurrentLog());

            var diagnostics = new DiagnosticInfo(log);
            await Out.WriteLineAsync(diagnostics.ToString());
        }
        static async Task GetCurrentLog()
        {
            var log = await DriverDaemon.InvokeAsync(d => d.GetCurrentLog());

            foreach (var message in log)
            {
                await Out.WriteLineAsync(Log.GetStringFormat(message));
            }
        }
예제 #3
0
        static async Task ListTypes <T>()
        {
            var types = from path in await DriverDaemon.InvokeAsync(d => d.GetChildTypes <T>())
                        select new PluginReference(path);

            foreach (var type in types)
            {
                var output = string.IsNullOrWhiteSpace(type.Name) ? type.Path : $"{type.Path} [{type.Name}]";
                await Out.WriteLineAsync(output);
            }
        }
예제 #4
0
        public async static void UnhandledException(object sender, Eto.UnhandledExceptionEventArgs e)
        {
            var appInfo = await DriverDaemon.InvokeAsync(d => d.GetApplicationInfo());

            var exception = (Exception)e.ExceptionObject;
            await File.WriteAllLinesAsync(Path.Join(appInfo.AppDataDirectory, "ux.log"),
                                          new string[]
            {
                DateTime.Now.ToString(),
                exception.GetType().FullName,
                exception.Message,
                exception.Source,
                exception.StackTrace,
                exception.TargetSite.Name
            }
                                          );
        }
 static async Task Detect()
 {
     await DriverDaemon.InvokeAsync(d => d.DetectTablets());
 }
 static async Task SetInputHook(bool isHooked)
 {
     await DriverDaemon.InvokeAsync(d => d.SetInputHook(isHooked));
 }
예제 #7
0
 static async Task ApplySettings(Settings settings)
 {
     await DriverDaemon.InvokeAsync(d => d.SetSettings(settings));
 }
예제 #8
0
 static async Task <Settings> GetSettings()
 {
     return(await DriverDaemon.InvokeAsync(d => d.GetSettings()));
 }