Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Dec 4, 2019
1 parent 83b3b12 commit 7780680
Show file tree
Hide file tree
Showing 75 changed files with 6,900 additions and 705 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).


## [0.65] - 2019-12-04

### Added
- added new program view mode a verbose program tree, that auto enables when the program column ist stretched wider
- added program context menu
- added additional program options to the ribbon toolbar
- added view modes fill screan, full height, full screen
- dns query log context menu with options to whitelist and blacklist entries
- double clicking a domain in the whitelist/blacklist view copys it to the entry edit for editing

### Changed

### Fixed

## [0.60.1] - 2019-12-01

### Added
Expand Down
49 changes: 49 additions & 0 deletions ICSharpCode.TreeView/Converters.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Markup;
using System.Windows.Data;
using System.Globalization;

namespace ICSharpCode.TreeView
{
public class CollapsedWhenFalse : MarkupExtension, IValueConverter
{
public static CollapsedWhenFalse Instance = new CollapsedWhenFalse();

public override object ProvideValue(IServiceProvider serviceProvider)
{
return Instance;
}

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (bool)value ? Visibility.Visible : Visibility.Collapsed;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
97 changes: 97 additions & 0 deletions ICSharpCode.TreeView/EditTextBox.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Data;
using System.Windows;

namespace ICSharpCode.TreeView
{
class EditTextBox : TextBox
{
static EditTextBox()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(EditTextBox),
new FrameworkPropertyMetadata(typeof(EditTextBox)));
}

public EditTextBox()
{
Loaded += delegate { Init(); };
}

public SharpTreeViewItem Item { get; set; }

public SharpTreeNode Node {
get { return Item.Node; }
}

void Init()
{
Text = Node.LoadEditText();
Focus();
SelectAll();
}

protected override void OnKeyDown(KeyEventArgs e)
{
if (e.Key == Key.Enter) {
Commit();
} else if (e.Key == Key.Escape) {
Node.IsEditing = false;
}
}

protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
{
if (Node.IsEditing) {
Commit();
}
}

bool commiting;

void Commit()
{
if (!commiting) {
commiting = true;

Node.IsEditing = false;
if (!Node.SaveEditText(Text)) {
Item.Focus();
}
Node.RaisePropertyChanged("Text");

//if (Node.SaveEditText(Text)) {
// Node.IsEditing = false;
// Node.RaisePropertyChanged("Text");
//}
//else {
// Init();
//}

commiting = false;
}
}
}
}
52 changes: 52 additions & 0 deletions ICSharpCode.TreeView/ExtensionMethods.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows;
using System.Collections;
using System.Windows.Input;

namespace ICSharpCode.TreeView
{
static class ExtensionMethods
{
public static T FindAncestor<T>(this DependencyObject d) where T : class
{
return AncestorsAndSelf(d).OfType<T>().FirstOrDefault();
}

public static IEnumerable<DependencyObject> AncestorsAndSelf(this DependencyObject d)
{
while (d != null) {
yield return d;
d = VisualTreeHelper.GetParent(d);
}
}

public static void AddOnce(this IList list, object item)
{
if (!list.Contains(item)) {
list.Add(item);
}
}
}
}
Loading

0 comments on commit 7780680

Please sign in to comment.