Skip to content

Commit

Permalink
Committing.
Browse files Browse the repository at this point in the history
  • Loading branch information
LAPTOP\Stefán Ö Sigmundsson committed Nov 29, 2019
0 parents commit 32dd851
Show file tree
Hide file tree
Showing 213 changed files with 19,245 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
674 changes: 674 additions & 0 deletions Software build/gpl-3.0.txt

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions Source code/Clean-solution.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright © 2016–2017, 2019 eMedia Intellect.

# This file is part of eMI User Controls Library.

# eMI User Controls Library is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# eMI User Controls Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.

###################################################
# Solution cleaning for eMI User Controls Library #
###################################################

Write-Host '┌─────────────────────────────────────────────────┐'
Write-Host '│ Solution cleaning for eMI User Controls Library │'
Write-Host '└─────────────────────────────────────────────────┘'
Write-Host

Write-Host 'Removing the Visual Studio solution user options directory.'
Write-Host

Remove-Item -ErrorAction 'Ignore' -Force -Path '.\.vs' -Recurse

Write-Host 'Removing the builds.'
Write-Host

Remove-Item -ErrorAction 'Ignore' -Force -Path '.\CloseableTabItem\Build' -Recurse
Remove-Item -ErrorAction 'Ignore' -Force -Path '.\CloseableTabItemTesting\Build' -Recurse
Remove-Item -ErrorAction 'Ignore' -Force -Path '.\FileSystemBrowserWindow\Build' -Recurse
Remove-Item -ErrorAction 'Ignore' -Force -Path '.\FileSystemBrowserWindowTesting\Build' -Recurse
29 changes: 29 additions & 0 deletions Source code/CloseableTabItem/Classes/CloseableHeader.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
Copyright © 2016–2017, 2019 eMedia Intellect.
This file is part of eMI User Controls Library.
eMI User Controls Library is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
eMI User Controls Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.
-->
<UserControl x:Class="Emi.UserControls.CloseableHeader" x:ClassModifier="internal" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Resources>
<ControlTemplate TargetType="{x:Type Button}" x:Key="ButtonTemplate">
<ContentPresenter Content="x"/>
</ControlTemplate>
</UserControl.Resources>
<Grid>
<Label FontFamily="Courier" HorizontalAlignment="Left" Margin="0, 1, 0, 0" Padding="0" x:Name="titleLabel"/>
<Button FontFamily="Courier" FontSize="13" FontWeight="Bold" Foreground="#A7A5A5" HorizontalAlignment="Right" Margin="0, 0, 0, 0" Name="closeButton" Template="{StaticResource ButtonTemplate}"/>
</Grid>
</UserControl>
37 changes: 37 additions & 0 deletions Source code/CloseableTabItem/Classes/CloseableHeader.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// <author>Stefán Örvar Sigmundsson</author>
// <copyright company="eMedia Intellect" file="CloseableHeader.xaml.cs">
// Copyright © 2016–2017, 2019 eMedia Intellect.
// </copyright>
// <licence>
// This file is part of eMI User Controls Library.
//
// eMI User Controls Library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// eMI User Controls Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.
// </licence>

namespace Emi.UserControls
{
using System.Windows.Controls;

/// <summary>Provides a closeable header for the <see cref="CloseableTabItem"/> class.</summary>
internal partial class CloseableHeader : UserControl
{
/// <summary>Initialises a new instance of the <see cref="CloseableHeader"/> class.</summary>
internal CloseableHeader()
{
this.InitializeComponent();

this.closeButton.ToolTip = UserControls.Resources.ToolTip.Close;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// <author>Stefán Örvar Sigmundsson</author>
// <copyright company="eMedia Intellect" file="CloseableTabItem.cs">
// Copyright © 2016–2017, 2019 eMedia Intellect.
// </copyright>
// <licence>
// This file is part of eMI User Controls Library.
//
// eMI User Controls Library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// eMI User Controls Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.
// </licence>

namespace Emi.UserControls
{
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

/// <summary>Provides a closeable tab item for the <see cref="System.Windows.Controls.TabControl"/> class.</summary>
public partial class CloseableTabItem : TabItem
{
/// <summary>Indicates whether the tab item is closeable.</summary>
/// <remarks>The store for the <see cref="IsCloseable"/> property.</remarks>
private bool isCloseable = true;

/// <summary>The closeable header of the tab item.</summary>
private CloseableHeader closeableHeader = new CloseableHeader();

/// <summary>The title to display in the header of the tab item.</summary>
/// <remarks>The store for the <see cref="Title"/> property.</remarks>
private string title = null;

/// <summary>Initialises a new instance of the <see cref="CloseableTabItem"/> class.</summary>
public CloseableTabItem()
{
this.closeableHeader.titleLabel.Content = this.title;

if (!this.IsSelected)
{
this.closeableHeader.closeButton.Visibility = Visibility.Hidden;
}

if (this.isCloseable)
{
this.Header = this.closeableHeader;
}
else
{
this.Header = this.title;
}

this.closeableHeader.closeButton.Click += new RoutedEventHandler(this.CloseButton_Click);
this.closeableHeader.closeButton.MouseEnter += new MouseEventHandler(this.CloseButton_MouseEnter);
this.closeableHeader.closeButton.MouseLeave += new MouseEventHandler(this.CloseButton_MouseLeave);
this.closeableHeader.titleLabel.SizeChanged += new SizeChangedEventHandler(this.TitleLabel_SizeChanged);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// <author>Stefán Örvar Sigmundsson</author>
// <copyright company="eMedia Intellect" file="CloseButton_Click.cs">
// Copyright © 2016–2017, 2019 eMedia Intellect.
// </copyright>
// <licence>
// This file is part of eMI User Controls Library.
//
// eMI User Controls Library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// eMI User Controls Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.
// </licence>

namespace Emi.UserControls
{
using System.Windows;
using System.Windows.Controls;

/// <content>Contains the <see cref="CloseButton_Click"/> method.</content>
public partial class CloseableTabItem
{
/// <summary>Removes the tab item from the tab control when the close button is clicked.</summary>
/// <param name="sender">The sender object of the event handler.</param>
/// <param name="e">The state information of the event handler.</param>
private void CloseButton_Click(object sender, RoutedEventArgs e)
{
((TabControl)this.Parent).Items.Remove(this);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// <author>Stefán Örvar Sigmundsson</author>
// <copyright company="eMedia Intellect" file="CloseButton_MouseEnter.cs">
// Copyright © 2016–2017, 2019 eMedia Intellect.
// </copyright>
// <licence>
// This file is part of eMI User Controls Library.
//
// eMI User Controls Library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// eMI User Controls Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.
// </licence>

namespace Emi.UserControls
{
using System.Windows.Input;
using System.Windows.Media;

/// <content>Contains the <see cref="CloseButton_MouseEnter"/> method.</content>
public partial class CloseableTabItem
{
/// <summary>Changes the colour of the close button when the mouse enters (hovers over) the close button.</summary>
/// <param name="sender">The sender object of the event handler.</param>
/// <param name="e">The state information of the event handler.</param>
private void CloseButton_MouseEnter(object sender, MouseEventArgs e)
{
this.closeableHeader.closeButton.Foreground = Brushes.Red;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// <author>Stefán Örvar Sigmundsson</author>
// <copyright company="eMedia Intellect" file="CloseButton_MouseLeave.cs">
// Copyright © 2016–2017, 2019 eMedia Intellect.
// </copyright>
// <licence>
// This file is part of eMI User Controls Library.
//
// eMI User Controls Library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// eMI User Controls Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.
// </licence>

namespace Emi.UserControls
{
using System.Windows.Input;
using System.Windows.Media;

/// <content>Contains the <see cref="CloseButton_MouseLeave"/> method.</content>
public partial class CloseableTabItem
{
/// <summary>Changes the colour of the close button when the mouse leaves (hovers off) the close button.</summary>
/// <param name="sender">The sender object of the event handler.</param>
/// <param name="e">The state information of the event handler.</param>
private void CloseButton_MouseLeave(object sender, MouseEventArgs e)
{
this.closeableHeader.closeButton.Foreground = new SolidColorBrush(Color.FromRgb(167, 165, 165));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// <author>Stefán Örvar Sigmundsson</author>
// <copyright company="eMedia Intellect" file="OnMouseEnter.cs">
// Copyright © 2016–2017, 2019 eMedia Intellect.
// </copyright>
// <licence>
// This file is part of eMI User Controls Library.
//
// eMI User Controls Library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// eMI User Controls Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.
// </licence>

namespace Emi.UserControls
{
using System.Windows;
using System.Windows.Input;

/// <content>Contains the <see cref="OnMouseEnter"/> method.</content>
public partial class CloseableTabItem
{
/// <summary>Makes the close button visible when the mouse enters (hovers over) the closeable tab item.</summary>
/// <param name="e">The state information of the event handler.</param>
protected override void OnMouseEnter(MouseEventArgs e)
{
base.OnMouseEnter(e);

this.closeableHeader.closeButton.Visibility = Visibility.Visible;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// <author>Stefán Örvar Sigmundsson</author>
// <copyright company="eMedia Intellect" file="OnMouseLeave.cs">
// Copyright © 2016–2017, 2019 eMedia Intellect.
// </copyright>
// <licence>
// This file is part of eMI User Controls Library.
//
// eMI User Controls Library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// eMI User Controls Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with eMI User Controls Library. If not, see http://www.gnu.org/licenses/.
// </licence>

namespace Emi.UserControls
{
using System.Windows;
using System.Windows.Input;

/// <content>Contains the <see cref="OnMouseLeave"/> method.</content>
public partial class CloseableTabItem
{
/// <summary>Makes the close button invisible when the mouse leaves (hovers off) the closeable tab item.</summary>
/// <param name="e">The state information of the event handler.</param>
protected override void OnMouseLeave(MouseEventArgs e)
{
base.OnMouseLeave(e);

if (!this.IsSelected)
{
this.closeableHeader.closeButton.Visibility = Visibility.Hidden;
}
}
}
}
Loading

0 comments on commit 32dd851

Please sign in to comment.