Exemplo n.º 1
0
        //进入关机等功能
        private void imageButton_Setup_Click(object sender, EventArgs e)
        {
            //从接口获取文件FTP的上传路径
            //string interface_Ftp = m_interfaceStr + "?method=getFtpPath";
            //string interface_Upload = m_interfaceStr + "?method=uploadFile";
            //string responseText = "";
            //string removeDir = "";//服务器返回的FTP文件存放路径
            ////if (HttpWebResponseUtility.getFtpDirRequestStatusCode(interface_Ftp, "010101", out responseText)
            ////    != System.Net.HttpStatusCode.OK)
            ////{

            ////    //接口调用失败,停止下面的工作,直接退出
            ////    writeMsg("错误,路径接口调用失败,请检查网络及服务器!");
            ////    return;
            ////}

            //if (HttpWebResponseUtility.getUrlRequestStatusCode(interface_Upload, "010101", "010101",
            //                            "1.wav", "1/101/103/22.mp4", "20121210232323", "128", "30",
            //                            out responseText)
            //                            != System.Net.HttpStatusCode.OK)
            //{

            //    //接口调用失败,停止下面的工作,直接退出
            //    writeMsg("错误,上传接口调用失败,请检查网络及服务器!");
            //    return;

            //}

            FormPassWord form2 = new FormPassWord();
            DialogResult result = form2.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.Cancel)
                return;

            ShutDownForm form1 = new ShutDownForm();
            form1.ShowDialog();
        }
Exemplo n.º 2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            FormPassWord form2 = new FormPassWord();
            DialogResult result = form2.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.Cancel)
                return;

            writeMsg("您选择了退出系统(exit)...");
            threadRunFlag = false;
            this.Close();
        }