Skip to content

Commit

Permalink
NETFramework changed to 3.5
Browse files Browse the repository at this point in the history
CustomColumns scrolling improved

Double click entry, reads custom strings and copies it into the clipboard

Slow double click on image opens image editor

InlineEditing detection fixed

Double click AddEntry toolmenu button added

SetAlternatingBgColors fixed for CustomColumns sorting

Save state InlineEditing / AddEntry in global KeePass settings

New Manage CustomColumns dialog
Dialog Design like KeePass
Select full row to delete columns
Select cells to edit columns
Enable: Column is visible in listview
Hide: Set columns text (in memory protection)
-Unhidden: Shows all entries in plain text
-Full: Shows all entries as asterisks
-Lazy: Shows only protected strings as asterisks
Protected: All changed or new columns entries are stored as defined here (only for InlineEditing)
ReadOnly: Columns entries are read only or can be edited (only for InlineEditing)
Filter for KeePass columns
Filter for KPEntryTemplates Plugin strings
  • Loading branch information
GlaserFrank authored and GlaserFrank committed May 9, 2010
1 parent d603be2 commit fa9c45e
Show file tree
Hide file tree
Showing 28 changed files with 4,918 additions and 565 deletions.
30 changes: 28 additions & 2 deletions KPEnhancedListview/AddEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,38 @@ namespace KPEnhancedListview
{
partial class KPEnhancedListviewExt
{
private const string m_cfgAddEntry = "KPEnhancedListview_AddEntry";

private DateTime m_mouseDownForAeAt = DateTime.MinValue;

private ToolStripMenuItem m_tsmiAddEntry = null;

private void InitializeAddEntry()
{
// Nothing todo
// Add menu item
m_tsmiAddEntry = new ToolStripMenuItem();
m_tsmiAddEntry.Text = "Double Click add an Entry";
m_tsmiAddEntry.Click += OnMenuAddEntry;
m_tsMenu.Add(m_tsmiAddEntry);

// Check custom config
if (m_host.CustomConfig.GetBool(m_cfgAddEntry, false))
{
m_tsmiAddEntry.Checked = true;
AddHandlerAddEntry();
}
else
{
m_tsmiAddEntry.Checked = false;
RemoveHandlerAddEntry();
}
}

public void TerminateAddEntry()
{
// Remove our menu items
m_tsMenu.Remove(m_tsmiAddEntry);

RemoveHandlerAddEntry();
}

Expand All @@ -43,11 +66,14 @@ private void OnMenuAddEntry(object sender, EventArgs e)
{
if (!m_host.Database.IsOpen)
{
MessageBox.Show("You first need to open a database!", "Add Entry");
// doesn't matter
}

m_tsmiAddEntry.Checked = !m_tsmiAddEntry.Checked;

// save config
m_host.CustomConfig.SetBool(m_cfgInlineEditing, m_tsmiAddEntry.Checked);

if (m_tsmiAddEntry.Checked)
{
// enable function
Expand Down
Binary file modified KPEnhancedListview/Build/Release/KPEnhancedListview.dll
Binary file not shown.
Binary file modified KPEnhancedListview/Build/Release/KPEnhancedListview.pdb
Binary file not shown.
126 changes: 126 additions & 0 deletions KPEnhancedListview/CustomColumn.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
using System;
using System.Text;
using System.Diagnostics;
using System.Windows;
using System.Windows.Forms;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using System.Timers;

namespace KPEnhancedListview
{
public enum HideStatus
{
Lazy,
Full,
Unhidden
};

[Serializable]
public class CustomColumn : IComparable
{
string column;
string name;
int index;
int order;
bool enable;
HideStatus hide; //threestate
bool protect;
bool readOnly;
int width;
SortOrder sort;
//int sortType; //enum num nat
//int sortOrder; //enum asc des none

public CustomColumn()
{
enable = true;
hide = HideStatus.Unhidden;
//TODO set default width int nDefaultWidth = m_lvEntries.ClientRectangle.Width / 5;
width = 100;
sort = SortOrder.None;
//TODO set index
//TODO set order
}

public CustomColumn(string Column, string Name, int Index, int Order, bool Enable, HideStatus Hide, bool Protect, bool ReadOnly, int Width, SortOrder Sort)
{
column = Column;
name = Name;
index = Index;
order = Order;
enable = Enable;
hide = Hide;
protect = Protect;
readOnly = ReadOnly;
width = Width;
sort = Sort;
}

public string Column
{
get { return column; }
set { column = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public int Index
{
get { return index; }
set { index = value; }
}
public int Order
{
get { return order; }
set { order = value; }
}
public bool Enable
{
get { return enable; }
set { enable = value; }
}
public HideStatus Hide
{
get { return hide; }
set { hide = value; }
}
public bool Protect
{
get { return protect; }
set { protect = value; }
}
public bool ReadOnly
{
get { return readOnly; }
set { readOnly = value; }
}
public int Width
{
get { return width; }
set { width = value; }
}
public SortOrder Sort
{
get { return sort; }
set { sort = value; }
}

public int CompareTo(Object o)
{
if (o is CustomColumn)
{
return this.Order.CompareTo(((CustomColumn)o).Order);
}
return 0;
}
};
}
Loading

0 comments on commit fa9c45e

Please sign in to comment.