/// <summary> /// Executes the specified plugin host. /// </summary> /// <param name="pluginHost">The plugin host.</param> /// <param name="currentDirectory">The current directory.</param> /// <param name="args">The args.</param> public override void Execute(IPluginHost pluginHost, Core.IO.LinuxDirectoryInfo currentDirectory, string[] args) { var ofd = new Core.UI.OpenFileDialog( ) { Title = "Open Database File", DefaultExt = "db", Filter = "Database Files|*.db;*.database;*.sqlite|All Files|*.*", FilterIndex = 0, ValidateNames = true, CheckFileExists = true }; ofd.CustomPlaces.Add(new Core.UI.FileDialogCustomPlace("/data/data/", "data", Resources.Images.database_32xLG, delegate(object s, EventArgs ea) { ofd.Navigate(new Core.IO.LinuxDirectoryInfo("/data/data/")); })); if (ofd.ShowDialog(pluginHost.GetHostWindow()) == DialogResult.OK) { Open(ofd.FileName); } }
/// <summary> /// Executes the specified plugin host. /// </summary> /// <param name="pluginHost">The plugin host.</param> /// <param name="currentDirectory">The current directory.</param> /// <param name="args">The args.</param> public override void Execute(IPluginHost pluginHost, Core.IO.LinuxDirectoryInfo currentDirectory, string[] args) { var ofd = new Core.UI.OpenFileDialog ( ) { Title = "Open Database File", DefaultExt = "db", Filter = "Database Files|*.db;*.database;*.sqlite|All Files|*.*", FilterIndex = 0, ValidateNames = true, CheckFileExists = true }; ofd.CustomPlaces.Add ( new Core.UI.FileDialogCustomPlace ( "/data/data/", "data", Resources.Images.database_32xLG, delegate ( object s, EventArgs ea ) { ofd.Navigate ( new Core.IO.LinuxDirectoryInfo ( "/data/data/" ) ); } ) ); if (ofd.ShowDialog(pluginHost.GetHostWindow()) == DialogResult.OK ) { Open ( ofd.FileName ); } }