예제 #1
0
        protected override void Execute(CodeActivityContext context)
        {
            var caption = Заголовок.Get((ActivityContext)context).ToString();
            var text    = Текст.Get((ActivityContext)context).ToString();

            MessageBox.Show(text, caption);
            WorkflowExecutionLog.Write(this, caption + ": " + text);
            WorkflowExecutionLog.Write(this, string.Empty);
        }
예제 #2
0
        protected override void Execute(CodeActivityContext context)
        {
            var random       = new Random();
            var from         = От.Get((ActivityContext)context);
            var to           = До.Get((ActivityContext)context);
            var randomNumber = random.Next(from, to);

            Число.Set(context, randomNumber);

            WorkflowExecutionLog.Write(this, "Сгенерировано случайное число: " + randomNumber);
            WorkflowExecutionLog.Write(this, string.Empty);
        }
예제 #3
0
        protected override void Execute(CodeActivityContext context)
        {
            var text = Печатать.Get((ActivityContext)context).ToString();

            if (Перевод_строки)
            {
                WorkflowExecutionLog.Write(this, text);
            }
            else
            {
                WorkflowExecutionLog.Write(this, text);
            }

            WorkflowExecutionLog.Write(this, string.Empty);
        }
        protected override void Execute(CodeActivityContext context)
        {
            var inputIntForm = new InputIntForm();

            inputIntForm.Number  = Число.Get((ActivityContext)context);
            inputIntForm.Message = Надпись.Get((ActivityContext)context);

            string logOutput;
            var    res = inputIntForm.ShowDialog();

            if (res == DialogResult.OK)
            {
                Число.Set(context, inputIntForm.Number);
                logOutput = inputIntForm.Message + ": " + inputIntForm.Number;
            }
            else
            {
                logOutput = "Число не было введено";
            }
            WorkflowExecutionLog.Write(this, logOutput);
            WorkflowExecutionLog.Write(this, string.Empty);
        }
 protected override void Execute(CodeActivityContext context)
 {
     MessageBox.Show(Текст, Заголовок);
     WorkflowExecutionLog.Write(this, Заголовок + ": " + Текст);
     WorkflowExecutionLog.Write(this, string.Empty);
 }