예제 #1
0
 /// <summary>
 /// Метод обновления данных полей отвечающих за декодировку
 /// </summary>
 private void UpdateDecode(DataSaver dataSaver)
 {
     pictureBoxDecode.SizeMode = PictureBoxSizeMode.StretchImage;
     richTextBoxDecode.Text    = dataSaver.text;
     labelPathDecode.Text      = dataSaver.path;
     pictureBoxDecode.Image    = dataSaver.img;
 }
예제 #2
0
 /// <summary>
 /// Кнопка "Выход"
 /// </summary>
 private void ExitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (SettingsForm.SaveWhenQuit)
     {
         DataSaver dataSaverEncode = new DataSaver(richTextBoxEncode.Text, labelPathEncode.Text, pictureBoxEncode.Image);
         Loader.Save(dataSaverEncode, Loader.pathEncode);
         DataSaver dataSaverDecode = new DataSaver(richTextBoxDecode.Text, labelPathDecode.Text, pictureBoxDecode.Image);
         Loader.Save(dataSaverDecode, Loader.pathDecode);
     }
     Close();
 }
예제 #3
0
        public MainForm()
        {
            InitializeComponent();
            DataSaver dataEncode = (DataSaver)Loader.Upload(Loader.pathEncode);

            UpdateEncode(dataEncode);
            DataSaver dataDecode = (DataSaver)Loader.Upload(Loader.pathDecode);

            UpdateDecode(dataDecode);
            openFileEncode        = new OpenFileDialog();
            openFileEncode.Filter = "(*.jpg;*.png)|*.jpg;*.png;";
            openFileDecode        = new OpenFileDialog();
            openFileDecode.Filter = "(*.jpg;*.png)|*.jpg;*.png;";
            coder = new Coder(pictureBoxDecode, richTextBoxDecode, pictureBoxEncode, richTextBoxEncode);
        }