Example #1
0
        private void ReadFileButton_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Title = "Otwóz plik";

            StringBuilder filter = new StringBuilder();

            if (FileExtFilter != null)
            {
                foreach (var pair in FileExtFilter)
                {
                    filter.Append("|" + pair.Value);
                    filter.Append("|" + pair.Key);
                }
            }

            filter.Append("|Wszystkie pliki|*.*");

            openFileDialog.Filter          = filter.ToString().TrimStart('|');
            openFileDialog.CheckPathExists = true;

            if (openFileDialog.ShowDialog() == true)
            {
                FilePath             = openFileDialog.FileName;
                FilePathTextBox.Text = FilePath;
                FilePicked?.Invoke(FilePath);
            }
        }
Example #2
0
 private static void OnFilePicked(FilePickerEventArgs e)
 {
     FilePicked?.Invoke(null, e);
 }
Example #3
0
 static void OnFilePicked(List <FileData> args)
 {
     FilePicked?.Invoke(null, args);
 }
Example #4
0
 /// <summary>
 /// Signals event that file picking has finished
 /// </summary>
 /// <param name="args">file picker event args</param>
 private static void OnFilePicked(Android.Net.Uri args)
 {
     FilePicked?.Invoke(null, args);
 }