Sicherung
This commit is contained in:
161
Notification-Popup-Window/.gitignore
vendored
Normal file
161
Notification-Popup-Window/.gitignore
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
build/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
|
||||
!packages/*/build/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
packages/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
|
||||
#LightSwitch generated files
|
||||
GeneratedArtifacts/
|
||||
_Pvt_Extensions/
|
||||
ModelManifest.xml
|
||||
|
||||
# =========================
|
||||
# Windows detritus
|
||||
# =========================
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac desktop service store files
|
||||
.DS_Store
|
||||
|
||||
#Nuget builder process
|
||||
nuget.exe
|
||||
*.nupkg
|
||||
/.vs
|
||||
97
Notification-Popup-Window/DemoApp/DemoApp.csproj
Normal file
97
Notification-Popup-Window/DemoApp/DemoApp.csproj
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DemoApp</RootNamespace>
|
||||
<AssemblyName>DemoApp</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\157_GetPermission_48x48_72.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Tulpep.NotificationWindow\Tulpep.NotificationWindow.csproj">
|
||||
<Project>{605006eb-d4e6-4312-a293-3a43fac43240}</Project>
|
||||
<Name>Tulpep.NotificationWindow</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
405
Notification-Popup-Window/DemoApp/Form1.Designer.cs
generated
Normal file
405
Notification-Popup-Window/DemoApp/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,405 @@
|
||||
namespace DemoApp
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.btnExit = new System.Windows.Forms.Button();
|
||||
this.btnShow = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtTitle = new System.Windows.Forms.TextBox();
|
||||
this.txtText = new System.Windows.Forms.TextBox();
|
||||
this.chkIcon = new System.Windows.Forms.CheckBox();
|
||||
this.chkClose = new System.Windows.Forms.CheckBox();
|
||||
this.chkMenu = new System.Windows.Forms.CheckBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtDelay = new System.Windows.Forms.TextBox();
|
||||
this.txtInterval = new System.Windows.Forms.TextBox();
|
||||
this.chkGrip = new System.Windows.Forms.CheckBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtPaddingIcon = new System.Windows.Forms.TextBox();
|
||||
this.chkScroll = new System.Windows.Forms.CheckBox();
|
||||
this.txtPaddingContent = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtPaddingTitle = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.txtAnimationDuration = new System.Windows.Forms.TextBox();
|
||||
this.popupNotifier1 = new Tulpep.NotificationWindow.PopupNotifier();
|
||||
this.chkIsRightToLeft = new System.Windows.Forms.CheckBox();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnExit
|
||||
//
|
||||
this.btnExit.Location = new System.Drawing.Point(425, 12);
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnExit.TabIndex = 0;
|
||||
this.btnExit.Text = "Exit";
|
||||
this.btnExit.UseVisualStyleBackColor = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// btnShow
|
||||
//
|
||||
this.btnShow.Location = new System.Drawing.Point(12, 222);
|
||||
this.btnShow.Name = "btnShow";
|
||||
this.btnShow.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnShow.TabIndex = 1;
|
||||
this.btnShow.Text = "Show!";
|
||||
this.btnShow.UseVisualStyleBackColor = true;
|
||||
this.btnShow.Click += new System.EventHandler(this.btnShow_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 17);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(31, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Title:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 43);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(33, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "Text:";
|
||||
//
|
||||
// txtTitle
|
||||
//
|
||||
this.txtTitle.Location = new System.Drawing.Point(48, 14);
|
||||
this.txtTitle.Name = "txtTitle";
|
||||
this.txtTitle.Size = new System.Drawing.Size(372, 21);
|
||||
this.txtTitle.TabIndex = 4;
|
||||
this.txtTitle.Text = "Notification Title";
|
||||
//
|
||||
// txtText
|
||||
//
|
||||
this.txtText.Location = new System.Drawing.Point(49, 40);
|
||||
this.txtText.Name = "txtText";
|
||||
this.txtText.Size = new System.Drawing.Size(371, 21);
|
||||
this.txtText.TabIndex = 5;
|
||||
this.txtText.Text = "This is the notification text!";
|
||||
//
|
||||
// chkIcon
|
||||
//
|
||||
this.chkIcon.AutoSize = true;
|
||||
this.chkIcon.Checked = true;
|
||||
this.chkIcon.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkIcon.Location = new System.Drawing.Point(15, 75);
|
||||
this.chkIcon.Name = "chkIcon";
|
||||
this.chkIcon.Size = new System.Drawing.Size(74, 17);
|
||||
this.chkIcon.TabIndex = 6;
|
||||
this.chkIcon.Text = "Show icon";
|
||||
this.chkIcon.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkClose
|
||||
//
|
||||
this.chkClose.AutoSize = true;
|
||||
this.chkClose.Checked = true;
|
||||
this.chkClose.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkClose.Location = new System.Drawing.Point(15, 98);
|
||||
this.chkClose.Name = "chkClose";
|
||||
this.chkClose.Size = new System.Drawing.Size(114, 17);
|
||||
this.chkClose.TabIndex = 7;
|
||||
this.chkClose.Text = "Show close button";
|
||||
this.chkClose.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkMenu
|
||||
//
|
||||
this.chkMenu.AutoSize = true;
|
||||
this.chkMenu.Checked = true;
|
||||
this.chkMenu.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkMenu.Location = new System.Drawing.Point(15, 121);
|
||||
this.chkMenu.Name = "chkMenu";
|
||||
this.chkMenu.Size = new System.Drawing.Size(114, 17);
|
||||
this.chkMenu.TabIndex = 8;
|
||||
this.chkMenu.Text = "Show option menu";
|
||||
this.chkMenu.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(199, 76);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(62, 13);
|
||||
this.label4.TabIndex = 9;
|
||||
this.label4.Text = "Delay [ms]:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(199, 99);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(121, 13);
|
||||
this.label3.TabIndex = 10;
|
||||
this.label3.Text = "Animation interval [ms]:";
|
||||
//
|
||||
// txtDelay
|
||||
//
|
||||
this.txtDelay.Location = new System.Drawing.Point(320, 70);
|
||||
this.txtDelay.Name = "txtDelay";
|
||||
this.txtDelay.Size = new System.Drawing.Size(100, 21);
|
||||
this.txtDelay.TabIndex = 11;
|
||||
this.txtDelay.Text = "3000";
|
||||
//
|
||||
// txtInterval
|
||||
//
|
||||
this.txtInterval.Location = new System.Drawing.Point(320, 96);
|
||||
this.txtInterval.Name = "txtInterval";
|
||||
this.txtInterval.Size = new System.Drawing.Size(100, 21);
|
||||
this.txtInterval.TabIndex = 12;
|
||||
this.txtInterval.Text = "10";
|
||||
//
|
||||
// chkGrip
|
||||
//
|
||||
this.chkGrip.AutoSize = true;
|
||||
this.chkGrip.Checked = true;
|
||||
this.chkGrip.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkGrip.Location = new System.Drawing.Point(15, 144);
|
||||
this.chkGrip.Name = "chkGrip";
|
||||
this.chkGrip.Size = new System.Drawing.Size(73, 17);
|
||||
this.chkGrip.TabIndex = 13;
|
||||
this.chkGrip.Text = "Show grip";
|
||||
this.chkGrip.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(199, 151);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(95, 13);
|
||||
this.label5.TabIndex = 14;
|
||||
this.label5.Text = "Title padding [px]:";
|
||||
//
|
||||
// txtPaddingIcon
|
||||
//
|
||||
this.txtPaddingIcon.Location = new System.Drawing.Point(320, 200);
|
||||
this.txtPaddingIcon.Name = "txtPaddingIcon";
|
||||
this.txtPaddingIcon.Size = new System.Drawing.Size(100, 21);
|
||||
this.txtPaddingIcon.TabIndex = 15;
|
||||
this.txtPaddingIcon.Text = "0";
|
||||
//
|
||||
// chkScroll
|
||||
//
|
||||
this.chkScroll.AutoSize = true;
|
||||
this.chkScroll.Checked = true;
|
||||
this.chkScroll.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkScroll.Location = new System.Drawing.Point(15, 167);
|
||||
this.chkScroll.Name = "chkScroll";
|
||||
this.chkScroll.Size = new System.Drawing.Size(82, 17);
|
||||
this.chkScroll.TabIndex = 16;
|
||||
this.chkScroll.Text = "Scroll in/out";
|
||||
this.chkScroll.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtPaddingContent
|
||||
//
|
||||
this.txtPaddingContent.Location = new System.Drawing.Point(320, 174);
|
||||
this.txtPaddingContent.Name = "txtPaddingContent";
|
||||
this.txtPaddingContent.Size = new System.Drawing.Size(100, 21);
|
||||
this.txtPaddingContent.TabIndex = 17;
|
||||
this.txtPaddingContent.Text = "0";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(199, 203);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(96, 13);
|
||||
this.label6.TabIndex = 18;
|
||||
this.label6.Text = "Icon padding [px]:";
|
||||
//
|
||||
// txtPaddingTitle
|
||||
//
|
||||
this.txtPaddingTitle.Location = new System.Drawing.Point(320, 148);
|
||||
this.txtPaddingTitle.Name = "txtPaddingTitle";
|
||||
this.txtPaddingTitle.Size = new System.Drawing.Size(100, 21);
|
||||
this.txtPaddingTitle.TabIndex = 19;
|
||||
this.txtPaddingTitle.Text = "0";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(199, 177);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(114, 13);
|
||||
this.label7.TabIndex = 20;
|
||||
this.label7.Text = "Content padding [px]:";
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.aboutToolStripMenuItem,
|
||||
this.settingsToolStripMenuItem,
|
||||
this.exitToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(126, 70);
|
||||
//
|
||||
// aboutToolStripMenuItem
|
||||
//
|
||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
|
||||
this.aboutToolStripMenuItem.Text = "About...";
|
||||
//
|
||||
// settingsToolStripMenuItem
|
||||
//
|
||||
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
|
||||
this.settingsToolStripMenuItem.Text = "Settings...";
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
|
||||
this.exitToolStripMenuItem.Text = "Exit";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(199, 125);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(123, 13);
|
||||
this.label8.TabIndex = 21;
|
||||
this.label8.Text = "AnimationDuration [ms]:";
|
||||
//
|
||||
// txtAnimationDuration
|
||||
//
|
||||
this.txtAnimationDuration.Location = new System.Drawing.Point(320, 122);
|
||||
this.txtAnimationDuration.Name = "txtAnimationDuration";
|
||||
this.txtAnimationDuration.Size = new System.Drawing.Size(100, 21);
|
||||
this.txtAnimationDuration.TabIndex = 22;
|
||||
this.txtAnimationDuration.Text = "1000";
|
||||
//
|
||||
// popupNotifier1
|
||||
//
|
||||
this.popupNotifier1.BodyColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
|
||||
this.popupNotifier1.ContentFont = new System.Drawing.Font("Tahoma", 8F);
|
||||
this.popupNotifier1.ContentText = null;
|
||||
this.popupNotifier1.GradientPower = 300;
|
||||
this.popupNotifier1.HeaderHeight = 20;
|
||||
this.popupNotifier1.Image = null;
|
||||
this.popupNotifier1.IsRightToLeft = false;
|
||||
this.popupNotifier1.OptionsMenu = this.contextMenuStrip1;
|
||||
this.popupNotifier1.Size = new System.Drawing.Size(400, 100);
|
||||
this.popupNotifier1.TitleFont = new System.Drawing.Font("Segoe UI", 9F);
|
||||
this.popupNotifier1.TitleText = null;
|
||||
//
|
||||
// chkIsRightToLeft
|
||||
//
|
||||
this.chkIsRightToLeft.AutoSize = true;
|
||||
this.chkIsRightToLeft.Location = new System.Drawing.Point(12, 190);
|
||||
this.chkIsRightToLeft.Name = "chkIsRightToLeft";
|
||||
this.chkIsRightToLeft.Size = new System.Drawing.Size(153, 17);
|
||||
this.chkIsRightToLeft.TabIndex = 23;
|
||||
this.chkIsRightToLeft.Text = "Right to Left/ راست به چپ";
|
||||
this.chkIsRightToLeft.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(512, 257);
|
||||
this.Controls.Add(this.chkIsRightToLeft);
|
||||
this.Controls.Add(this.txtPaddingTitle);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.txtAnimationDuration);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.chkScroll);
|
||||
this.Controls.Add(this.txtPaddingContent);
|
||||
this.Controls.Add(this.txtPaddingIcon);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.chkGrip);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.txtDelay);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.txtInterval);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.chkMenu);
|
||||
this.Controls.Add(this.chkClose);
|
||||
this.Controls.Add(this.chkIcon);
|
||||
this.Controls.Add(this.txtText);
|
||||
this.Controls.Add(this.txtTitle);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.btnShow);
|
||||
this.Controls.Add(this.btnExit);
|
||||
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Form1";
|
||||
this.Text = "NotificationWindow Demo";
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnExit;
|
||||
private System.Windows.Forms.Button btnShow;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtTitle;
|
||||
private System.Windows.Forms.TextBox txtText;
|
||||
private System.Windows.Forms.CheckBox chkIcon;
|
||||
private System.Windows.Forms.CheckBox chkClose;
|
||||
private System.Windows.Forms.CheckBox chkMenu;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtDelay;
|
||||
private System.Windows.Forms.TextBox txtInterval;
|
||||
private System.Windows.Forms.CheckBox chkGrip;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox txtPaddingIcon;
|
||||
private System.Windows.Forms.CheckBox chkScroll;
|
||||
private System.Windows.Forms.TextBox txtPaddingContent;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox txtPaddingTitle;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.TextBox txtAnimationDuration;
|
||||
private Tulpep.NotificationWindow.PopupNotifier popupNotifier1;
|
||||
private System.Windows.Forms.CheckBox chkIsRightToLeft;
|
||||
}
|
||||
}
|
||||
|
||||
53
Notification-Popup-Window/DemoApp/Form1.cs
Normal file
53
Notification-Popup-Window/DemoApp/Form1.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Created/modified in 2011 by Simon Baer
|
||||
*
|
||||
* Licensed under the Code Project Open License (CPOL).
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DemoApp
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnShow_Click(object sender, EventArgs e)
|
||||
{
|
||||
popupNotifier1.TitleText = txtTitle.Text;
|
||||
popupNotifier1.ContentText = txtText.Text;
|
||||
popupNotifier1.ShowCloseButton = chkClose.Checked;
|
||||
popupNotifier1.ShowOptionsButton = chkMenu.Checked;
|
||||
popupNotifier1.ShowGrip = chkGrip.Checked;
|
||||
popupNotifier1.Delay = int.Parse(txtDelay.Text);
|
||||
popupNotifier1.AnimationInterval = int.Parse(txtInterval.Text);
|
||||
popupNotifier1.AnimationDuration = int.Parse(txtAnimationDuration.Text);
|
||||
popupNotifier1.TitlePadding = new Padding(int.Parse(txtPaddingTitle.Text));
|
||||
popupNotifier1.ContentPadding = new Padding(int.Parse(txtPaddingContent.Text));
|
||||
popupNotifier1.ImagePadding = new Padding(int.Parse(txtPaddingIcon.Text));
|
||||
popupNotifier1.Scroll = chkScroll.Checked;
|
||||
popupNotifier1.IsRightToLeft = chkIsRightToLeft.Checked;
|
||||
if (chkIcon.Checked)
|
||||
{
|
||||
popupNotifier1.Image = Properties.Resources._157_GetPermission_48x48_72;
|
||||
}
|
||||
else
|
||||
{
|
||||
popupNotifier1.Image = null;
|
||||
}
|
||||
|
||||
popupNotifier1.Popup();
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
126
Notification-Popup-Window/DemoApp/Form1.resx
Normal file
126
Notification-Popup-Window/DemoApp/Form1.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>152, 17</value>
|
||||
</metadata>
|
||||
<metadata name="popupNotifier1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
25
Notification-Popup-Window/DemoApp/Program.cs
Normal file
25
Notification-Popup-Window/DemoApp/Program.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Created/modified in 2011 by Simon Baer
|
||||
*
|
||||
* Licensed under the Code Project Open License (CPOL).
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DemoApp
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Notification-Popup-Window/DemoApp/Properties/AssemblyInfo.cs
Normal file
36
Notification-Popup-Window/DemoApp/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DemoApp")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DemoApp")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2011 by Simon B.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("fe6db5c0-7cd9-4100-aa8c-12d84b9d8417")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
70
Notification-Popup-Window/DemoApp/Properties/Resources.Designer.cs
generated
Normal file
70
Notification-Popup-Window/DemoApp/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.235
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DemoApp.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DemoApp.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap _157_GetPermission_48x48_72 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("_157_GetPermission_48x48_72", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
124
Notification-Popup-Window/DemoApp/Properties/Resources.resx
Normal file
124
Notification-Popup-Window/DemoApp/Properties/Resources.resx
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="_157_GetPermission_48x48_72" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\157_GetPermission_48x48_72.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
30
Notification-Popup-Window/DemoApp/Properties/Settings.Designer.cs
generated
Normal file
30
Notification-Popup-Window/DemoApp/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.235
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DemoApp.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
2
Notification-Popup-Window/LICENSE
Normal file
2
Notification-Popup-Window/LICENSE
Normal file
@@ -0,0 +1,2 @@
|
||||
The Code Project Open License
|
||||
http://www.codeproject.com/info/cpol10.aspx
|
||||
44
Notification-Popup-Window/NotificationWindow.sln
Normal file
44
Notification-Popup-Window/NotificationWindow.sln
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.30723.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tulpep.NotificationWindow", "Tulpep.NotificationWindow\Tulpep.NotificationWindow.csproj", "{605006EB-D4E6-4312-A293-3A43FAC43240}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApp", "DemoApp\DemoApp.csproj", "{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{605006EB-D4E6-4312-A293-3A43FAC43240}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Debug|x86.Build.0 = Debug|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Release|x86.ActiveCfg = Release|x86
|
||||
{833625E6-80AC-45E0-8AA4-06BDDEDBEA2F}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
16
Notification-Popup-Window/Nuget/Build.ps1
Normal file
16
Notification-Popup-Window/Nuget/Build.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
$root = (split-path -parent $MyInvocation.MyCommand.Definition) + '\..'
|
||||
Write-Output "Downloading nuget.exe from nuget.org"
|
||||
Invoke-WebRequest "https://nuget.org/nuget.exe" -OutFile $root\Nuget.exe
|
||||
|
||||
|
||||
$version = [System.Reflection.Assembly]::LoadFile("$root\Tulpep.NotificationWindow\bin\Release\Tulpep.NotificationWindow.dll").GetName().Version
|
||||
$versionStr = "{0}.{1}.{2}" -f ($version.Major, $version.Minor, $version.Build)
|
||||
Write-Host "Setting .nuspec version tag to $versionStr"
|
||||
$content = (Get-Content $root\NuGet\specs.nuspec)
|
||||
$content = $content -replace '\$version\$',$versionStr
|
||||
|
||||
$content | Out-File $root\nuget\specs.nuspec
|
||||
|
||||
|
||||
Write-Output "Creating Nuget Package"
|
||||
& $root\Nuget.exe pack $root\Nuget\specs.nuspec
|
||||
18
Notification-Popup-Window/Nuget/specs.nuspec
Normal file
18
Notification-Popup-Window/Nuget/specs.nuspec
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Tulpep.NotificationWindow</id>
|
||||
<version>$version$</version>
|
||||
<title>Notification Popup Window</title>
|
||||
<authors>Simon Baer; Tulpep</authors>
|
||||
<licenseUrl>https://raw.githubusercontent.com/Tulpep/Notification-Popup-Window/master/LICENSE</licenseUrl>
|
||||
<projectUrl>https://github.com/Tulpep/Notification-Popup-Window</projectUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>Notification Popup Window</description>
|
||||
<summary>Notification Popup Window</summary>
|
||||
<tags>WinForms Windows Forms NotificationWindow Notification Notifications Popup Popups</tags>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\Tulpep.NotificationWindow\bin\Release\Tulpep.NotificationWindow.dll" target="lib\net40\Tulpep.NotificationWindow.dll" />
|
||||
</files>
|
||||
</package>
|
||||
37
Notification-Popup-Window/README.md
Normal file
37
Notification-Popup-Window/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
Notification Popup Window Nuget [](https://ci.appveyor.com/project/tulpep/notification-popup-window/branch/master)
|
||||
========================
|
||||
### A notification window that appears on the lower right part of the screen for .NET
|
||||
|
||||

|
||||
|
||||
This project is based on a [Notification Window](http://www.codeproject.com/Articles/277584/Notification-Window) created in 2011 by Simon Baer. It is also base in [Office 2003-like popup notifier](http://www.codeproject.com/Articles/13547/An-Office-like-popup-notifier) created in 2006 by Nicolas Wälti.
|
||||
|
||||
### Features:
|
||||
- Scroll and/or fade window in and out
|
||||
- Configure the animation speed and the time the window is displayed
|
||||
- Display a custom icon
|
||||
- Set title and content text, font, size, and color
|
||||
- Set all paddings around icon, title and content
|
||||
- Sptionally display a close button
|
||||
- Optionally display a button which opens a context menu
|
||||
- Supports right to left languages like Persian and Arabic
|
||||
|
||||

|
||||
|
||||
### How to use it
|
||||
You can install the lastest version using [NuGet](https://www.nuget.org/packages/Tulpep.NotificationWindow/)
|
||||
```powershell
|
||||
Install-Package Tulpep.NotificationWindow
|
||||
```
|
||||
|
||||
And use it this way:
|
||||
```cs
|
||||
var popupNotifier = new PopupNotifier();
|
||||
popupNotifier.TitleText = "Title of popup";
|
||||
popupNotifier.ContentText = "Content text";
|
||||
popupNotifier.IsRightToLeft = false;
|
||||
popupNotifier.Popup();
|
||||
|
||||
|
||||
```
|
||||
This repository contains a Visual Studio Test Project if you want a working example.
|
||||
BIN
Notification-Popup-Window/Screenshots/example1.png
Normal file
BIN
Notification-Popup-Window/Screenshots/example1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
BIN
Notification-Popup-Window/Screenshots/example2.png
Normal file
BIN
Notification-Popup-Window/Screenshots/example2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
Notification-Popup-Window/Tulpep.NotificationWindow/Grip.png
Normal file
BIN
Notification-Popup-Window/Tulpep.NotificationWindow/Grip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 153 B |
BIN
Notification-Popup-Window/Tulpep.NotificationWindow/Icon.ico
Normal file
BIN
Notification-Popup-Window/Tulpep.NotificationWindow/Icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,631 @@
|
||||
/*
|
||||
* Created/modified in 2011 by Simon Baer
|
||||
*
|
||||
* Based on the Code Project article by Nicolas Wälti:
|
||||
* http://www.codeproject.com/KB/cpp/PopupNotifier.aspx
|
||||
*
|
||||
* Licensed under the Code Project Open License (CPOL).
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Tulpep.NotificationWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Non-visual component to show a notification window in the right lower
|
||||
/// corner of the screen.
|
||||
/// </summary>
|
||||
[ToolboxBitmapAttribute(typeof(PopupNotifier), "Icon.ico")]
|
||||
[DefaultEvent("Click")]
|
||||
public class PopupNotifier : Component
|
||||
{
|
||||
#region Windows API
|
||||
private const int SW_SHOWNOACTIVATE = 4;
|
||||
private const int HWND_TOPMOST = -1;
|
||||
private const uint SWP_NOACTIVATE = 0x0010;
|
||||
|
||||
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
|
||||
static extern bool SetWindowPos(
|
||||
int hWnd, // Window handle
|
||||
int hWndInsertAfter, // Placement-order handle
|
||||
int X, // Horizontal position
|
||||
int Y, // Vertical position
|
||||
int cx, // Width
|
||||
int cy, // Height
|
||||
uint uFlags); // Window positioning flags
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
|
||||
|
||||
static void ShowInactiveTopmost(Form frm)
|
||||
{
|
||||
ShowWindow(frm.Handle, SW_SHOWNOACTIVATE);
|
||||
SetWindowPos(frm.Handle.ToInt32(), HWND_TOPMOST,
|
||||
frm.Left, frm.Top, frm.Width, frm.Height,
|
||||
SWP_NOACTIVATE);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Event that is raised when the text in the notification window is clicked.
|
||||
/// </summary>
|
||||
public event EventHandler Click;
|
||||
|
||||
/// <summary>
|
||||
/// Event that is raised when the notification window is manually closed.
|
||||
/// </summary>
|
||||
public event EventHandler Close;
|
||||
|
||||
/// <summary>
|
||||
/// Event that is raised when the notification Appears.
|
||||
/// </summary>
|
||||
public event EventHandler Appear;
|
||||
|
||||
/// <summary>
|
||||
/// Event that is raised when the notification Dissapers
|
||||
/// </summary>
|
||||
public event EventHandler Disappear;
|
||||
|
||||
private bool disposed = false;
|
||||
private PopupNotifierForm frmPopup;
|
||||
private Timer tmrAnimation;
|
||||
private Timer tmrWait;
|
||||
|
||||
private bool isAppearing = true;
|
||||
private bool markedForDisposed = false;
|
||||
private bool mouseIsOn = false;
|
||||
private int maxPosition;
|
||||
private double maxOpacity;
|
||||
private int posStart;
|
||||
private int posStop;
|
||||
private double opacityStart;
|
||||
private double opacityStop;
|
||||
private int realAnimationDuration;
|
||||
private System.Diagnostics.Stopwatch sw;
|
||||
|
||||
#region Properties
|
||||
|
||||
[Category("Header"), DefaultValue(typeof(Color), "ControlDark")]
|
||||
[Description("Color of the window header.")]
|
||||
public Color HeaderColor { get; set; }
|
||||
|
||||
[Category("Appearance"), DefaultValue(typeof(Color), "Control")]
|
||||
[Description("Color of the window background.")]
|
||||
public Color BodyColor { get; set; }
|
||||
|
||||
[Category("Title"), DefaultValue(typeof(Color), "Gray")]
|
||||
[Description("Color of the title text.")]
|
||||
public Color TitleColor { get; set; }
|
||||
|
||||
[Category("Content"), DefaultValue(typeof(Color), "ControlText")]
|
||||
[Description("Color of the content text.")]
|
||||
public Color ContentColor { get; set; }
|
||||
|
||||
[Category("Appearance"), DefaultValue(typeof(Color), "WindowFrame")]
|
||||
[Description("Color of the window border.")]
|
||||
public Color BorderColor { get; set; }
|
||||
|
||||
[Category("Buttons"), DefaultValue(typeof(Color), "WindowFrame")]
|
||||
[Description("Border color of the close and options buttons when the mouse is over them.")]
|
||||
public Color ButtonBorderColor { get; set; }
|
||||
|
||||
[Category("Buttons"), DefaultValue(typeof(Color), "Highlight")]
|
||||
[Description("Background color of the close and options buttons when the mouse is over them.")]
|
||||
public Color ButtonHoverColor { get; set; }
|
||||
|
||||
[Category("Content"), DefaultValue(typeof(Color), "HotTrack")]
|
||||
[Description("Color of the content text when the mouse is hovering over it.")]
|
||||
public Color ContentHoverColor { get; set; }
|
||||
|
||||
[Category("Appearance"), DefaultValue(50)]
|
||||
[Description("Gradient of window background color.")]
|
||||
public int GradientPower { get; set; }
|
||||
|
||||
[Category("Content")]
|
||||
[Description("Font of the content text.")]
|
||||
public Font ContentFont { get; set; }
|
||||
|
||||
[Category("Title")]
|
||||
[Description("Font of the title.")]
|
||||
public Font TitleFont { get; set; }
|
||||
|
||||
[Category("Image")]
|
||||
[Description("Size of the icon image.")]
|
||||
public Size ImageSize
|
||||
{
|
||||
get
|
||||
{
|
||||
if (imageSize.Width == 0)
|
||||
{
|
||||
if (Image != null)
|
||||
{
|
||||
return Image.Size;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Size(0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return imageSize;
|
||||
}
|
||||
}
|
||||
set { imageSize = value; }
|
||||
}
|
||||
|
||||
public void ResetImageSize()
|
||||
{
|
||||
imageSize = Size.Empty;
|
||||
}
|
||||
|
||||
private bool ShouldSerializeImageSize()
|
||||
{
|
||||
return (!imageSize.Equals(Size.Empty));
|
||||
}
|
||||
|
||||
private Size imageSize = new Size(0, 0);
|
||||
|
||||
[Category("Image")]
|
||||
[Description("Icon image to display.")]
|
||||
public Image Image { get; set; }
|
||||
|
||||
[Category("Header"), DefaultValue(true)]
|
||||
[Description("Whether to show a 'grip' image within the window header.")]
|
||||
public bool ShowGrip { get; set; }
|
||||
|
||||
[Category("Behavior"), DefaultValue(true)]
|
||||
[Description("Whether to scroll the window or only fade it.")]
|
||||
public bool Scroll { get; set; }
|
||||
|
||||
[Category("Content")]
|
||||
[Description("Content text to display.")]
|
||||
public string ContentText { get; set; }
|
||||
|
||||
[Category("Title")]
|
||||
[Description("Title text to display.")]
|
||||
public string TitleText { get; set; }
|
||||
|
||||
[Category("Title")]
|
||||
[Description("Padding of title text.")]
|
||||
public Padding TitlePadding { get; set; }
|
||||
|
||||
private void ResetTitlePadding()
|
||||
{
|
||||
TitlePadding = Padding.Empty;
|
||||
}
|
||||
|
||||
private bool ShouldSerializeTitlePadding()
|
||||
{
|
||||
return (!TitlePadding.Equals(Padding.Empty));
|
||||
}
|
||||
|
||||
[Category("Content")]
|
||||
[Description("Padding of content text.")]
|
||||
public Padding ContentPadding { get; set; }
|
||||
|
||||
private void ResetContentPadding()
|
||||
{
|
||||
ContentPadding = Padding.Empty;
|
||||
}
|
||||
|
||||
private bool ShouldSerializeContentPadding()
|
||||
{
|
||||
return (!ContentPadding.Equals(Padding.Empty));
|
||||
}
|
||||
|
||||
[Category("Image")]
|
||||
[Description("Padding of icon image.")]
|
||||
public Padding ImagePadding { get; set; }
|
||||
|
||||
private void ResetImagePadding()
|
||||
{
|
||||
ImagePadding = Padding.Empty;
|
||||
}
|
||||
|
||||
private bool ShouldSerializeImagePadding()
|
||||
{
|
||||
return (!ImagePadding.Equals(Padding.Empty));
|
||||
}
|
||||
|
||||
[Category("Header"), DefaultValue(9)]
|
||||
[Description("Height of window header.")]
|
||||
public int HeaderHeight { get; set; }
|
||||
|
||||
[Category("Buttons"), DefaultValue(true)]
|
||||
[Description("Whether to show the close button.")]
|
||||
public bool ShowCloseButton { get; set; }
|
||||
|
||||
[Category("Buttons"), DefaultValue(false)]
|
||||
[Description("Whether to show the options button.")]
|
||||
public bool ShowOptionsButton { get; set; }
|
||||
|
||||
[Category("Behavior")]
|
||||
[Description("Context menu to open when clicking on the options button.")]
|
||||
public ContextMenuStrip OptionsMenu { get; set; }
|
||||
|
||||
[Category("Behavior"), DefaultValue(3000)]
|
||||
[Description("Time in milliseconds the window is displayed.")]
|
||||
public int Delay { get; set; }
|
||||
|
||||
[Category("Behavior"), DefaultValue(1000)]
|
||||
[Description("Time in milliseconds needed to make the window appear or disappear.")]
|
||||
public int AnimationDuration { get; set; }
|
||||
|
||||
[Category("Behavior"), DefaultValue(10)]
|
||||
[Description("Interval in milliseconds used to draw the animation.")]
|
||||
public int AnimationInterval { get; set; }
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Size of the window.")]
|
||||
public Size Size { get; set; }
|
||||
|
||||
[Category("Content")]
|
||||
[Description("Show Content Right To Left,نمایش پیغام چپ به راست فعال شود")]
|
||||
public bool IsRightToLeft { get; set; }
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Create a new instance of the popup component.
|
||||
/// </summary>
|
||||
public PopupNotifier()
|
||||
{
|
||||
// set default values
|
||||
HeaderColor = SystemColors.ControlDark;
|
||||
BodyColor = SystemColors.Control;
|
||||
TitleColor = System.Drawing.Color.Gray;
|
||||
ContentColor = SystemColors.ControlText;
|
||||
BorderColor = SystemColors.WindowFrame;
|
||||
ButtonBorderColor = SystemColors.WindowFrame;
|
||||
ButtonHoverColor = SystemColors.Highlight;
|
||||
ContentHoverColor = SystemColors.HotTrack;
|
||||
GradientPower = 50;
|
||||
ContentFont = SystemFonts.DialogFont;
|
||||
TitleFont = SystemFonts.CaptionFont;
|
||||
ShowGrip = true;
|
||||
Scroll = true;
|
||||
TitlePadding = new Padding(0);
|
||||
ContentPadding = new Padding(0);
|
||||
ImagePadding = new Padding(0);
|
||||
HeaderHeight = 9;
|
||||
ShowCloseButton = true;
|
||||
ShowOptionsButton = false;
|
||||
Delay = 3000;
|
||||
AnimationInterval = 10;
|
||||
AnimationDuration = 1000;
|
||||
Size = new Size(400, 100);
|
||||
|
||||
frmPopup = new PopupNotifierForm(this);
|
||||
frmPopup.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
frmPopup.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
frmPopup.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
frmPopup.MouseEnter += new EventHandler(frmPopup_MouseEnter);
|
||||
frmPopup.MouseLeave += new EventHandler(frmPopup_MouseLeave);
|
||||
frmPopup.CloseClick += new EventHandler(frmPopup_CloseClick);
|
||||
frmPopup.LinkClick += new EventHandler(frmPopup_LinkClick);
|
||||
frmPopup.ContextMenuOpened += new EventHandler(frmPopup_ContextMenuOpened);
|
||||
frmPopup.ContextMenuClosed += new EventHandler(frmPopup_ContextMenuClosed);
|
||||
frmPopup.VisibleChanged += new EventHandler(frmPopup_VisibleChanged);
|
||||
|
||||
tmrAnimation = new Timer();
|
||||
tmrAnimation.Tick += new EventHandler(tmAnimation_Tick);
|
||||
|
||||
tmrWait = new Timer();
|
||||
tmrWait.Tick += new EventHandler(tmWait_Tick);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the notification window if it is not already visible.
|
||||
/// If the window is currently disappearing, it is shown again.
|
||||
/// </summary>
|
||||
public void Popup()
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
if (!frmPopup.Visible)
|
||||
{
|
||||
frmPopup.Size = Size;
|
||||
if (Scroll)
|
||||
{
|
||||
posStart = Screen.PrimaryScreen.WorkingArea.Bottom;
|
||||
posStop = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
posStart = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
posStop = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
}
|
||||
opacityStart = 0;
|
||||
opacityStop = 1;
|
||||
|
||||
frmPopup.Opacity = opacityStart;
|
||||
frmPopup.Location = new Point(Screen.PrimaryScreen.WorkingArea.Right - frmPopup.Size.Width - 1, posStart);
|
||||
ShowInactiveTopmost(frmPopup);
|
||||
isAppearing = true;
|
||||
|
||||
tmrWait.Interval = Delay;
|
||||
tmrAnimation.Interval = AnimationInterval;
|
||||
realAnimationDuration = AnimationDuration;
|
||||
tmrAnimation.Start();
|
||||
sw = System.Diagnostics.Stopwatch.StartNew();
|
||||
System.Diagnostics.Debug.WriteLine("Animation started.");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isAppearing)
|
||||
{
|
||||
frmPopup.Size = Size;
|
||||
if (Scroll)
|
||||
{
|
||||
posStart = frmPopup.Top;
|
||||
posStop = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
posStart = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
posStop = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
}
|
||||
opacityStart = frmPopup.Opacity;
|
||||
opacityStop = 1;
|
||||
isAppearing = true;
|
||||
realAnimationDuration = Math.Max((int)sw.ElapsedMilliseconds, 1);
|
||||
sw.Restart();
|
||||
System.Diagnostics.Debug.WriteLine("Animation direction changed.");
|
||||
}
|
||||
frmPopup.Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hide the notification window.
|
||||
/// </summary>
|
||||
public void Hide()
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("Animation stopped.");
|
||||
System.Diagnostics.Debug.WriteLine("Wait timer stopped.");
|
||||
tmrAnimation.Stop();
|
||||
tmrWait.Stop();
|
||||
frmPopup.Hide();
|
||||
if (markedForDisposed)
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The custom options menu has been closed. Restart the timer for
|
||||
/// closing the notification window.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void frmPopup_ContextMenuClosed(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("Menu closed.");
|
||||
if (!mouseIsOn)
|
||||
{
|
||||
tmrWait.Interval = Delay;
|
||||
tmrWait.Start();
|
||||
System.Diagnostics.Debug.WriteLine("Wait timer started.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The custom options menu has been opened. The window must not be closed
|
||||
/// as long as the menu is open.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void frmPopup_ContextMenuOpened(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("Menu opened.");
|
||||
tmrWait.Stop();
|
||||
System.Diagnostics.Debug.WriteLine("Wait timer stopped.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The text has been clicked. Raise the 'Click' event.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void frmPopup_LinkClick(object sender, EventArgs e)
|
||||
{
|
||||
if (Click != null)
|
||||
{
|
||||
Click(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The close button has been clicked. Hide the notification window
|
||||
/// and raise the 'Close' event.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void frmPopup_CloseClick(object sender, EventArgs e)
|
||||
{
|
||||
Hide();
|
||||
if (Close != null)
|
||||
{
|
||||
Close(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Visibility has changed
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void frmPopup_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (frmPopup.Visible)
|
||||
{
|
||||
if (Appear != null) Appear(this, EventArgs.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Disappear != null) Disappear(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update form position and opacity to show/hide the window.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void tmAnimation_Tick(object sender, EventArgs e)
|
||||
{
|
||||
long elapsed = sw.ElapsedMilliseconds;
|
||||
|
||||
int posCurrent = (int)(posStart + ((posStop - posStart) * elapsed / realAnimationDuration));
|
||||
bool neg = (posStop - posStart) < 0;
|
||||
if ((neg && posCurrent < posStop) ||
|
||||
(!neg && posCurrent > posStop))
|
||||
{
|
||||
posCurrent = posStop;
|
||||
}
|
||||
|
||||
double opacityCurrent = opacityStart + ((opacityStop - opacityStart) * elapsed / realAnimationDuration);
|
||||
neg = (opacityStop - opacityStart) < 0;
|
||||
if ((neg && opacityCurrent < opacityStop) ||
|
||||
(!neg && opacityCurrent > opacityStop))
|
||||
{
|
||||
opacityCurrent = opacityStop;
|
||||
}
|
||||
|
||||
frmPopup.Top = posCurrent;
|
||||
frmPopup.Opacity = opacityCurrent;
|
||||
|
||||
// animation has ended
|
||||
if (elapsed > realAnimationDuration)
|
||||
{
|
||||
|
||||
sw.Reset();
|
||||
tmrAnimation.Stop();
|
||||
System.Diagnostics.Debug.WriteLine("Animation stopped.");
|
||||
|
||||
if (isAppearing)
|
||||
{
|
||||
if (Scroll)
|
||||
{
|
||||
posStart = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
posStop = Screen.PrimaryScreen.WorkingArea.Bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
posStart = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
posStop = Screen.PrimaryScreen.WorkingArea.Bottom - frmPopup.Height;
|
||||
}
|
||||
opacityStart = 1;
|
||||
opacityStop = 0;
|
||||
|
||||
realAnimationDuration = AnimationDuration;
|
||||
|
||||
isAppearing = false;
|
||||
maxPosition = frmPopup.Top;
|
||||
maxOpacity = frmPopup.Opacity;
|
||||
if (!mouseIsOn)
|
||||
{
|
||||
tmrWait.Stop();
|
||||
tmrWait.Start();
|
||||
System.Diagnostics.Debug.WriteLine("Wait timer started.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
frmPopup.Hide();
|
||||
if (markedForDisposed)
|
||||
Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The wait timer has elapsed, start the animation to hide the window.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void tmWait_Tick(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("Wait timer elapsed.");
|
||||
tmrWait.Stop();
|
||||
tmrAnimation.Interval = AnimationInterval;
|
||||
tmrAnimation.Start();
|
||||
sw.Restart();
|
||||
System.Diagnostics.Debug.WriteLine("Animation started.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start wait timer if the mouse leaves the form.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void frmPopup_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("MouseLeave");
|
||||
if (frmPopup.Visible && (OptionsMenu == null || !OptionsMenu.Visible))
|
||||
{
|
||||
tmrWait.Interval = Delay;
|
||||
tmrWait.Start();
|
||||
System.Diagnostics.Debug.WriteLine("Wait timer started.");
|
||||
}
|
||||
mouseIsOn = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stop wait timer if the mouse enters the form.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void frmPopup_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("MouseEnter");
|
||||
if (!isAppearing)
|
||||
{
|
||||
frmPopup.Top = maxPosition;
|
||||
frmPopup.Opacity = maxOpacity;
|
||||
tmrAnimation.Stop();
|
||||
System.Diagnostics.Debug.WriteLine("Animation stopped.");
|
||||
}
|
||||
|
||||
tmrWait.Stop();
|
||||
System.Diagnostics.Debug.WriteLine("Wait timer stopped.");
|
||||
|
||||
mouseIsOn = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose the notification form.
|
||||
/// </summary>
|
||||
/// <param name="disposing"></param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
if (isAppearing)
|
||||
{
|
||||
markedForDisposed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (disposing)
|
||||
{
|
||||
if (frmPopup != null)
|
||||
frmPopup.Dispose();
|
||||
tmrAnimation.Tick -= tmAnimation_Tick;
|
||||
tmrWait.Tick -= tmWait_Tick;
|
||||
tmrAnimation.Dispose();
|
||||
tmrWait.Dispose();
|
||||
|
||||
}
|
||||
disposed = true;
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,398 @@
|
||||
/*
|
||||
* Created/modified in 2011 by Simon Baer
|
||||
*
|
||||
* Based on the Code Project article by Nicolas Wälti:
|
||||
* http://www.codeproject.com/KB/cpp/PopupNotifier.aspx
|
||||
*
|
||||
* Licensed under the Code Project Open License (CPOL).
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
namespace Tulpep.NotificationWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the form of the actual notification window.
|
||||
/// </summary>
|
||||
internal class PopupNotifierForm : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Event that is raised when the text is clicked.
|
||||
/// </summary>
|
||||
public event EventHandler LinkClick;
|
||||
|
||||
/// <summary>
|
||||
/// Event that is raised when the notification window is manually closed.
|
||||
/// </summary>
|
||||
public event EventHandler CloseClick;
|
||||
|
||||
internal event EventHandler ContextMenuOpened;
|
||||
internal event EventHandler ContextMenuClosed;
|
||||
|
||||
private bool mouseOnClose = false;
|
||||
private bool mouseOnLink = false;
|
||||
private bool mouseOnOptions = false;
|
||||
private int heightOfTitle;
|
||||
|
||||
#region GDI objects
|
||||
|
||||
private bool gdiInitialized = false;
|
||||
private Rectangle rcBody;
|
||||
private Rectangle rcHeader;
|
||||
private Rectangle rcForm;
|
||||
private LinearGradientBrush brushBody;
|
||||
private LinearGradientBrush brushHeader;
|
||||
private Brush brushButtonHover;
|
||||
private Pen penButtonBorder;
|
||||
private Pen penContent;
|
||||
private Pen penBorder;
|
||||
private Brush brushForeColor;
|
||||
private Brush brushLinkHover;
|
||||
private Brush brushContent;
|
||||
private Brush brushTitle;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Create a new instance.
|
||||
/// </summary>
|
||||
/// <param name="parent">PopupNotifier</param>
|
||||
public PopupNotifierForm(PopupNotifier parent)
|
||||
{
|
||||
Parent = parent;
|
||||
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||
this.ShowInTaskbar = false;
|
||||
|
||||
this.VisibleChanged += new EventHandler(PopupNotifierForm_VisibleChanged);
|
||||
this.MouseMove += new MouseEventHandler(PopupNotifierForm_MouseMove);
|
||||
this.MouseUp += new MouseEventHandler(PopupNotifierForm_MouseUp);
|
||||
this.Paint += new PaintEventHandler(PopupNotifierForm_Paint);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The form is shown/hidden.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PopupNotifierForm_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Visible)
|
||||
{
|
||||
mouseOnClose = false;
|
||||
mouseOnLink = false;
|
||||
mouseOnOptions = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used in design mode.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PopupNotifierForm
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(392, 66);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "PopupNotifierForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent control.
|
||||
/// </summary>
|
||||
public new PopupNotifier Parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Add two values but do not return a value greater than 255.
|
||||
/// </summary>
|
||||
/// <param name="input">first value</param>
|
||||
/// <param name="add">value to add</param>
|
||||
/// <returns>sum of both values</returns>
|
||||
private int AddValueMax255(int input, int add)
|
||||
{
|
||||
return (input + add < 256) ? input + add : 255;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtract two values but do not returns a value below 0.
|
||||
/// </summary>
|
||||
/// <param name="input">first value</param>
|
||||
/// <param name="ded">value to subtract</param>
|
||||
/// <returns>first value minus second value</returns>
|
||||
private int DedValueMin0(int input, int ded)
|
||||
{
|
||||
return (input - ded > 0) ? input - ded : 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a color which is darker than the given color.
|
||||
/// </summary>
|
||||
/// <param name="color">Color</param>
|
||||
/// <returns>darker color</returns>
|
||||
private Color GetDarkerColor(Color color)
|
||||
{
|
||||
return System.Drawing.Color.FromArgb(255, DedValueMin0((int)color.R, Parent.GradientPower), DedValueMin0((int)color.G, Parent.GradientPower), DedValueMin0((int)color.B, Parent.GradientPower));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a color which is lighter than the given color.
|
||||
/// </summary>
|
||||
/// <param name="color">Color</param>
|
||||
/// <returns>lighter color</returns>
|
||||
private Color GetLighterColor(Color color)
|
||||
{
|
||||
return System.Drawing.Color.FromArgb(255, AddValueMax255((int)color.R, Parent.GradientPower), AddValueMax255((int)color.G, Parent.GradientPower), AddValueMax255((int)color.B, Parent.GradientPower));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the rectangle of the content text.
|
||||
/// </summary>
|
||||
private RectangleF RectContentText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Parent.Image != null)
|
||||
{
|
||||
return new RectangleF(
|
||||
Parent.ImagePadding.Left + Parent.ImageSize.Width + Parent.ImagePadding.Right + Parent.ContentPadding.Left,
|
||||
Parent.HeaderHeight + Parent.TitlePadding.Top + heightOfTitle + Parent.TitlePadding.Bottom + Parent.ContentPadding.Top,
|
||||
this.Width - Parent.ImagePadding.Left - Parent.ImageSize.Width - Parent.ImagePadding.Right - Parent.ContentPadding.Left - Parent.ContentPadding.Right - 16 - 5,
|
||||
this.Height - Parent.HeaderHeight - Parent.TitlePadding.Top - heightOfTitle - Parent.TitlePadding.Bottom - Parent.ContentPadding.Top - Parent.ContentPadding.Bottom - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new RectangleF(
|
||||
Parent.ContentPadding.Left,
|
||||
Parent.HeaderHeight + Parent.TitlePadding.Top + heightOfTitle + Parent.TitlePadding.Bottom + Parent.ContentPadding.Top,
|
||||
this.Width - Parent.ContentPadding.Left - Parent.ContentPadding.Right - 16 - 5,
|
||||
this.Height - Parent.HeaderHeight - Parent.TitlePadding.Top - heightOfTitle - Parent.TitlePadding.Bottom - Parent.ContentPadding.Top - Parent.ContentPadding.Bottom - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gets the rectangle of the close button.
|
||||
/// </summary>
|
||||
private Rectangle RectClose
|
||||
{
|
||||
get { return new Rectangle(this.Width - 5 - 16, Parent.HeaderHeight + 3, 16, 16); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the rectangle of the options button.
|
||||
/// </summary>
|
||||
private Rectangle RectOptions
|
||||
{
|
||||
get { return new Rectangle(this.Width - 5 - 16, Parent.HeaderHeight + 3 + 16 + 5, 16, 16); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update form to display hover styles when the mouse moves over the notification form.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PopupNotifierForm_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (Parent.ShowCloseButton)
|
||||
{
|
||||
mouseOnClose = RectClose.Contains(e.X, e.Y);
|
||||
}
|
||||
if (Parent.ShowOptionsButton)
|
||||
{
|
||||
mouseOnOptions = RectOptions.Contains(e.X, e.Y);
|
||||
}
|
||||
mouseOnLink = RectContentText.Contains(e.X, e.Y);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A mouse button has been released, check if something has been clicked.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PopupNotifierForm_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == System.Windows.Forms.MouseButtons.Left)
|
||||
{
|
||||
if (RectClose.Contains(e.X, e.Y) && (CloseClick != null))
|
||||
{
|
||||
CloseClick(this, EventArgs.Empty);
|
||||
}
|
||||
if (RectContentText.Contains(e.X, e.Y) && (LinkClick != null))
|
||||
{
|
||||
LinkClick(this, EventArgs.Empty);
|
||||
}
|
||||
if (RectOptions.Contains(e.X, e.Y) && (Parent.OptionsMenu != null))
|
||||
{
|
||||
if (ContextMenuOpened != null)
|
||||
{
|
||||
ContextMenuOpened(this, EventArgs.Empty);
|
||||
}
|
||||
Parent.OptionsMenu.Show(this, new Point(RectOptions.Right - Parent.OptionsMenu.Width, RectOptions.Bottom));
|
||||
Parent.OptionsMenu.Closed += new ToolStripDropDownClosedEventHandler(OptionsMenu_Closed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The options popup menu has been closed.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OptionsMenu_Closed(object sender, ToolStripDropDownClosedEventArgs e)
|
||||
{
|
||||
Parent.OptionsMenu.Closed -= new ToolStripDropDownClosedEventHandler(OptionsMenu_Closed);
|
||||
|
||||
if (ContextMenuClosed != null)
|
||||
{
|
||||
ContextMenuClosed(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create all GDI objects used to paint the form.
|
||||
/// </summary>
|
||||
private void AllocateGDIObjects()
|
||||
{
|
||||
rcBody = new Rectangle(0, 0, this.Width, this.Height);
|
||||
rcHeader = new Rectangle(0, 0, this.Width, Parent.HeaderHeight);
|
||||
rcForm = new Rectangle(0, 0, this.Width - 1, this.Height - 1);
|
||||
|
||||
brushBody = new LinearGradientBrush(rcBody, Parent.BodyColor, GetLighterColor(Parent.BodyColor), LinearGradientMode.Vertical);
|
||||
brushHeader = new LinearGradientBrush(rcHeader, Parent.HeaderColor, GetDarkerColor(Parent.HeaderColor), LinearGradientMode.Vertical);
|
||||
brushButtonHover = new SolidBrush(Parent.ButtonHoverColor);
|
||||
penButtonBorder = new Pen(Parent.ButtonBorderColor);
|
||||
penContent = new Pen(Parent.ContentColor, 2);
|
||||
penBorder = new Pen(Parent.BorderColor);
|
||||
brushForeColor = new SolidBrush(ForeColor);
|
||||
brushLinkHover = new SolidBrush(Parent.ContentHoverColor);
|
||||
brushContent = new SolidBrush(Parent.ContentColor);
|
||||
brushTitle = new SolidBrush(Parent.TitleColor);
|
||||
|
||||
gdiInitialized = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Free all GDI objects.
|
||||
/// </summary>
|
||||
private void DisposeGDIObjects()
|
||||
{
|
||||
if (gdiInitialized)
|
||||
{
|
||||
brushBody.Dispose();
|
||||
brushHeader.Dispose();
|
||||
brushButtonHover.Dispose();
|
||||
penButtonBorder.Dispose();
|
||||
penContent.Dispose();
|
||||
penBorder.Dispose();
|
||||
brushForeColor.Dispose();
|
||||
brushLinkHover.Dispose();
|
||||
brushContent.Dispose();
|
||||
brushTitle.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw the notification form.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PopupNotifierForm_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (!gdiInitialized)
|
||||
{
|
||||
AllocateGDIObjects();
|
||||
}
|
||||
|
||||
// draw window
|
||||
e.Graphics.FillRectangle(brushBody, rcBody);
|
||||
e.Graphics.FillRectangle(brushHeader, rcHeader);
|
||||
e.Graphics.DrawRectangle(penBorder, rcForm);
|
||||
if (Parent.ShowGrip)
|
||||
{
|
||||
e.Graphics.DrawImage(Properties.Resources.Grip, (int)((this.Width - Properties.Resources.Grip.Width) / 2), (int)((Parent.HeaderHeight - 3) / 2));
|
||||
}
|
||||
if (Parent.ShowCloseButton)
|
||||
{
|
||||
if (mouseOnClose)
|
||||
{
|
||||
e.Graphics.FillRectangle(brushButtonHover, RectClose);
|
||||
e.Graphics.DrawRectangle(penButtonBorder, RectClose);
|
||||
}
|
||||
e.Graphics.DrawLine(penContent, RectClose.Left + 4, RectClose.Top + 4, RectClose.Right - 4, RectClose.Bottom - 4);
|
||||
e.Graphics.DrawLine(penContent, RectClose.Left + 4, RectClose.Bottom - 4, RectClose.Right - 4, RectClose.Top + 4);
|
||||
}
|
||||
if (Parent.ShowOptionsButton)
|
||||
{
|
||||
if (mouseOnOptions)
|
||||
{
|
||||
e.Graphics.FillRectangle(brushButtonHover, RectOptions);
|
||||
e.Graphics.DrawRectangle(penButtonBorder, RectOptions);
|
||||
}
|
||||
e.Graphics.FillPolygon(brushForeColor, new Point[] { new Point(RectOptions.Left + 4, RectOptions.Top + 6), new Point(RectOptions.Left + 12, RectOptions.Top + 6), new Point(RectOptions.Left + 8, RectOptions.Top + 4 + 6) });
|
||||
}
|
||||
|
||||
// draw icon
|
||||
if (Parent.Image != null)
|
||||
{
|
||||
e.Graphics.DrawImage(Parent.Image, Parent.ImagePadding.Left, Parent.HeaderHeight + Parent.ImagePadding.Top, Parent.ImageSize.Width, Parent.ImageSize.Height);
|
||||
}
|
||||
|
||||
|
||||
if (Parent.IsRightToLeft)
|
||||
{
|
||||
heightOfTitle = (int)e.Graphics.MeasureString("A", Parent.TitleFont).Height;
|
||||
|
||||
// the value 30 is because of x close icon
|
||||
int titleX2 = this.Width - 30;// Parent.TitlePadding.Right;
|
||||
|
||||
// draw title right to left
|
||||
StringFormat headerFormat = new StringFormat(StringFormatFlags.DirectionRightToLeft);
|
||||
e.Graphics.DrawString(Parent.TitleText, Parent.TitleFont, brushTitle, titleX2, Parent.HeaderHeight + Parent.TitlePadding.Top, headerFormat);
|
||||
|
||||
// draw content text, optionally with a bold part
|
||||
this.Cursor = mouseOnLink ? Cursors.Hand : Cursors.Default;
|
||||
Brush brushText = mouseOnLink ? brushLinkHover : brushContent;
|
||||
|
||||
// draw content right to left
|
||||
StringFormat contentFormat = new StringFormat(StringFormatFlags.DirectionRightToLeft);
|
||||
e.Graphics.DrawString(Parent.ContentText, Parent.ContentFont, brushText, RectContentText, contentFormat);
|
||||
}
|
||||
else
|
||||
{
|
||||
// calculate height of title
|
||||
heightOfTitle = (int)e.Graphics.MeasureString("A", Parent.TitleFont).Height;
|
||||
int titleX = Parent.TitlePadding.Left;
|
||||
if (Parent.Image != null)
|
||||
titleX += Parent.ImagePadding.Left + Parent.ImageSize.Width + Parent.ImagePadding.Right;
|
||||
e.Graphics.DrawString(Parent.TitleText, Parent.TitleFont, brushTitle, titleX, Parent.HeaderHeight + Parent.TitlePadding.Top);
|
||||
// draw content text, optionally with a bold part
|
||||
this.Cursor = mouseOnLink ? Cursors.Hand : Cursors.Default;
|
||||
Brush brushText = mouseOnLink ? brushLinkHover : brushContent;
|
||||
e.Graphics.DrawString(Parent.ContentText, Parent.ContentFont, brushText, RectContentText);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose GDI objects.
|
||||
/// </summary>
|
||||
/// <param name="disposing"></param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
DisposeGDIObjects();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Tulpep.NotificationWindow")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Tulpep.NotificationWindow")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("718bace5-a97f-4a78-ad50-5730eba79995")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
73
Notification-Popup-Window/Tulpep.NotificationWindow/Properties/Resources.Designer.cs
generated
Normal file
73
Notification-Popup-Window/Tulpep.NotificationWindow/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Tulpep.NotificationWindow.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tulpep.NotificationWindow.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Grip {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Grip", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Grip" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Grip.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{605006EB-D4E6-4312-A293-3A43FAC43240}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Tulpep.NotificationWindow</RootNamespace>
|
||||
<AssemblyName>Tulpep.NotificationWindow</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="PopupNotifier.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PopupNotifierForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Grip.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
40
Notification-Popup-Window/appveyor.yml
Normal file
40
Notification-Popup-Window/appveyor.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
# http://www.appveyor.com/docs/appveyor-yml
|
||||
|
||||
# version format
|
||||
version: 1.1.{build}
|
||||
|
||||
# Fix line endings in Windows. (runs before repo cloning)
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
|
||||
# Build worker image (VM template)
|
||||
image: Visual Studio 2015
|
||||
|
||||
# Assembly Info
|
||||
assembly_info:
|
||||
patch: true
|
||||
file: AssemblyInfo.*
|
||||
assembly_version: "{version}"
|
||||
assembly_file_version: "{version}"
|
||||
assembly_informational_version: "{version}"
|
||||
|
||||
#Build Relase instead of Debug
|
||||
configuration: Release
|
||||
|
||||
artifacts:
|
||||
- path: Tulpep.NotificationWindow\bin\Release\Tulpep.NotificationWindow.dll
|
||||
name: Tulpep.NotificationWindow.dll
|
||||
- path: '**\Tulpep.NotificationWindow*.nupkg'
|
||||
name: Tulpep.NotificationWindow.nupkg
|
||||
|
||||
after_test:
|
||||
- ps: .\Nuget\build.ps1
|
||||
|
||||
#Publish NuGet
|
||||
deploy:
|
||||
provider: NuGet
|
||||
api_key:
|
||||
secure: 5ldn0g+rIeS2ZHbyFJjilj/nCUyUcTTMN1As3uJ3kCtW2QStDsdk4dCiL4G2KvOL
|
||||
artifact: /.*\.nupkg/
|
||||
on:
|
||||
branch: master
|
||||
Reference in New Issue
Block a user