Exemplo n.º 1
0
        private void OnBtnOK(object sender, EventArgs e)
        {
            SearchParameters sp = GetSearchParameters(true);

            if (sp.RegularExpression)
            {
                try                 // Validate regular expression
                {
                    Regex rx = new Regex(sp.SearchString);
                    rx.IsMatch("ABCD");
                }
                catch (Exception exReg)
                {
                    MessageService.ShowWarning(sp.SearchString, exReg);
                    this.DialogResult = DialogResult.None;
                    return;
                }
            }

            string strGroupName = KPRes.SearchGroupName + " (\"" + sp.SearchString + "\" ";

            strGroupName += KPRes.SearchResultsInSeparator + " ";
            strGroupName += m_pgRoot.Name + ")";
            PwGroup pgResults = new PwGroup(true, true, strGroupName, PwIcon.EMailSearch);

            pgResults.IsVirtual = true;

            PwObjectList <PwEntry> listResults = pgResults.Entries;

            if (m_pdContext != null)
            {
                MainForm.AutoAdjustMemProtSettings(m_pdContext, sp);
            }

            Form          fOptDialog;
            IStatusLogger sl = StatusUtil.CreateStatusDialog(this, out fOptDialog,
                                                             null, KPRes.SearchingOp + "...", true, false);

            // if(fOptDialog != null) Program.MainForm.RedirectActivationPush(fOptDialog);
            this.Enabled = false;

            Exception exFind = null;

            try { m_pgRoot.SearchEntries(sp, listResults, sl); }
            catch (Exception ex) { exFind = ex; }

            // if(fOptDialog != null) Program.MainForm.RedirectActivationPop();
            this.Enabled = true;
            sl.EndLogging();

            if (exFind != null)
            {
                MessageService.ShowWarning(exFind);
            }

            m_pgResultsGroup = pgResults;

            sp.SearchString = string.Empty;             // Clear for saving (sp points to global)
        }
Exemplo n.º 2
0
 protected void InitLogger(string sCaption, int max)
 {
     m_sl         = StatusUtil.CreateStatusDialog(GlobalWindowManager.TopWindow, out m_Form, sCaption, null, false, false);
     m_EntryCount = max;
     m_EntryIndex = 0;
     m_sl.SetProgress(0);
     KeePass.Program.MainForm.UIBlockInteraction(true);
 }
        private void preencherCombos()
        {
            baseWindow.preencherComboProjeto(cmbProjeto, false);

            baseWindow.preencherComboProjeto(cmbFiltroProjeto, true);

            baseWindow.preencherComboStatus(cmbFiltroStatus, StatusUtil.recuperarListaStatusItemBacklog(), true);
        }
Exemplo n.º 4
0
        private IStatusLogger CreateUpdateCheckLogger()
        {
            IStatusLogger sl = StatusUtil.CreateStatusDialog(null, out m_CheckProgress,
                                                             KeePass.Resources.KPRes.UpdateCheck, KeePass.Resources.KPRes.CheckingForUpd + "...", true, true);
            Button btnCancel = (Button)Tools.GetControl("m_btnCancel", m_CheckProgress);

            if (btnCancel != null)
            {
                int x = btnCancel.Right;
                btnCancel.AutoSize = true;
                btnCancel.Text     = PluginTranslate.EnterBackgroundMode;
                btnCancel.Left     = x - btnCancel.Width;
            }
            return(sl);
        }
Exemplo n.º 5
0
		private static void RunPriv(object o)
		{
			UpdateCheckParams p = (o as UpdateCheckParams);
			if(p == null) { Debug.Assert(false); return; }

			IStatusLogger sl = null;
			try
			{
				if(p.ForceUI)
				{
					Form fStatusDialog;
					sl = StatusUtil.CreateStatusDialog(p.Parent, out fStatusDialog,
						KPRes.UpdateCheck, KPRes.CheckingForUpd + "...", true, true);
				}

				List<UpdateComponentInfo> lInst = GetInstalledComponents();
				List<string> lUrls = GetUrls(lInst);
				Dictionary<string, List<UpdateComponentInfo>> dictAvail =
					DownloadInfoFiles(lUrls, sl);
				if(dictAvail == null) return; // User cancelled

				MergeInfo(lInst, dictAvail);

				bool bUpdAvail = false;
				foreach(UpdateComponentInfo uc in lInst)
				{
					if(uc.Status == UpdateComponentStatus.NewVerAvailable)
					{
						bUpdAvail = true;
						break;
					}
				}

				if(sl != null) { sl.EndLogging(); sl = null; }

				if(bUpdAvail || p.ForceUI)
					ShowUpdateDialogAsync(lInst, p.ForceUI);
			}
			catch(Exception) { Debug.Assert(false); }
			finally
			{
				try { if(sl != null) sl.EndLogging(); }
				catch(Exception) { Debug.Assert(false); }
			}
		}
Exemplo n.º 6
0
        public FaviconDialog(IPluginHost host)
        {
            // KeePass plugin host
            pluginHost = host;

            // Set up BackgroundWorker
            bgWorker = new BackgroundWorker();

            // BackgroundWorker Events
            bgWorker.DoWork             += BgWorker_DoWork;
            bgWorker.RunWorkerCompleted += BgWorker_RunWorkerCompleted;

            // Status Progress Form
            Form fStatusDialog;

            logger = StatusUtil.CreateStatusDialog(pluginHost.MainWindow, out fStatusDialog, "Yet Another Favicon Downloader", "Downloading favicons...", true, false);

            // Block UI
            pluginHost.MainWindow.UIBlockInteraction(true);
        }
Exemplo n.º 7
0
        private void preencherComboStatus()
        {
            ComboBoxItem itemTodos = new ComboBoxItem();

            itemTodos.Content = "Todos";
            itemTodos.Tag     = 0;
            cmbFiltroStatus.Items.Add(itemTodos);
            cmbFiltroStatus.SelectedIndex = 0;

            List <string> lista = StatusUtil.recuperarListaStatusTarefa();

            if (lista.Count > 0)
            {
                foreach (string str in lista)
                {
                    ComboBoxItem item = new ComboBoxItem();
                    item.Content = str;
                    cmbFiltroStatus.Items.Add(item);
                }
            }
        }
Exemplo n.º 8
0
    private bool DatabaseErrorTest()
    {
        bool isError = false;

        IList <IStatusMonitoringDAO> daoList = null;

        try {
            daoList = StatusUtil.GetServiceList();

            foreach (IStatusMonitoringDAO dao in daoList)
            {
                if (dao.IsPass == false)
                {
                    isError = true;
                    log.Error("DAO: " + dao.Name + " failed status check.");
                }
            }

            RDAO.ItemCreated += new RepeaterItemEventHandler(RDAO_ItemCreated);
            RDAO.DataSource   = daoList;
            RDAO.DataBind();
        } catch (Exception ex) {
            isError = true;
            log.Error("Error checking data access objects: " + ex.Message, ex);
        }

        if (isError)
        {
            LDatabaseStatus.Text     = TEST_FAILED;
            LDatabaseStatus.CssClass = CSS_STATUS_ERROR;
        }
        else
        {
            LDatabaseStatus.Text     = TEST_PASSED;
            LDatabaseStatus.CssClass = CSS_STATUS_NORMAL;
        }

        return(isError);
    }
Exemplo n.º 9
0
        private void OnBtnOK(object sender, EventArgs e)
        {
            SearchParameters sp = GetSearchParameters();

            Form          fOptDialog;
            IStatusLogger sl = StatusUtil.CreateStatusDialog(this, out fOptDialog,
                                                             null, KPRes.SearchingOp + "...", true, false);

            // if(fOptDialog != null) Program.MainForm.RedirectActivationPush(fOptDialog);
            this.Enabled = false;

            PwGroup   pgResults = null;
            Exception exFind    = null;

            try { pgResults = SearchUtil.Find(sp, m_pgRoot, sl); }
            catch (Exception ex) { exFind = ex; }

            this.Enabled = true;
            // if(fOptDialog != null) Program.MainForm.RedirectActivationPop();
            sl.EndLogging();

            if (exFind != null)
            {
                MessageService.ShowWarning(sp.SearchString, exFind);
                this.DialogResult = DialogResult.None;
            }
            else if (pgResults != null)
            {
                m_pgResults = pgResults;
                m_spResult  = sp;
            }
            else
            {
                Debug.Assert(false);
                this.DialogResult = DialogResult.None;
            }
        }
Exemplo n.º 10
0
        private static string FindUI(MainForm mf, FsxMatchFn fMatch, string strRootPath)
        {
            if (mf == null)
            {
                Debug.Assert(false); return(null);
            }
            if (fMatch == null)
            {
                Debug.Assert(false); return(null);
            }

            Form          fOptDialog;
            IStatusLogger sl = StatusUtil.CreateStatusDialog(mf, out fOptDialog,
                                                             null, GetSearchingText(null), true, true);

            mf.UIBlockInteraction(true);

            List <FsxContext> lContexts = new List <FsxContext>();
            string            strExcp   = null;

            try { lContexts = Find(fMatch, sl, strRootPath); }
            catch (Exception ex) { strExcp = ex.Message; }

            bool bAborted = !sl.ContinueWork();

            mf.UIBlockInteraction(false);
            sl.EndLogging();

            if (!string.IsNullOrEmpty(strExcp))
            {
                MessageService.ShowWarning(strExcp);
                return(null);
            }

            Action <ListView> fInit = delegate(ListView lv)
            {
                int w  = lv.ClientSize.Width - UIUtil.GetVScrollBarWidth();
                int ws = w / 70;
                lv.Columns.Add(KPRes.File, w / 5);
                lv.Columns.Add(KPRes.Folder, (int)(((long)w * 2L) / 5L - (ws * 3)));
                lv.Columns.Add(KPRes.Size, w / 10 + ws, HorizontalAlignment.Right);
                lv.Columns.Add(KPRes.Type, w / 10 + ws);
                lv.Columns.Add(KPRes.LastModified, w / 5 + ws);
            };

            List <object> lItems = new List <object>();
            int           cFiles = 0;

            foreach (FsxContext ctx in lContexts)
            {
                List <FsxResult> lResults = ctx.GetResults();
                if (lResults.Count == 0)
                {
                    continue;
                }

                string strGroup = UrlUtil.EnsureTerminatingSeparator(ctx.RootDirectory, false);
                if (ctx.VolumeLabel.Length != 0)
                {
                    strGroup += " (" + ctx.VolumeLabel + ")";
                }
                lItems.Add(new ListViewGroup(strGroup));

                foreach (FsxResult r in lResults)
                {
                    try
                    {
                        FileInfo fi = new FileInfo(r.Path);

                        ListViewItem lvi = new ListViewItem(UrlUtil.GetFileName(r.Path));
                        lvi.SubItems.Add(UrlUtil.GetFileDirectory(r.Path, true, false));
                        lvi.SubItems.Add(StrUtil.FormatDataSizeKB((ulong)fi.Length));
                        lvi.SubItems.Add(r.Type);
                        lvi.SubItems.Add(TimeUtil.ToDisplayString(
                                             TimeUtil.ToLocal(fi.LastWriteTimeUtc, false)));
                        lvi.Tag = r.Path;

                        lItems.Add(lvi);
                        ++cFiles;
                    }
                    catch (Exception) { Debug.Assert(false); }
                }
            }

            string strSub = KPRes.ObjectsFound.Replace("{PARAM}", cFiles.ToString()) + ".";

            if (bAborted)
            {
                strSub += " " + (new OperationCanceledException()).Message;
            }

            ListViewForm dlg = new ListViewForm();

            dlg.InitEx(KPRes.SearchGroupName, strSub, null,
                       Properties.Resources.B48x48_XMag, lItems, null, fInit);
            UIUtil.ShowDialogAndDestroy(dlg, mf);

            return(dlg.ResultItem as string);
        }
Exemplo n.º 11
0
        protected BaseController()
        {
            var config = new MapperConfiguration(x =>
            {
                x.CreateMap <HoSoInfoModel, ProfileAddObj>()
                .ForMember(a => a.name, b => b.MapFrom(c => c.TenKhachHang))
                .ForMember(a => a.cityId, b => b.MapFrom(c => c.MaKhuVuc))
                .ForMember(a => a.bod, b => b.MapFrom(c => c.BirthDay.ToShortDateString()))
                .ForMember(a => a.phone, b => b.MapFrom(c => c.SDT))
                .ForMember(a => a.productCode, b => b.MapFrom(c => c.ProductCode))
                .ForMember(a => a.idNumber, b => b.MapFrom(c => c.CMND))
                .ForMember(a => a.idNumberDate, b => b.MapFrom(c => c.CmndDay.ToShortDateString()))
                //.ForMember(a => a.loanPeriodCode, b => b.MapFrom(c => c.CMND))
                .ForMember(a => a.loanMoney, b => b.MapFrom(c => c.SoTienVay.ToString()))
                //.ForMember(a => a.saleID, b => b.MapFrom(c => c.CMND))
                ;
                x.CreateMap <MCredit_TempProfileAddModel, MCredit_TempProfile>();
                x.CreateMap <MCredit_TempProfile, MCProfilePostModel>()
                .ForMember(a => a.Name, b => b.MapFrom(c => c.CustomerName))
                .ForMember(a => a.HomeTown, b => b.MapFrom(c => c.Hometown))
                .ForMember(a => a.Bod, b => b.MapFrom(c => c.BirthDay.ToShortDateString()))
                .ForMember(a => a.Phone, b => b.MapFrom(c => c.Phone))
                .ForMember(a => a.IdNumber, b => b.MapFrom(c => c.IdNumber))
                .ForMember(a => a.CCCDNumber, b => b.MapFrom(c => c.CCCDNumber))
                .ForMember(a => a.IdNumberDate, b => b.MapFrom(c => c.IssueDate.ToShortDateString()))
                .ForMember(a => a.IsAddr, b => b.MapFrom(c => c.IsAddr))
                .ForMember(a => a.CityId, b => b.MapFrom(c => c.ProvinceId))
                .ForMember(a => a.ProductCode, b => b.MapFrom(c => c.ProductCode))
                .ForMember(a => a.LoanPeriodCode, b => b.MapFrom(c => c.LoanPeriodCode))
                .ForMember(a => a.LoanMoney, b => b.MapFrom(c => c.LoanMoney.ToString()))
                .ForMember(a => a.LocSignCode, b => b.MapFrom(c => c.LocSignCode))
                .ForMember(a => a.IsInsurrance, b => b.MapFrom(c => c.IsInsurrance))
                .ForMember(a => a.SaleId, b => b.MapFrom(c => c.SaleId))
                .ForMember(a => a.Status, b => b.MapFrom(c => c.Status))
                ;
                x.CreateMap <MCredit_TempProfileAddModel, MCProfilePostModel>()
                .ForMember(a => a.Name, b => b.MapFrom(c => c.CustomerName))
                .ForMember(a => a.HomeTown, b => b.MapFrom(c => c.Hometown))
                .ForMember(a => a.Bod, b => b.MapFrom(c => c.BirthDay.ToShortDateString()))
                .ForMember(a => a.Phone, b => b.MapFrom(c => c.Phone))
                .ForMember(a => a.IdNumber, b => b.MapFrom(c => c.IdNumber))
                .ForMember(a => a.CCCDNumber, b => b.MapFrom(c => c.CCCDNumber))
                .ForMember(a => a.IdNumberDate, b => b.MapFrom(c => c.IssueDate.ToShortDateString()))
                .ForMember(a => a.IsAddr, b => b.MapFrom(c => c.IsAddr))
                .ForMember(a => a.CityId, b => b.MapFrom(c => c.ProvinceId))
                .ForMember(a => a.ProductCode, b => b.MapFrom(c => c.ProductCode))
                .ForMember(a => a.LoanPeriodCode, b => b.MapFrom(c => c.LoanPeriodCode))
                .ForMember(a => a.LoanMoney, b => b.MapFrom(c => c.LoanMoney.ToString()))
                .ForMember(a => a.LocSignCode, b => b.MapFrom(c => c.LocSignCode))
                .ForMember(a => a.IsInsurrance, b => b.MapFrom(c => c.IsInsurrance))
                .ForMember(a => a.SaleId, b => b.MapFrom(c => c.SaleId))
                .ForMember(a => a.Status, b => b.MapFrom(c => c.Status));
                x.CreateMap <CheckSaleObj, UpdateSaleModel>()
                .ForMember(a => a.SaleName, b => b.MapFrom(c => c.name))
                .ForMember(a => a.SaleNumber, b => b.MapFrom(c => c.idNumber))
                .ForMember(a => a.SaleId, b => b.MapFrom(c => c.id));

                x.CreateMap <ProfileGetByIdResponseObj, MCredit_TempProfile>()
                .ForMember(a => a.CustomerName, b => b.MapFrom(c => c.Name))
                .ForMember(a => a.MCId, b => b.MapFrom(c => c.Id))
                .ForMember(a => a.Hometown, b => b.MapFrom(c => c.HomeTown))
                .ForMember(a => a.BirthDay, b => b.MapFrom(c => c.Bod))
                .ForMember(a => a.Phone, b => b.MapFrom(c => c.Phone))
                .ForMember(a => a.IdNumber, b => b.MapFrom(c => c.IdNumber))
                .ForMember(a => a.CCCDNumber, b => b.MapFrom(c => c.CccdNumber))
                .ForMember(a => a.IssueDate, b => b.MapFrom(c => c.IdDate))
                .ForMember(a => a.IsAddr, b => b.MapFrom(c => c.IsAddrSame))
                .ForMember(a => a.ProvinceId, b => b.MapFrom(c => c.CityId))
                .ForMember(a => a.Address, b => b.MapFrom(c => c.LocSignAddr))
                .ForMember(a => a.Hometown, b => b.MapFrom(c => c.HomeTown))
                ;

                x.CreateMap <NoteObj, GhichuViewModel>()
                .ForMember(a => a.Commentator, b => b.MapFrom(c => c.CreateUserName))
                .ForMember(a => a.CommentTime, b => b.MapFrom(c => c.CreateDated))
                .ForMember(a => a.Noidung, b => b.MapFrom(c => c.Name))

                ;
                x.CreateMap <HosoCourierViewModel, CourierExportModel>()
                .ForMember(a => a.Status, b => b.MapFrom(c => StatusUtil.ReturnStatusString(c.Status)))
                .ForMember(a => a.CreatedTime, b => b.MapFrom(c => c.CreatedTime != null ? c.CreatedTime.ToShortDateString():""))
                .IgnoreAllPropertiesWithAnInaccessibleSetter()
                ;
            });

            _mapper = config.CreateMapper();
        }
Exemplo n.º 12
0
        private void UpdatePlugins(bool bUpdateTranslationsOnly)
        {
            PluginDebug.AddInfo("UpdatePlugins start ", DebugPrint);
            Form fUpdateLog = null;

            m_slUpdatePlugins = StatusUtil.CreateStatusDialog(GlobalWindowManager.TopWindow, out fUpdateLog, PluginTranslate.PluginUpdateCaption, string.Empty, true, true);

            bool   success            = false;
            string sTempPluginsFolder = PluginUpdateHandler.GetTempFolder();

            ThreadStart ts = new ThreadStart(() =>
            {
                m_slUpdatePlugins.StartLogging(PluginTranslate.PluginUpdateCaption, false);

                PluginDebug.AddInfo("Use temp folder", PluginUpdateHandler.Shieldify.ToString(), sTempPluginsFolder, DebugPrint);

                //Download files
                foreach (PluginUpdate upd in PluginUpdateHandler.Plugins)
                {
                    if (!upd.Selected)
                    {
                        continue;
                    }
                    success |= UpdatePlugin(upd, sTempPluginsFolder, bUpdateTranslationsOnly);
                }
            });
            Thread t = new Thread(ts);

            t.IsBackground = true;
            t.Start();
            while (true && t.IsAlive)
            {
                if (!m_slUpdatePlugins.ContinueWork())
                {
                    t.Abort();
                    break;
                }
            }
            if (t != null && t.IsAlive)
            {
                t.Abort();
            }
            if (m_slUpdatePlugins != null)
            {
                m_slUpdatePlugins.EndLogging();
                m_slUpdatePlugins = null;
            }
            if (fUpdateLog != null)
            {
                fUpdateLog.Dispose();
            }

            //Move files from temp folder to plugin folder
            success &= PluginUpdateHandler.MoveAll(sTempPluginsFolder);
            foreach (var pu in PluginUpdateHandler.Plugins)
            {
                if (!pu.Selected)
                {
                    continue;
                }
                if (pu is OwnPluginUpdate)
                {
                    (pu as OwnPluginUpdate).UpdateTranslationInfo(true);
                }
            }
            if (success)
            {
                PluginUpdateHandler.Cleanup(sTempPluginsFolder);
            }
            success = true;
            //Restart KeePass to use new plugin versions
            PluginDebug.AddInfo("Update finished", "Succes: " + success.ToString(), DebugPrint);
            if (success && !bUpdateTranslationsOnly)
            {
                if (Tools.AskYesNo(PluginTranslate.PluginUpdateSuccess, PluginTranslate.PluginUpdateCaption) == DialogResult.Yes)
                {
                    if (m_bRestartInvoke)
                    {
                        m_host.MainWindow.Invoke(new KeePassLib.Delegates.GAction(() => { Restart(); }));
                    }
                    else
                    {
                        Restart();
                    }
                }
            }
        }
Exemplo n.º 13
0
        private void OnClickFindEntry(object sender, EventArgs e)
        {
            string   f  = (sender as ToolStripItem).Name;
            FindInfo fi = SearchHelp.FindList.Find(x => x.Name == (sender as ToolStripItem).Name);

            if (CallStandardSearch(fi, (sender as ToolStripItem).Name))
            {
                if (fi != null)
                {
                    foreach (Delegate d in fi.StandardEventHandlers)
                    {
                        d.DynamicInvoke(new object[] { sender, e });
                    }
                }
                return;
            }

            PluginDebug.AddInfo("Call own find routine", 0, "Action: " + f);
            //Show status logger
            Form          fOptDialog = null;
            IStatusLogger sl         = StatusUtil.CreateStatusDialog(m_host.MainWindow, out fOptDialog, null,
                                                                     (KPRes.SearchingOp ?? "..."), true, false);

            m_host.MainWindow.UIBlockInteraction(true);

            m_aStandardLvInit = null;

            //Perform find for all open databases
            PwDatabase    dbAll = MergeDatabases();
            List <object> l     = null;

            try
            {
                object[] parameters;
                if (fi.SearchType != SearchType.BuiltIn)
                {
                    parameters = new object[] { dbAll, sl, null, fi }
                }
                ;
                else
                {
                    parameters = new object[] { dbAll, sl, null }
                };

                l = (List <object>)fi.StandardMethod.Invoke(m_host, parameters);
                m_aStandardLvInit = (Action <ListView>)parameters[2];
            }
            catch (Exception ex)
            {
                l = null;
                PluginDebug.AddError("Call standard find routine", 0, "Action: " + f, "Reason for standard call: " + ex.Message);
                foreach (Delegate d in fi.StandardEventHandlers)
                {
                    d.DynamicInvoke(new object[] { sender, e });
                }
            }
            finally { dbAll.Close(); }

            m_host.MainWindow.UIBlockInteraction(false);
            sl.EndLogging();

            if (l == null)
            {
                return;
            }

            //Fill db column
            ImageList il  = new ImageList();
            ImageList il2 = (ImageList)Tools.GetField("m_ilCurrentIcons", m_host.MainWindow);

            foreach (Image img in il2.Images)
            {
                il.Images.Add(img);
            }

            foreach (var o in l)
            {
                ListViewItem lvi = o as ListViewItem;
                if (lvi == null)
                {
                    continue;
                }
                ListViewItem.ListViewSubItem lvsi = new ListViewItem.ListViewSubItem();
                if (lvi.Tag is PwEntry)
                {
                    lvsi.Text = SearchHelp.GetDBName(lvi.Tag as PwEntry);
                    PwEntry    pe = lvi.Tag as PwEntry;
                    PwDatabase db = m_host.MainWindow.DocumentManager.FindContainerOf(pe);
                    if (!pe.CustomIconUuid.Equals(PwUuid.Zero))
                    {
                        il.Images.Add(db.GetCustomIcon(pe.CustomIconUuid, DpiUtil.ScaleIntX(16), DpiUtil.ScaleIntY(16)));
                        lvi.ImageIndex = il.Images.Count - 1;
                    }
                    else
                    {
                        lvi.ImageIndex = (int)pe.IconId;
                    }
                }
                else if (lvi.Tag is PwGroup)
                {
                    PwGroup pg = lvi.Tag as PwGroup;
                    lvsi.Text = SearchHelp.GetDBName(pg.Entries.GetAt(0));
                }
                lvi.SubItems.Insert(0, lvsi);
            }

            if ((l.Count == 0) && !string.IsNullOrEmpty(fi.NothingFound))
            {
                Tools.ShowInfo(fi.NothingFound);
                il.Dispose();
                return;
            }

            //Show results
            ListViewForm dlg = new ListViewForm();

            //Prepare ImageList (CustomIcons can be different per database)
            dlg.InitEx(fi.Title, fi.SubTitle, fi.Note, fi.img, l, il, InitListView);
            UIUtil.ShowDialogAndDestroy(dlg);
            if (dlg.DialogResult != DialogResult.OK)
            {
                return;
            }
            il.Dispose();
            NavigateToSelectedEntry(dlg, false);
        }