using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace OpenFile_SaveFile_CS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            #if DEBUG
                MinimizeBox = false;
            #else
                MinimizeBox = true;
            #endif
        }

        private void butOpen_Click(object sender, EventArgs e)
        {
            ofd.Filter = "DLL|*.dll|Картинки|*.jpg";
            ofd.InitialDirectory = "\\My Documents\\Templates";

            if (DialogResult.OK == ofd.ShowDialog())
            {
                statusBar1.Text = ofd.FileName;
            }
            else
            {
                statusBar1.Text = "Вы нажали на кнопку Отмена!";
            }
        }

        private void butSave_Click(object sender, EventArgs e)
        {
            sfd.Filter = "Картинки|*.jpg";

            if (DialogResult.OK == sfd.ShowDialog())
            {
                statusBar1.Text = sfd.FileName;
            }
            else
            {
                statusBar1.Text = "Вы нажали на кнопку Отмена!";
            }

        }
    }
}