Example #1
0
        private void buttonLoadFile_Click(object sender, EventArgs e)
        {
            try
            {
                FileMethod.LoadFile(_userActive.userId);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            _statusFile = StatusFileEnum.My;

            ButtonActive(buttonMyFiles);
            FillTable();
        }
Example #2
0
        private void dataGridViewFiles_DragDrop(object sender, DragEventArgs e)
        {
            try
            {
                string[] paths = (string[])e.Data.GetData(DataFormats.FileDrop);

                foreach (string path in paths)
                {
                    FileMethod.LoadFile(_userActive.userId, path);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            _statusFile = StatusFileEnum.My;

            ButtonActive(buttonMyFiles);
            FillTable();
        }