Beispiel #1
0
 public JsSimpleCommand(IWebView webView, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand)
 {
     _WebView = webView;
     _JavascriptToCSharpConverter = converter;
     _JSSimpleCommand             = simpleCommand;
     JSValue = _WebView.Factory.CreateObject(true);
 }
Beispiel #2
0
        public void ExecuteCommand(ISimpleCommand command)
        {
            if (command is MoveCommand)
            {
                string steps = command.Data;
                foreach (char c in steps.ToLower())
                {
                    switch (c)
                    {
                    case 'f':
                        Move(1);
                        break;

                    case 'b':
                        Move(-1);
                        break;

                    case 'l':
                        Rotate(-90);
                        break;

                    case 'r':
                        Rotate(90);
                        break;

                    default:
                        ReportObsticle();
                        return;
                    }
                }
            }
        }
Beispiel #3
0
        public MessageModalViewModel(MessageInformation messageInformation)
        {
            Title     = messageInformation.Title;
            Message   = messageInformation.Message;
            OkMessage = messageInformation.OkMessage;

            OkCommand = new RelaySimpleCommand(Ok);
        }
 public void RecordCommandExecutionInfo(ISimpleCommand command)
 {
     queriedPartitions.Mark(command.QueriedPartitionsCount);
     if (command.ResponseSize.HasValue)
     {
         responseBytesPerMinute.Mark(command.ResponseSize.Value);
         responseBytes.Update(command.ResponseSize.Value);
     }
 }
 public JsSimpleCommand Build(ISimpleCommand command)
 {
     return new JsSimpleCommand(_HTMLViewContext.WebView, _JavascriptToCSharpConverter, command);
 }
Beispiel #6
0
 public JsSimpleCommand <T> Build <T>(ISimpleCommand <T> command)
 {
     return(Cache(command, new JsSimpleCommand <T>(_HtmlViewContext, _JavascriptToCSharpConverter, command)));
 }
 public JsSimpleCommand(HtmlViewContext context, IJavascriptToGlueMapper converter, ISimpleCommand <T> simpleCommand) :
     base(context, converter)
 {
     _JsSimpleCommand = simpleCommand;
 }
 public void RecordCommandExecutionInfo([NotNull] ISimpleCommand command)
 {
 }
 public JsSimpleCommand <T> Build <T>(ISimpleCommand <T> command)
 {
     return(Cache(command, new JsMappableSimpleCommand <T>(_HtmlViewContext, _JavascriptToGlueMapper, command)));
 }
Beispiel #10
0
 public static ISimpleCommandMetrics GetMetrics([NotNull] this ISimpleCommand command, [NotNull] ICassandraClusterSettings settings)
 {
     return(!settings.EnableMetrics
                ? (ISimpleCommandMetrics)NoOpMetrics.Instance
                : new SimpleCommandMetrics(GetMetricsContext(command, "Simple"), FormatSinglePartitionKey(command)));
 }
Beispiel #11
0
 public JsSimpleCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand) :
     base(context, converter)
 {
     _JsSimpleCommand = simpleCommand;
 }
 public JsMappableSimpleCommand(HtmlViewContext context, IJavascriptToGlueMapper converter, ISimpleCommand resultCommand)
     : base(context, converter, resultCommand)
 {
 }
Beispiel #13
0
 public JsSimpleCommand Build(ISimpleCommand command)
 {
     return(Cache(command, new JsMappableSimpleCommand(_HtmlViewContext, _JavascriptToCSharpConverter, command)));
 }
Beispiel #14
0
 public JSSimpleCommand(IJSOBuilder builder, ISimpleCommand icValue)
 {
     _JSSimpleCommand = icValue;
     JSValue          = builder.CreateJSO();
 }
 public JSSimpleCommand(IJSOBuilder builder, ISimpleCommand icValue)
 {
     _JSSimpleCommand = icValue;
     JSValue = builder.CreateJSO();    
 }
 public JsMappableSimpleCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand resultCommand)
     : base(context, converter, resultCommand)
 {
 }
 public JSSimpleCommand(IWebView iCefV8Context, ISimpleCommand icValue)
 {
     _IWebView = iCefV8Context;
     _JSSimpleCommand = icValue;
     JSValue = _IWebView.Factory.CreateObject(true);
 }
Beispiel #18
0
 public JsSimpleCommand Build(ISimpleCommand command)
 {
     return(new JsSimpleCommand(_HTMLViewContext, _JavascriptToCSharpConverter, command));
 }
Beispiel #19
0
 private void RegisterViewModelCommand(ISimpleCommand command)
 {
     _registeredCommands.Add(command);
 }
Beispiel #20
0
 public MainModalViewModel(ConfirmationMessage confirmationMessage) : base(confirmationMessage)
 {
     CancelMessage = confirmationMessage.CancelMessage;
     CancelCommand = new RelaySimpleCommand(Cancel);
 }
Beispiel #21
0
 public JsSimpleCommand Build(ISimpleCommand command)
 {
     return(Cache(command, new JsSimpleCommand(_HtmlViewContext, _JavascriptToGlueMapper, command)));
 }
Beispiel #22
0
 public void RecordQueriedPartitions([NotNull] ISimpleCommand command)
 {
     queriedPartitions.Mark(command.QueriedPartitionsCount);
 }
 public JSSimpleCommand(CefV8CompleteContext iCefV8Context, IJSOBuilder builder, ISimpleCommand icValue)
 {
     _CefV8Context = iCefV8Context;
     _JSSimpleCommand = icValue;
     JSValue = builder.CreateJSO();    
 }
Beispiel #24
0
 public JsSimpleCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand)
 {
     _HTMLViewContext             = context;
     _JavascriptToCSharpConverter = converter;
     _JSSimpleCommand             = simpleCommand;
 }
 public JsSimpleCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand)
 {
     _HTMLViewContext = context;
     _JavascriptToCSharpConverter = converter;
     _JSSimpleCommand = simpleCommand;
 }
Beispiel #26
0
 public JSSimpleCommand(IWebView iCefV8Context, ISimpleCommand icValue)
 {
     _IWebView        = iCefV8Context;
     _JSSimpleCommand = icValue;
     JSValue          = _IWebView.Factory.CreateObject(true);
 }
Beispiel #27
0
 public void RecordQueriedPartitions([NotNull] ISimpleCommand command)
 {
 }