Beispiel #1
0
        private void EVESaveIn(object sender, EventArgs e)
        {
            string rez = _currentpath;

            if (DialogResult.OK == SFD1.ShowDialog())
            {
                rez = SFD1.FileName;
                File.Delete(SFD1.FileName);
                RTBMyText.SaveFile(SFD1.FileName);
            }

            else
            {
                MessageBox.Show("Cancel");
            }
            _currentpath = rez;
        }
Beispiel #2
0
        private void EVESave(object sender, EventArgs e)
        {
            string rez = _currentpath;

            if (_currentpath == "C:\\MyFirstProject.rtf")
            {
                if (DialogResult.OK == SFD1.ShowDialog())
                {
                    rez = SFD1.FileName + ".rtf";
                    RTBMyText.SaveFile(rez);
                    MessageBox.Show(rez);
                }

                else
                {
                    MessageBox.Show("Cancel");
                }
                _currentpath = rez;
            }
            else
            {
                RTBMyText.SaveFile(_currentpath);
            }
        }