Ejemplo n.º 1
0
 public JsSimpleCommand(IWebView webView, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand)
 {
     _WebView = webView;
     _JavascriptToCSharpConverter = converter;
     _JSSimpleCommand             = simpleCommand;
     JSValue = _WebView.Factory.CreateObject(true);
 }
Ejemplo n.º 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;
                    }
                }
            }
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 5
0
 public JsSimpleCommand Build(ISimpleCommand command)
 {
     return new JsSimpleCommand(_HTMLViewContext.WebView, _JavascriptToCSharpConverter, command);
 }
Ejemplo n.º 6
0
 public JsSimpleCommand <T> Build <T>(ISimpleCommand <T> command)
 {
     return(Cache(command, new JsSimpleCommand <T>(_HtmlViewContext, _JavascriptToCSharpConverter, command)));
 }
Ejemplo n.º 7
0
 public JsSimpleCommand(HtmlViewContext context, IJavascriptToGlueMapper converter, ISimpleCommand <T> simpleCommand) :
     base(context, converter)
 {
     _JsSimpleCommand = simpleCommand;
 }
Ejemplo n.º 8
0
 public void RecordCommandExecutionInfo([NotNull] ISimpleCommand command)
 {
 }
Ejemplo n.º 9
0
 public JsSimpleCommand <T> Build <T>(ISimpleCommand <T> command)
 {
     return(Cache(command, new JsMappableSimpleCommand <T>(_HtmlViewContext, _JavascriptToGlueMapper, command)));
 }
Ejemplo n.º 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)));
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 13
0
 public JsSimpleCommand Build(ISimpleCommand command)
 {
     return(Cache(command, new JsMappableSimpleCommand(_HtmlViewContext, _JavascriptToCSharpConverter, command)));
 }
Ejemplo n.º 14
0
 public JSSimpleCommand(IJSOBuilder builder, ISimpleCommand icValue)
 {
     _JSSimpleCommand = icValue;
     JSValue          = builder.CreateJSO();
 }
Ejemplo n.º 15
0
 public JSSimpleCommand(IJSOBuilder builder, ISimpleCommand icValue)
 {
     _JSSimpleCommand = icValue;
     JSValue = builder.CreateJSO();    
 }
Ejemplo n.º 16
0
 public JsMappableSimpleCommand(HTMLViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand resultCommand)
     : base(context, converter, resultCommand)
 {
 }
Ejemplo n.º 17
0
 public JSSimpleCommand(IWebView iCefV8Context, ISimpleCommand icValue)
 {
     _IWebView = iCefV8Context;
     _JSSimpleCommand = icValue;
     JSValue = _IWebView.Factory.CreateObject(true);
 }
Ejemplo n.º 18
0
 public JsSimpleCommand Build(ISimpleCommand command)
 {
     return(new JsSimpleCommand(_HTMLViewContext, _JavascriptToCSharpConverter, command));
 }
Ejemplo n.º 19
0
 private void RegisterViewModelCommand(ISimpleCommand command)
 {
     _registeredCommands.Add(command);
 }
Ejemplo n.º 20
0
 public MainModalViewModel(ConfirmationMessage confirmationMessage) : base(confirmationMessage)
 {
     CancelMessage = confirmationMessage.CancelMessage;
     CancelCommand = new RelaySimpleCommand(Cancel);
 }
Ejemplo n.º 21
0
 public JsSimpleCommand Build(ISimpleCommand command)
 {
     return(Cache(command, new JsSimpleCommand(_HtmlViewContext, _JavascriptToGlueMapper, command)));
 }
Ejemplo n.º 22
0
 public void RecordQueriedPartitions([NotNull] ISimpleCommand command)
 {
     queriedPartitions.Mark(command.QueriedPartitionsCount);
 }
Ejemplo n.º 23
0
 public JSSimpleCommand(CefV8CompleteContext iCefV8Context, IJSOBuilder builder, ISimpleCommand icValue)
 {
     _CefV8Context = iCefV8Context;
     _JSSimpleCommand = icValue;
     JSValue = builder.CreateJSO();    
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 26
0
 public JSSimpleCommand(IWebView iCefV8Context, ISimpleCommand icValue)
 {
     _IWebView        = iCefV8Context;
     _JSSimpleCommand = icValue;
     JSValue          = _IWebView.Factory.CreateObject(true);
 }
Ejemplo n.º 27
0
 public void RecordQueriedPartitions([NotNull] ISimpleCommand command)
 {
 }