Пример #1
0
        /// <summary>
        /// Perform initialization.
        /// </summary>
        public StopJobsButton Initialize()
        {
            Text        = "stop all";
            ColorScheme = ButtonColorScheme();

            Clicked += async()
                       => await messageBox
                       .Query("stop jobs", "send request to host app?")
                       .OnConfirmedAsync(async() => await jobs.StopAllAsync());

            return(this);
        }
        /// <summary>
        /// Perform initialization.
        /// </summary>
        public ExportValuesButton Initialize()
        {
            Text        = "export values to .sql";
            ColorScheme = ButtonColorScheme();

            Clicked += async()
                       => await messageBox
                       .Query("export values", "export parameter values to .sql file?")
                       .OnConfirmedAsync(ExportOnConfirmed);

            return(this);
        }
Пример #3
0
        /// <summary>
        /// Perform initialization.
        /// </summary>
        public ApplyValuesButton Initialize()
        {
            Text        = "apply calculated values";
            ColorScheme = ButtonColorScheme();

            Clicked += async()
                       => await messageBox
                       .Query("apply values", "apply calculated values to database server configuration?")
                       .OnConfirmedAsync(() =>
            {
                // todo
                return(Task.CompletedTask);
            });

            return(this);
        }
        /// <summary>
        /// Perform initialization.
        /// </summary>
        public CalculateValuesButton Initialize()
        {
            Text        = "calculate immediately";
            ColorScheme = ButtonColorScheme();

            Clicked += async()
                       => await messageBox
                       .Query("calculate values", "calculate parameter values immediately?")
                       .OnConfirmedAsync(() =>
            {
                // todo
                return(Task.CompletedTask);
            });

            return(this);
        }
Пример #5
0
 /// <inheritdoc />
 public override async Task HandleClickAsync()
 => await messageBox
 .Query(Name, "are you sure are you want to quit from ctl app?")
 .OnConfirmedAsync(uiShutdown.StopAsync);