Exemple #1
0
        private void Target_Click(object sender, RoutedEventArgs e)
        {
            MessageBox msg = new MessageBox(this.Owner as MainWindow, "Yes - Windows Path\nNo - Linux Path", MessageBoxButton.YesNo);
            msg.Owner = this.Owner;
            msg.ShowDialog();
            if (msg.Result == MessageBoxResult.No)
            {
            }
            else
            {
                using (OpenFileDialogEx dialog = new OpenFileDialogEx())
                {
                    dialog.StartLocation = AddonWindowLocation.Right;
                    dialog.DefaultViewMode = FolderViewMode.Icon;
                    dialog.OpenDialog.InitialDirectory = Environment.SpecialFolder.MyComputer.ToString();
                    dialog.OpenDialog.AddExtension = true;
                    dialog.OpenDialog.Multiselect = false;
                    dialog.OpenDialog.ValidateNames = false;
                    dialog.OpenDialog.ShowDialog();
                    Forms.DialogResult result = dialog.ShowDialog();

                    if (result == Forms.DialogResult.OK)
                    {
                        Target.Content = dialog.OpenDialog.FileName;
                    }

                    dialog.Dispose();
                }
            }
        }
Exemple #2
0
 public OpenDialogNative(IntPtr handle, OpenFileDialogEx sourceControl)
 {
     mOpenDialogHandle   = handle;
     mSourceControl      = sourceControl;
     AssignHandle(mOpenDialogHandle);
 }
Exemple #3
0
        private void Source_Click(object sender, RoutedEventArgs e)
        {
            using (OpenFileDialogEx dialog = new OpenFileDialogEx())
            {
                dialog.StartLocation = AddonWindowLocation.Right;
                dialog.DefaultViewMode = FolderViewMode.Icon;
                dialog.OpenDialog.InitialDirectory = Environment.SpecialFolder.MyComputer.ToString();
                dialog.OpenDialog.AddExtension = true;
                dialog.OpenDialog.Multiselect = false;
                dialog.OpenDialog.ValidateNames = false;
                //dialog.OpenDialog.Filter = "Image Files(*.bmp;*.jpg;*.gif;*.png)|*.bmp;*.jpg;*.gif;*.png";
                //dialog.OpenDialog.SupportMultiDottedExtensions = true;
                //dialog.OpenDialog.ShowReadOnly = true;
                dialog.OpenDialog.ShowDialog();
                Forms.DialogResult result = dialog.ShowDialog();

                //dialog.AcceptFiles = true;
                //dialog.Path = @"C:\";
                //dialog.ShowDialog();
                if (result == Forms.DialogResult.OK)
                {
                    Source.Content = dialog.OpenDialog.FileName;
                }

                dialog.Dispose();
            }
        }
Exemple #4
0
 public DummyForm(OpenFileDialogEx fileDialogEx)
 {
     mFileDialogEx       = fileDialogEx;
     this.Text           = "";
     this.StartPosition  = FormStartPosition.Manual;
     this.Location       = new Point(-32000, -32000);
     this.ShowInTaskbar  = false;
 }