Exemple #1
0
        public void OnOpenFileForRemoteImageCollection()
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Filter = "csv files (*.csv)|*.csv";
            fileDialog.ShowDialog();
            if (fileDialog.CheckFileExists && fileDialog.FileName != "")
            {
                try
                {
                    var remoteImages = RemoteImage.ReadRemoteImagesFromFile(fileDialog.FileName);
                    remoteImages.ForEach((remoteImage) =>
                    {
                        RemoteImageCollection.Add(remoteImage);
                    });
                }
                catch
                {
                    MessageBox.Show("Помилка CSV файлу, будь ласка, перевірте CSV файл!", "Перевірте CSV файл");
                }
            }
        }
Exemple #2
0
        public void OnOpenFileForRemoteImageCollection()
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Filter = "csv files (*.csv)|*.csv";
            fileDialog.ShowDialog();
            if (fileDialog.CheckFileExists && fileDialog.FileName != "")
            {
                try
                {
                    var remoteImages = RemoteImage.ReadRemoteImagesFromFile(fileDialog.FileName);
                    remoteImages.ForEach((remoteImage) =>
                    {
                        RemoteImageCollection.Add(remoteImage);
                    });
                }
                catch
                {
                    MessageBox.Show("CSV File Error, Please Check the CSV File for Errors!", "Check CSV");
                }
            }
        }