Exemplo n.º 1
0
 private void Confirm()
 {
     if (ConfirmCommand != null)
     {
         ConfirmCommand.Execute(ValueCurrent);
     }
 }
Exemplo n.º 2
0
        private void Confirm()
        {
            if (ConfirmCommand != null)
            {
                ConfirmCommand.Execute(ValueCurrent);
            }

            RaiseConfirmedEvent();
        }
Exemplo n.º 3
0
 private void Confirm()
 {
     if (ConfirmCommand != null)
     {
         ConfirmCommand.Execute(ValueCurrent);
         StringValueCurrent = "";
         ValueCurrent       = null;
         ValueDefault       = null;
         _isDotCount        = 0;
         IsValid            = false;
     }
 }
Exemplo n.º 4
0
        public async Task <OkResult> Update([FromBody] Update update) // Handling bot updates
        {
            var message = update.Message;
            var courier = _dbContext.Couriers.FirstOrDefault(c => c.TelegramUsrName == message.From.Username);
            var client  = Bot.Bot.GetClient();

            if (courier == null) // Check registration(is he courier)
            {
                await client.SendTextMessageAsync(message.Chat.Id,
                                                  "Sorry u're not registed. More info at https://github.com/RNRNRNR/deliverysystemAPI");

                return(Ok());
            }

            switch (courier.Status)
            {
            case 3:
                var confirm = new ConfirmCommand();
                if (message.Text.Contains(confirm.Name))
                {
                    confirm.Execute(message, client, _dbContext);
                }
                else
                {
                    await client.SendTextMessageAsync(message.Chat.Id, "To confirm delivery type /confirmdelivery");
                }

                break;

            case 1:
                var work = new WorkCommand();
                if (message.Text.Contains(work.Name))
                {
                    work.Execute(message, client, _dbContext);
                }
                break;

            case 2:
                await client.SendTextMessageAsync(message.Chat.Id, "Receive ur packages");

                break;

            case null:
                var start = new StartCommand();
                if (message.Text.Contains(start.Name))
                {
                    start.Execute(message, client, _dbContext);
                }
                break;
            }

            return(Ok());
        }
Exemplo n.º 5
0
        protected override void OnClosing(CancelEventArgs e)
        {
            if (_result == MessageBoxResult.OK || _result == MessageBoxResult.Yes)
            {
                ConfirmCommand?.Execute(e);
            }
            else if (_result == MessageBoxResult.Cancel)//alt +f4 && close button && cancel button 고로 취소 버튼 외의 것 에서 취소를 할 때에 대한 확인 작업 필요
            {
                CancelCommand?.Execute(e);
            }

            base.OnClosing(e);
        }
 private void Continue()
 {
     ConfirmCommand.Execute(null);
 }