This repository has been archived by the owner on May 29, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
37 changed files
with
1,740 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=StikyNotes_002EAnnotations/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Input; | ||
|
||
namespace StikyNotes | ||
{ | ||
class RelayCommand:ICommand | ||
{ | ||
#region Private Members | ||
|
||
/// <summary> | ||
/// The action to run | ||
/// </summary> | ||
private Action mAction; | ||
|
||
#endregion | ||
|
||
#region Public Events | ||
|
||
/// <summary> | ||
/// The event thats fired when the <see cref="CanExecute(object)"/> value has changed | ||
/// </summary> | ||
public event EventHandler CanExecuteChanged = (sender, e) => { }; | ||
|
||
#endregion | ||
|
||
#region Constructor | ||
|
||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
public RelayCommand(Action action) | ||
{ | ||
mAction = action; | ||
} | ||
|
||
#endregion | ||
|
||
#region Command Methods | ||
|
||
/// <summary> | ||
/// A relay command can always execute | ||
/// </summary> | ||
/// <param name="parameter"></param> | ||
/// <returns></returns> | ||
public bool CanExecute(object parameter) | ||
{ | ||
return true; | ||
} | ||
|
||
/// <summary> | ||
/// Executes the commands Action | ||
/// </summary> | ||
/// <param name="parameter"></param> | ||
public void Execute(object parameter) | ||
{ | ||
mAction(); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Input; | ||
|
||
namespace StikyNotes | ||
{ | ||
public class RelayParamCommand:ICommand | ||
{ | ||
#region Private Members | ||
|
||
/// <summary> | ||
/// The action to run | ||
/// </summary> | ||
private Action<object> mAction; | ||
|
||
#endregion | ||
|
||
#region Public Events | ||
|
||
/// <summary> | ||
/// The event thats fired when the <see cref="CanExecute(object)"/> value has changed | ||
/// </summary> | ||
public event EventHandler CanExecuteChanged = (sender, e) => { }; | ||
|
||
#endregion | ||
|
||
#region Constructor | ||
|
||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
public RelayParamCommand(Action<object> action) | ||
{ | ||
mAction = action; | ||
} | ||
|
||
#endregion | ||
|
||
#region Command Methods | ||
|
||
/// <summary> | ||
/// A relay command can always execute | ||
/// </summary> | ||
/// <param name="parameter"></param> | ||
/// <returns></returns> | ||
public bool CanExecute(object parameter) | ||
{ | ||
return true; | ||
} | ||
|
||
/// <summary> | ||
/// Executes the commands Action | ||
/// </summary> | ||
/// <param name="parameter"></param> | ||
public void Execute(object parameter) | ||
{ | ||
mAction(parameter); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,92 @@ | ||
<Window x:Class="StikyNotes.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls" | ||
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" | ||
xmlns:local="clr-namespace:StikyNotes" | ||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" | ||
WindowStyle="None" | ||
Height="450" Width="300" MinWidth="300" MinHeight="200"> | ||
AllowsTransparency="True" | ||
Icon="MyLogo.ico" | ||
Height="450" Width="300" MinWidth="300" MinHeight="300" MaxWidth="300" | ||
BorderThickness="24" | ||
WindowStartupLocation="CenterScreen" | ||
> | ||
<Window.Effect> | ||
<DropShadowEffect BlurRadius="12" Color="DarkGray" Direction="90" ShadowDepth="1"/> | ||
</Window.Effect> | ||
<Window.Style> | ||
<Style TargetType="Window"> | ||
<Setter Property="WindowChrome.WindowChrome"> | ||
<Setter.Value> | ||
<WindowChrome CaptionHeight="30" ResizeBorderThickness="5" /> | ||
</Setter.Value> | ||
<Setter.Value> | ||
<WindowChrome ResizeBorderThickness="24" CaptionHeight="0" CornerRadius="24"/> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</Window.Style> | ||
<Grid> | ||
<!--菜单栏阴影效果--> | ||
<Grid.Effect> | ||
<DropShadowEffect ShadowDepth="-4" BlurRadius="10" Color="Gray"/> | ||
</Grid.Effect> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
<StackPanel Grid.Row="0" Orientation="Horizontal"> | ||
<Button Margin="2" | ||
Width="30" | ||
Height="30" | ||
Style="{DynamicResource MahApps.Metro.Styles.MetroCircleButtonStyle}" | ||
ToolTip="MaterialDesignFloatingActionMiniLightButton"> | ||
<Grid Name="Menu" Grid.Row="0" Background="{DynamicResource ForgroundBrush}"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*"/> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<!--增加按钮--> | ||
<Button Name="AddButton" Grid.Column="0" | ||
HorizontalAlignment="Left" | ||
Style="{StaticResource Button_Menu}" ToolTip="New"> | ||
<materialDesign:PackIcon | ||
Kind="Add" | ||
Height="24" | ||
Width="24" /> | ||
Kind="LibraryAdd" | ||
Height="18" | ||
Width="18"/> | ||
</Button> | ||
</StackPanel> | ||
<StackPanel Grid.Row="1"></StackPanel> | ||
<!--软件名称--> | ||
<Label Grid.Column="1" Name="SoftWareName" FontFamily="{StaticResource LatoRegular}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="18" Opacity="0.6" >Stiky Notes</Label> | ||
|
||
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right"> | ||
<!--更多设置按钮--> | ||
<materialDesign:PopupBox Grid.Column="2" HorizontalAlignment="Right" | ||
PlacementMode="BottomAndAlignCentres"> | ||
<ListView Margin="5" MinWidth="80" x:Name="Click"> | ||
<ListViewItem> | ||
设置 | ||
</ListViewItem> | ||
<ListViewItem > | ||
关于 | ||
</ListViewItem> | ||
</ListView> | ||
</materialDesign:PopupBox> | ||
<!--删除按钮 --> | ||
<Button Name="DeleteButton" Grid.Column="3" | ||
ToolTip="Exit" HorizontalAlignment="Right" | ||
Style="{StaticResource Button_Menu}" | ||
> | ||
<iconPacks:Modern | ||
Kind="Delete" | ||
Height="18" | ||
Width="18" /> | ||
</Button> | ||
</StackPanel> | ||
</Grid> | ||
|
||
|
||
<!--文字显示区域--> | ||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Hidden"> | ||
<RichTextBox Name="rickTextBox" | ||
|
||
Style="{DynamicResource RichText_Content}" > | ||
<RichTextBox.Resources> | ||
<Style TargetType="{x:Type Paragraph}"> | ||
<Setter Property="Margin" Value="0"/> | ||
</Style> | ||
</RichTextBox.Resources> | ||
</RichTextBox> | ||
</ScrollViewer> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.