private void button1_Click(object sender, EventArgs e)
        {
            ServiceReference1.WebServiceSoapClient ws = new ServiceReference1.WebServiceSoapClient();
            string fileName = textBoxFileName.Text;

            labelFiletoText.Text = ws.GetContent(fileName);
        }
示例#2
0
        private void buttonOpenFile_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "TXT | *.txt";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                //textBoxFile_Name = ofd.FileName.ToString;
                textBoxFile_Name.Text     = ofd.SafeFileName;
                textBoxTotalFileName.Text = ofd.FileName;

                ServiceReference1.WebServiceSoapClient ws = new ServiceReference1.WebServiceSoapClient();
                string fileName = textBoxFile_Name.Text;
                labelFiletoText.Text = ws.GetContent(fileName);
            }
        }