示例#1
0
        private void btn_shutdown_Click(object sender, EventArgs e)
        {
            CShutDown ShutDown = new CShutDown();

            try
            {
                ShutDown.EndWindows(CReg.Get_Servername(), CReg.Get_Username(), CReg.Get_Password());
            }
            catch (Exception ex)
            {
                MessageBox.Show("Fehler bei Methode: shutdown." + ex.ToString());
            }
            ShutDown = null;
        }
示例#2
0
        private void btnShutOmv_click(object sender, EventArgs e)
        {
            // OS Linux herunterfahren
            string servername    = "";
            string linuxusername = "";
            string linuxpw       = "";

            try
            {
                servername    = CReg.Get_Servername();
                linuxusername = CReg.Get_LinuxUsername();
                linuxpw       = CReg.Get_LinuxServerPW();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Daten können nicht eingelesen werden");
            }

            CShutDown shutLinuxvdown = new CShutDown();

            shutLinuxvdown.EndLinux(servername, linuxusername, linuxpw);
            shutLinuxvdown = null;
        }