예제 #1
0
 private void сохранитьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (saveFileDialog1.ShowDialog() == DialogResult.OK)
     {
         string path = saveFileDialog1.FileName;
         WorkWithStack.SaveFile(label2.Text, path);
     }
 }
예제 #2
0
        private void открытьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string path = openFileDialog1.FileName;
                label1.Text = File.ReadAllText(path);

                var instance = new WorkWithStack(label1.Text);
                label2.Text = String.Join(" ", instance.FormStacks());
            }
        }