Example #1
0
        private void restartButton_Click_Click(object sender, EventArgs e)
        {
            MessageBoxButtons buttons      = MessageBoxButtons.OKCancel;
            DialogResult      dialogResult = MessageBox.Show("Are you sure you want to restart the web server? Everyone will temporarily be unable to access it.", "InForm restart", buttons);

            if (dialogResult == DialogResult.OK)
            {
                var x = 1;
                Cursor.Current = Cursors.WaitCursor;
                string projectRoot = ProjectRootService.ComputeProjectRoot();
                string command     = "docker-compose restart";
                string result      = CommandService.Execute(projectRoot, command);
                Cursor.Current = Cursors.Default;

                MessageBox.Show("Succesfully restarted InForm", "Success", MessageBoxButtons.OK);
            }
        }