private void btnCustomRule_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtCustomRule.Text))
            {
                return;
            }

            settingsFactory.CustomRule = txtCustomRule.Text;

            GetScheduleDayRequest request = new GetScheduleDayRequest()
            {
                Date     = monthCalendarCustomRule.SelectionStart,
                Typicon  = typiconEntity,
                Handler  = new ServiceSequenceHandler(),
                Language = "cs-ru",
                //ApplyParameters = CustomParameters,
                //CheckParameters = new CustomParamsCollection<IRuleCheckParameter>().SetModeParam(HandlingMode.All)
            };

            request.Handler.Settings.Language = LanguageSettingsFactory.Create("cs-ru");

            GetScheduleDayResponse dayResponse = scheduleService.GetScheduleDay(request);

            TextScheduleDayViewer viewer = new TextScheduleDayViewer();

            viewer.Execute(dayResponse.Day);

            webCustomRule.DocumentText = viewer.GetResult();
        }
Exemple #2
0
        private void btnGetSequence_Click(object sender, EventArgs e)
        {
            //try
            //{
            GetScheduleDayRequest request = new GetScheduleDayRequest()
            {
                Date            = monthCalendarSequence.SelectionStart,
                Typicon         = _typiconEntity,
                Handler         = new ServiceSequenceHandler(),
                Language        = "cs-ru",
                ApplyParameters = CustomParameters,
                CheckParameters = new CustomParamsCollection <IRuleCheckParameter>().SetModeParam(HandlingMode.All)
            };

            request.Handler.Settings.Language = LanguageSettingsFactory.Create("cs-ru");

            GetScheduleDayResponse dayResponse = _scheduleService.GetScheduleDay(request);

            TextScheduleDayViewer viewer = new TextScheduleDayViewer();

            viewer.Execute(dayResponse.Day);

            txtSequence.Clear();
            txtSequence.AppendText(viewer.GetResult());
            //}
            //catch (Exception ex)
            //{
            //    txtSequence.Clear();
            //    txtSequence.AppendText(ex.Message);
            //}
        }