initial commit

main
josch 10 years ago
commit 4aa234faa3

Binary file not shown.

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="Alarm.application" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="Johannes Schauer" asmv2:product="Alarm" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" disallowUrlActivation="true" mapFileExtensions="true" />
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Alarm_1_0_0_1\Alarm.exe.manifest" size="5896">
<assemblyIdentity name="Alarm.exe" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>anBwsko0O/0865JOOhsYdRcq3XA=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>8aw2mUV8V2TZYRwohKMBHJfxfxA=</DigestValue></Reference><Reference URI="#StrongNameKeyInfo"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>u01dmcnpoqyV/4+AOK9ZTo0XYUY=</DigestValue></Reference></SignedInfo><SignatureValue>fUVr2zj6UituWlNq9q9XzmwHuWxsbI0KNXEy8Sm8wUbFlJLHei3J1kBRyVdf+TuEIMch0MvByrpCfrjRVt/SwhAo+uMw1dALD4m74EIWqUClq2Gdv81FrD6QsG+LXM/SfLCo5DzJqt8i7B6owpx63bORWiPTGZjttj59zfGGq10=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="433895e44c19b7aa6e87d0c0c5c56fb52979dfec" Description="" Url=""><as:assemblyIdentity name="Alarm.application" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=JOSCH\Johannes</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>AK7/2rU5vEQDqQWoMGeF/kfb0Y4=</DigestValue></Reference></SignedInfo><SignatureValue>kNgY84B1BhOLqArQyfBkUFAoEdZyg73es4p0QnD7bro+Bb8v70HV5aZq5ql0spCPFad4ktGERznyPYSMvzcm2xI9fUjhvLAJQFyun8m1ogok/CT2ySqeeHmQomT6FWG6T9V8IaVO0Nrz4ijIS3I77n+vsw9Ixs2fIUSOsl9zuD8=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIByDCCATWgAwIBAgIPkfW6s5NHgUS/2MKUwgu7MAkGBSsOAwIdBQAwJzElMCMGA1UEAx4cAEoATwBTAEMASABcAEoAbwBoAGEAbgBuAGUAczAeFw0wNTA2MTMwNTEyMTBaFw0wNjA2MTMxMTEyMTBaMCcxJTAjBgNVBAMeHABKAE8AUwBDAEgAXABKAG8AaABhAG4AbgBlAHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANXp8MgMMhA5HmXq21GZMpG7rnQP+ybh4lo01VNaxIc2o8jXitpKbxOgI+Has+XXHaVNpfLPxFo3I4RmOVrqw871DcCDPaaRLyiXXPBtb6AFeRIuHPoYM400XWTzj/QP217aH2VucaMO3NQLgHd5nzxu0oc1BOqlJzaAVXRqQX7LAgMBAAEwCQYFKw4DAh0FAAOBgQAOzqcUn7hKBv22lxwYlsNpyEHEK4aAbrJPNTjSVNVdWp7bBDAzVS/BeDwAKQuY6EoiFNxea51NgdrqQGvVvRbIWPIzTCWmTVho3/rOXJBOwXpThPRhVufuDY8pDl8IrzqtQoiEQKF0mxbEGfIMgx9N/QB63K5S5T4Ly31WHLwh2w==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>

@ -0,0 +1,16 @@
<Combine fileversion="1.0" name="Alarm" description="">
<StartMode startupentry="Alarm" single="True">
<Execute entry="Alarm" type="None" />
</StartMode>
<Entries>
<Entry filename=".\.\Alarm.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="Alarm" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="Alarm" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

@ -0,0 +1,30 @@
<Project name="Alarm" standardNamespace="Alarm" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\MainForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Alarm.MainForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
<File name=".\MainForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
</Contents>
<References>
<Reference type="Gac" refto="Microsoft.DirectX, Version=1.0.900.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" localcopy="True" />
<Reference type="Gac" refto="Microsoft.DirectX.DirectSound, Version=1.0.900.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" localcopy="True" />
</References>
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="Alarm" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Debug">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="Alarm" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Release" assembly="Alarm" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Alarm", "Alarm1\Alarm.csproj", "{37718BC4-94E0-4794-97EB-A9C405EBB2F4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{37718BC4-94E0-4794-97EB-A9C405EBB2F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37718BC4-94E0-4794-97EB-A9C405EBB2F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37718BC4-94E0-4794-97EB-A9C405EBB2F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37718BC4-94E0-4794-97EB-A9C405EBB2F4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

@ -0,0 +1,100 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{37718BC4-94E0-4794-97EB-A9C405EBB2F4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Alarm</RootNamespace>
<AssemblyName>Alarm</AssemblyName>
<GenerateManifests>true</GenerateManifests>
<SignManifests>true</SignManifests>
<ManifestCertificateThumbprint>569AACBBB3CC69D6F9BAE101989E2E2CD7D8FE21</ManifestCertificateThumbprint>
<ManifestKeyFile>Alarm1_TemporaryKey.pfx</ManifestKeyFile>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>E:\Quelltexte\Alarm\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<TargetCulture>de-DE</TargetCulture>
<ProductName>Alarm</ProductName>
<PublisherName>Johannes Schauer</PublisherName>
<CreateWebPageOnPublish>false</CreateWebPageOnPublish>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<DisallowUrlActivation>true</DisallowUrlActivation>
<ApplicationVersion>1.0.0.*</ApplicationVersion>
<BootstrapperEnabled>true</BootstrapperEnabled>
</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>
</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>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<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>
</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>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<InProject>False</InProject>
<ProductName>.NET Framework 2.0 Beta</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,17 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastOpenVersion>8.0.50215</LastOpenVersion>
<PublishUrlHistory>E:\Quelltexte\Alarm\</PublishUrlHistory>
<InstallUrlHistory>
</InstallUrlHistory>
<SupportUrlHistory>
</SupportUrlHistory>
<UpdateUrlHistory>
</UpdateUrlHistory>
<BootstrapperUrlHistory>
</BootstrapperUrlHistory>
<ApplicationRevision>2</ApplicationRevision>
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>true</VerifyUploadedFiles>
</PropertyGroup>
</Project>

@ -0,0 +1,141 @@
namespace Alarm
{
partial class Alarm
{
/// <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.btnStop = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tbWeckzeit = new System.Windows.Forms.TextBox();
this.cbAktivieren = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
this.lUhrzeit = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// btnStop
//
this.btnStop.BackColor = System.Drawing.SystemColors.Control;
this.btnStop.Dock = System.Windows.Forms.DockStyle.Bottom;
this.btnStop.Enabled = false;
this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop.Font = new System.Drawing.Font("Verdana", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnStop.Location = new System.Drawing.Point(0, 131);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(341, 40);
this.btnStop.TabIndex = 0;
this.btnStop.Text = "STOP";
this.btnStop.UseVisualStyleBackColor = false;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// tbWeckzeit
//
this.tbWeckzeit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbWeckzeit.Font = new System.Drawing.Font("Verdana", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tbWeckzeit.Location = new System.Drawing.Point(180, 4);
this.tbWeckzeit.Name = "tbWeckzeit";
this.tbWeckzeit.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.tbWeckzeit.Size = new System.Drawing.Size(75, 33);
this.tbWeckzeit.TabIndex = 2;
this.tbWeckzeit.Text = "6:00";
this.tbWeckzeit.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.tbWeckzeit.TextChanged += new System.EventHandler(this.tbWeckzeit_TextChanged);
//
// cbAktivieren
//
this.cbAktivieren.AutoSize = true;
this.cbAktivieren.BackColor = System.Drawing.SystemColors.Control;
this.cbAktivieren.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbAktivieren.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbAktivieren.Location = new System.Drawing.Point(85, 12);
this.cbAktivieren.Name = "cbAktivieren";
this.cbAktivieren.Size = new System.Drawing.Size(89, 20);
this.cbAktivieren.TabIndex = 3;
this.cbAktivieren.Text = "Aktivieren";
this.cbAktivieren.UseVisualStyleBackColor = false;
//
// panel1
//
this.panel1.Controls.Add(this.cbAktivieren);
this.panel1.Controls.Add(this.tbWeckzeit);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(341, 40);
this.panel1.TabIndex = 5;
//
// lUhrzeit
//
this.lUhrzeit.Dock = System.Windows.Forms.DockStyle.Fill;
this.lUhrzeit.Font = new System.Drawing.Font("Verdana", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lUhrzeit.Location = new System.Drawing.Point(0, 40);
this.lUhrzeit.Name = "lUhrzeit";
this.lUhrzeit.Size = new System.Drawing.Size(341, 91);
this.lUhrzeit.TabIndex = 6;
this.lUhrzeit.Text = "00:00:00";
this.lUhrzeit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Alarm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(341, 171);
this.Controls.Add(this.lUhrzeit);
this.Controls.Add(this.panel1);
this.Controls.Add(this.btnStop);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Location = new System.Drawing.Point(1300, 0);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Alarm";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Alarm";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TextBox tbWeckzeit;
private System.Windows.Forms.CheckBox cbAktivieren;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label lUhrzeit;
}
}

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Media;
namespace Alarm
{
public partial class Alarm : Form
{
private SoundPlayer sp = null;
public Alarm()
{
InitializeComponent();
sp = new SoundPlayer("c:\\Windows\\Media\\ringin.wav");
}
private void btnStop_Click(object sender, EventArgs e)
{
sp.Stop();
btnStop.Enabled = false;
}
private void timer1_Tick(object sender, EventArgs e)
{
lUhrzeit.Text = DateTime.Now.ToLongTimeString();
if (cbAktivieren.Checked)
{
if (DateTime.Parse(lUhrzeit.Text) == DateTime.Parse(tbWeckzeit.Text))
{
sp.PlayLooping();
btnStop.Enabled = true;
}
}
}
private void tbWeckzeit_TextChanged(object sender, EventArgs e)
{
cbAktivieren.Checked = false;
}
}
}

@ -0,0 +1,123 @@
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

@ -0,0 +1,33 @@
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("Alarm")]
[assembly: AssemblyDescription("Ein doller Wecker")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Alarm")]
[assembly: AssemblyCopyright("Copyright © 2005 Johannes Schauer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM componenets. 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("3b8d7539-133e-4454-901d-aa79a75ebc92")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,74 @@
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version:2.0.50215.44
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Alarm.Properties.Resources.get_ResourceManager():System.Resources.ResourceManager")]
[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Alarm.Properties.Resources.get_Culture():System.Globalization.CultureInfo")]
[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Alarm.Properties.Resources.set_Culture(System.Globalization.CultureInfo):Void")]
namespace Alarm.Properties
{
/// <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.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(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Alarm.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(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,31 @@
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version:2.0.50215.44
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Alarm.Properties.Settings.get_Default():Alarm.Properties.Settings")]
namespace Alarm.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = 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>

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace Alarm
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Alarm());
}
}
}

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="Alarm.application" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="Johannes Schauer" asmv2:product="Alarm" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" disallowUrlActivation="true" mapFileExtensions="true" />
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Alarm_1_0_0_1\Alarm.exe.manifest" size="5896">
<assemblyIdentity name="Alarm.exe" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>anBwsko0O/0865JOOhsYdRcq3XA=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>8aw2mUV8V2TZYRwohKMBHJfxfxA=</DigestValue></Reference><Reference URI="#StrongNameKeyInfo"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>u01dmcnpoqyV/4+AOK9ZTo0XYUY=</DigestValue></Reference></SignedInfo><SignatureValue>fUVr2zj6UituWlNq9q9XzmwHuWxsbI0KNXEy8Sm8wUbFlJLHei3J1kBRyVdf+TuEIMch0MvByrpCfrjRVt/SwhAo+uMw1dALD4m74EIWqUClq2Gdv81FrD6QsG+LXM/SfLCo5DzJqt8i7B6owpx63bORWiPTGZjttj59zfGGq10=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="433895e44c19b7aa6e87d0c0c5c56fb52979dfec" Description="" Url=""><as:assemblyIdentity name="Alarm.application" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=JOSCH\Johannes</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>AK7/2rU5vEQDqQWoMGeF/kfb0Y4=</DigestValue></Reference></SignedInfo><SignatureValue>kNgY84B1BhOLqArQyfBkUFAoEdZyg73es4p0QnD7bro+Bb8v70HV5aZq5ql0spCPFad4ktGERznyPYSMvzcm2xI9fUjhvLAJQFyun8m1ogok/CT2ySqeeHmQomT6FWG6T9V8IaVO0Nrz4ijIS3I77n+vsw9Ixs2fIUSOsl9zuD8=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIByDCCATWgAwIBAgIPkfW6s5NHgUS/2MKUwgu7MAkGBSsOAwIdBQAwJzElMCMGA1UEAx4cAEoATwBTAEMASABcAEoAbwBoAGEAbgBuAGUAczAeFw0wNTA2MTMwNTEyMTBaFw0wNjA2MTMxMTEyMTBaMCcxJTAjBgNVBAMeHABKAE8AUwBDAEgAXABKAG8AaABhAG4AbgBlAHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANXp8MgMMhA5HmXq21GZMpG7rnQP+ybh4lo01VNaxIc2o8jXitpKbxOgI+Has+XXHaVNpfLPxFo3I4RmOVrqw871DcCDPaaRLyiXXPBtb6AFeRIuHPoYM400XWTzj/QP217aH2VucaMO3NQLgHd5nzxu0oc1BOqlJzaAVXRqQX7LAgMBAAEwCQYFKw4DAh0FAAOBgQAOzqcUn7hKBv22lxwYlsNpyEHEK4aAbrJPNTjSVNVdWp7bBDAzVS/BeDwAKQuY6EoiFNxea51NgdrqQGvVvRbIWPIzTCWmTVho3/rOXJBOwXpThPRhVufuDY8pDl8IrzqtQoiEQKF0mxbEGfIMgx9N/QB63K5S5T4Ly31WHLwh2w==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<asmv1:assemblyIdentity name="Alarm.exe" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" type="win32" />
<application />
<entryPoint>
<assemblyIdentity name="Alarm" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<commandLine file="Alarm.exe" parameters="" />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="4" minorVersion="10" buildNumber="0" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50215.44" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Alarm.exe" size="20480">
<assemblyIdentity name="Alarm" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>zM+O0bCNAVt4OinNklbbMEzPNj4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>LJI8Dc2QpFBEgvXtV742wxMbalA=</DigestValue></Reference><Reference URI="#StrongNameKeyInfo"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>nOcrao6FcsiG68ovNbjy6+IeDm8=</DigestValue></Reference></SignedInfo><SignatureValue>iWvicaG4pbkpvP6qFzDgJbly4vKUVVJ0OjQsY/0OdzOIVXn6Rm7z8Mg6J4u5Gn8FuoEjbnyF7Ld6Aq0Tf52OJqVsII/MZQehBza3Tqt4s+N46F88+AtN4KYangHHcE9loTEmP7UWZ5sBihrane8l3h65MToJCUMP7sGhlfHuoa4=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="359354a089b58594edc8239b9a502f379202a666" Description="" Url=""><as:assemblyIdentity name="Alarm.exe" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" type="win32" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=JOSCH\Johannes</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>zdgXXObILvdfcpJj7oVd8JSkf90=</DigestValue></Reference></SignedInfo><SignatureValue>UUuVn9lBSI51qKv7pFU7w94r6dV0YcflimAg9Ako9yH/bonby7OORC35FItSvqgXITbyYi1bsa5SrHMyMSlpOvFMvYDjqEoFoOuR14MnldkjgbEfPWUKkORs95pxy4dpBZJ+XoDq2qjdvA4WpZwHwOgTgcBC3015cS9cOqKrRXA=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIByDCCATWgAwIBAgIPkfW6s5NHgUS/2MKUwgu7MAkGBSsOAwIdBQAwJzElMCMGA1UEAx4cAEoATwBTAEMASABcAEoAbwBoAGEAbgBuAGUAczAeFw0wNTA2MTMwNTEyMTBaFw0wNjA2MTMxMTEyMTBaMCcxJTAjBgNVBAMeHABKAE8AUwBDAEgAXABKAG8AaABhAG4AbgBlAHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANXp8MgMMhA5HmXq21GZMpG7rnQP+ybh4lo01VNaxIc2o8jXitpKbxOgI+Has+XXHaVNpfLPxFo3I4RmOVrqw871DcCDPaaRLyiXXPBtb6AFeRIuHPoYM400XWTzj/QP217aH2VucaMO3NQLgHd5nzxu0oc1BOqlJzaAVXRqQX7LAgMBAAEwCQYFKw4DAh0FAAOBgQAOzqcUn7hKBv22lxwYlsNpyEHEK4aAbrJPNTjSVNVdWp7bBDAzVS/BeDwAKQuY6EoiFNxea51NgdrqQGvVvRbIWPIzTCWmTVho3/rOXJBOwXpThPRhVufuDY8pDl8IrzqtQoiEQKF0mxbEGfIMgx9N/QB63K5S5T4Ly31WHLwh2w==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="Alarm.application" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="Johannes Schauer" asmv2:product="Alarm" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" disallowUrlActivation="true" mapFileExtensions="true" />
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Alarm_1_0_0_1\Alarm.exe.manifest" size="5896">
<assemblyIdentity name="Alarm.exe" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>anBwsko0O/0865JOOhsYdRcq3XA=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>8aw2mUV8V2TZYRwohKMBHJfxfxA=</DigestValue></Reference><Reference URI="#StrongNameKeyInfo"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>u01dmcnpoqyV/4+AOK9ZTo0XYUY=</DigestValue></Reference></SignedInfo><SignatureValue>fUVr2zj6UituWlNq9q9XzmwHuWxsbI0KNXEy8Sm8wUbFlJLHei3J1kBRyVdf+TuEIMch0MvByrpCfrjRVt/SwhAo+uMw1dALD4m74EIWqUClq2Gdv81FrD6QsG+LXM/SfLCo5DzJqt8i7B6owpx63bORWiPTGZjttj59zfGGq10=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="433895e44c19b7aa6e87d0c0c5c56fb52979dfec" Description="" Url=""><as:assemblyIdentity name="Alarm.application" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=JOSCH\Johannes</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>AK7/2rU5vEQDqQWoMGeF/kfb0Y4=</DigestValue></Reference></SignedInfo><SignatureValue>kNgY84B1BhOLqArQyfBkUFAoEdZyg73es4p0QnD7bro+Bb8v70HV5aZq5ql0spCPFad4ktGERznyPYSMvzcm2xI9fUjhvLAJQFyun8m1ogok/CT2ySqeeHmQomT6FWG6T9V8IaVO0Nrz4ijIS3I77n+vsw9Ixs2fIUSOsl9zuD8=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIByDCCATWgAwIBAgIPkfW6s5NHgUS/2MKUwgu7MAkGBSsOAwIdBQAwJzElMCMGA1UEAx4cAEoATwBTAEMASABcAEoAbwBoAGEAbgBuAGUAczAeFw0wNTA2MTMwNTEyMTBaFw0wNjA2MTMxMTEyMTBaMCcxJTAjBgNVBAMeHABKAE8AUwBDAEgAXABKAG8AaABhAG4AbgBlAHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANXp8MgMMhA5HmXq21GZMpG7rnQP+ybh4lo01VNaxIc2o8jXitpKbxOgI+Has+XXHaVNpfLPxFo3I4RmOVrqw871DcCDPaaRLyiXXPBtb6AFeRIuHPoYM400XWTzj/QP217aH2VucaMO3NQLgHd5nzxu0oc1BOqlJzaAVXRqQX7LAgMBAAEwCQYFKw4DAh0FAAOBgQAOzqcUn7hKBv22lxwYlsNpyEHEK4aAbrJPNTjSVNVdWp7bBDAzVS/BeDwAKQuY6EoiFNxea51NgdrqQGvVvRbIWPIzTCWmTVho3/rOXJBOwXpThPRhVufuDY8pDl8IrzqtQoiEQKF0mxbEGfIMgx9N/QB63K5S5T4Ly31WHLwh2w==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<asmv1:assemblyIdentity name="Alarm.exe" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" type="win32" />
<application />
<entryPoint>
<assemblyIdentity name="Alarm" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<commandLine file="Alarm.exe" parameters="" />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="4" minorVersion="10" buildNumber="0" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50215.44" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Alarm.exe" size="20480">
<assemblyIdentity name="Alarm" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>zM+O0bCNAVt4OinNklbbMEzPNj4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>LJI8Dc2QpFBEgvXtV742wxMbalA=</DigestValue></Reference><Reference URI="#StrongNameKeyInfo"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>nOcrao6FcsiG68ovNbjy6+IeDm8=</DigestValue></Reference></SignedInfo><SignatureValue>iWvicaG4pbkpvP6qFzDgJbly4vKUVVJ0OjQsY/0OdzOIVXn6Rm7z8Mg6J4u5Gn8FuoEjbnyF7Ld6Aq0Tf52OJqVsII/MZQehBza3Tqt4s+N46F88+AtN4KYangHHcE9loTEmP7UWZ5sBihrane8l3h65MToJCUMP7sGhlfHuoa4=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="359354a089b58594edc8239b9a502f379202a666" Description="" Url=""><as:assemblyIdentity name="Alarm.exe" version="1.0.0.1" publicKeyToken="eb5f363358024623" language="de-DE" processorArchitecture="msil" type="win32" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=JOSCH\Johannes</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>zdgXXObILvdfcpJj7oVd8JSkf90=</DigestValue></Reference></SignedInfo><SignatureValue>UUuVn9lBSI51qKv7pFU7w94r6dV0YcflimAg9Ako9yH/bonby7OORC35FItSvqgXITbyYi1bsa5SrHMyMSlpOvFMvYDjqEoFoOuR14MnldkjgbEfPWUKkORs95pxy4dpBZJ+XoDq2qjdvA4WpZwHwOgTgcBC3015cS9cOqKrRXA=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>1enwyAwyEDkeZerbUZkykbuudA/7JuHiWjTVU1rEhzajyNeK2kpvE6Aj4dqz5dcdpU2l8s/EWjcjhGY5WurDzvUNwIM9ppEvKJdc8G1voAV5Ei4c+hgzjTRdZPOP9A/bXtofZW5xow7c1AuAd3mfPG7ShzUE6qUnNoBVdGpBfss=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIByDCCATWgAwIBAgIPkfW6s5NHgUS/2MKUwgu7MAkGBSsOAwIdBQAwJzElMCMGA1UEAx4cAEoATwBTAEMASABcAEoAbwBoAGEAbgBuAGUAczAeFw0wNTA2MTMwNTEyMTBaFw0wNjA2MTMxMTEyMTBaMCcxJTAjBgNVBAMeHABKAE8AUwBDAEgAXABKAG8AaABhAG4AbgBlAHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANXp8MgMMhA5HmXq21GZMpG7rnQP+ybh4lo01VNaxIc2o8jXitpKbxOgI+Has+XXHaVNpfLPxFo3I4RmOVrqw871DcCDPaaRLyiXXPBtb6AFeRIuHPoYM400XWTzj/QP217aH2VucaMO3NQLgHd5nzxu0oc1BOqlJzaAVXRqQX7LAgMBAAEwCQYFKw4DAh0FAAOBgQAOzqcUn7hKBv22lxwYlsNpyEHEK4aAbrJPNTjSVNVdWp7bBDAzVS/BeDwAKQuY6EoiFNxea51NgdrqQGvVvRbIWPIzTCWmTVho3/rOXJBOwXpThPRhVufuDY8pDl8IrzqtQoiEQKF0mxbEGfIMgx9N/QB63K5S5T4Ly31WHLwh2w==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>

@ -0,0 +1,32 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

@ -0,0 +1,211 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectSound;
using Buffer = Microsoft.DirectX.DirectSound.SecondaryBuffer;
public class MainForm : Form
{
private System.ComponentModel.Container components = null;
private Button btnSoundfile;
private Label lblFilename;
private CheckBox cbLoopCheck;
private Button btnPlay;
private Button btnStop;
private Button btnCancel;
private SecondaryBuffer ApplicationBuffer = null;
private Device ApplicationDevice = null;
private string PathSoundFile = string.Empty;
public static int Main(string[] Args)
{
Application.Run(new MainForm());
return 0;
}
protected override void Dispose( bool disposing )
{
if(disposing)
{
if (null != components)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
public MainForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
}
#region InitializeComponent code
private void InitializeComponent()
{
this.btnSoundfile = new System.Windows.Forms.Button();
this.lblFilename = new System.Windows.Forms.Label();
this.cbLoopCheck = new System.Windows.Forms.CheckBox();
this.btnPlay = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnSoundfile
//
this.btnSoundfile.Location = new System.Drawing.Point(10, 11);
this.btnSoundfile.Name = "btnSoundfile";
this.btnSoundfile.Size = new System.Drawing.Size(69, 21);
this.btnSoundfile.TabIndex = 0;
this.btnSoundfile.Text = "Sound &file...";
this.btnSoundfile.Click += new System.EventHandler(this.btnSoundfile_Click);
//
// lblFilename
//
this.lblFilename.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lblFilename.Location = new System.Drawing.Point(94, 11);
this.lblFilename.Name = "lblFilename";
this.lblFilename.Size = new System.Drawing.Size(345, 21);
this.lblFilename.TabIndex = 1;
this.lblFilename.Text = "No file loaded.";
this.lblFilename.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// cbLoopCheck
//
this.cbLoopCheck.Enabled = false;
this.cbLoopCheck.Location = new System.Drawing.Point(9, 44);
this.cbLoopCheck.Name = "cbLoopCheck";
this.cbLoopCheck.Size = new System.Drawing.Size(87, 16);
this.cbLoopCheck.TabIndex = 2;
this.cbLoopCheck.Text = "&Loop sound";
//
// btnPlay
//
this.btnPlay.Enabled = false;
this.btnPlay.Location = new System.Drawing.Point(104, 48);
this.btnPlay.Name = "btnPlay";
this.btnPlay.TabIndex = 3;
this.btnPlay.Text = "&Play";
this.btnPlay.Click += new System.EventHandler(this.btnPlay_Click);
//
// btnStop
//
this.btnStop.Enabled = false;
this.btnStop.Location = new System.Drawing.Point(176, 48);
this.btnStop.Name = "btnStop";
this.btnStop.TabIndex = 4;
this.btnStop.Text = "&Stop";
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(364, 48);
this.btnCancel.Name = "btnCancel";
this.btnCancel.TabIndex = 5;
this.btnCancel.Text = "E&xit";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// MainForm
//
this.AcceptButton = this.btnSoundfile;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(450, 77);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btnSoundfile,
this.lblFilename,
this.cbLoopCheck,
this.btnPlay,
this.btnStop,
this.btnCancel});
this.Name = "MainForm";
this.Text = "PlaySound";
this.Load += new System.EventHandler(this.MainForm_Load);
this.ResumeLayout(false);
}
#endregion
private void btnCancel_Click(object sender, System.EventArgs e)
{
Close();
}
private void btnStop_Click(object sender, System.EventArgs e)
{
if(null != ApplicationBuffer)
ApplicationBuffer.Stop();
}
private void btnSoundfile_Click(object sender, System.EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
// if(string.Empty == PathSoundFile)
// PathSoundFile = DXUtil.SdkMediaPath;
ofd.InitialDirectory = PathSoundFile;
ofd.Filter= "Wave files(*.wav)|*.wav";
if( DialogResult.Cancel == ofd.ShowDialog() )
return;
if(LoadSoundFile(ofd.FileName))
{
PathSoundFile = Path.GetDirectoryName(ofd.FileName);
lblFilename.Text = Path.GetFileName(ofd.FileName);
EnablePlayUI(true);
}
else
{
lblFilename.Text = "No file loaded.";
EnablePlayUI(false);
}
}
private bool LoadSoundFile(string name)
{
try
{
ApplicationBuffer = new SecondaryBuffer(name, ApplicationDevice);
}
catch(SoundException)
{
return false;
}
return true;
}
private void EnablePlayUI(bool enable)
{
if (enable)
{
cbLoopCheck.Enabled = true;
btnCancel.Enabled = true;
btnPlay.Enabled = true;
btnStop.Enabled = true;
}
else
{
cbLoopCheck.Enabled = false;
btnCancel.Enabled = false;
btnPlay.Enabled = false;
btnStop.Enabled = false;
}
}
private void MainForm_Load(object sender, System.EventArgs e)
{
ApplicationDevice = new Device();
ApplicationDevice.SetCooperativeLevel(this, CooperativeLevel.Priority);
}
private void btnPlay_Click(object sender, System.EventArgs e)
{
if(null != ApplicationBuffer)
ApplicationBuffer.Play(0, (cbLoopCheck.Checked ? BufferPlayFlags.Looping : BufferPlayFlags.Default));
}
}

Binary file not shown.

Binary file not shown.

@ -0,0 +1,32 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

@ -0,0 +1,16 @@
<Combine fileversion="1.0" name="BitrateCalc" description="">
<StartMode startupentry="BitrateCalc" single="True">
<Execute entry="BitrateCalc" type="None" />
</StartMode>
<Entries>
<Entry filename=".\.\BitrateCalc.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="BitrateCalc" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="BitrateCalc" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

@ -0,0 +1,26 @@
<Project name="BitrateCalc" standardNamespace="BitrateCalc" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\MainForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\BitrateCalc.MainForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
</Contents>
<References />
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="BitrateCalc" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Debug">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="BitrateCalc" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Release" assembly="BitrateCalc" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

@ -0,0 +1,289 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 28.03.2005
* Time: 13:40
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace BitrateCalc
{
/// <summary>
/// Description of MainForm.
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox tbAudioBitratekBits;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lVideoBitratekBits;
private System.Windows.Forms.Label lAudioSizeMB;
private System.Windows.Forms.TextBox tbLenghtmin;
private System.Windows.Forms.Label lLenghtsec;
private System.Windows.Forms.TextBox tbFilesizeMB;
private System.Windows.Forms.Label lVideoSizeMB;
private System.Windows.Forms.Label lFilesizeByte;
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm());
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
this.lFilesizeByte = new System.Windows.Forms.Label();
this.lVideoSizeMB = new System.Windows.Forms.Label();
this.tbFilesizeMB = new System.Windows.Forms.TextBox();
this.lLenghtsec = new System.Windows.Forms.Label();
this.tbLenghtmin = new System.Windows.Forms.TextBox();
this.lAudioSizeMB = new System.Windows.Forms.Label();
this.lVideoBitratekBits = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.tbAudioBitratekBits = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lFilesizeByte
//
this.lFilesizeByte.Location = new System.Drawing.Point(304, 40);
this.lFilesizeByte.Name = "lFilesizeByte";
this.lFilesizeByte.Size = new System.Drawing.Size(136, 23);
this.lFilesizeByte.TabIndex = 10;
this.lFilesizeByte.Text = "(- byte)";
this.lFilesizeByte.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lVideoSizeMB
//
this.lVideoSizeMB.Location = new System.Drawing.Point(192, 144);
this.lVideoSizeMB.Name = "lVideoSizeMB";
this.lVideoSizeMB.Size = new System.Drawing.Size(152, 24);
this.lVideoSizeMB.TabIndex = 12;
this.lVideoSizeMB.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tbFilesizeMB
//
this.tbFilesizeMB.Location = new System.Drawing.Point(192, 40);
this.tbFilesizeMB.Name = "tbFilesizeMB";
this.tbFilesizeMB.TabIndex = 3;
this.tbFilesizeMB.Text = "";
this.tbFilesizeMB.TextChanged += new System.EventHandler(this.TbFilesizeTextChanged);
//
// lLenghtsec
//
this.lLenghtsec.Location = new System.Drawing.Point(304, 8);
this.lLenghtsec.Name = "lLenghtsec";
this.lLenghtsec.Size = new System.Drawing.Size(136, 23);
this.lLenghtsec.TabIndex = 9;
this.lLenghtsec.Text = "(- sek)";
this.lLenghtsec.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tbLenghtmin
//
this.tbLenghtmin.Location = new System.Drawing.Point(192, 8);
this.tbLenghtmin.Name = "tbLenghtmin";
this.tbLenghtmin.TabIndex = 1;
this.tbLenghtmin.Text = "";
this.tbLenghtmin.TextChanged += new System.EventHandler(this.TbLenghtminTextChanged);
//
// lAudioSizeMB
//
this.lAudioSizeMB.Location = new System.Drawing.Point(192, 112);
this.lAudioSizeMB.Name = "lAudioSizeMB";
this.lAudioSizeMB.Size = new System.Drawing.Size(152, 24);
this.lAudioSizeMB.TabIndex = 11;
this.lAudioSizeMB.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lVideoBitratekBits
//
this.lVideoBitratekBits.Location = new System.Drawing.Point(192, 176);
this.lVideoBitratekBits.Name = "lVideoBitratekBits";
this.lVideoBitratekBits.Size = new System.Drawing.Size(152, 24);
this.lVideoBitratekBits.TabIndex = 13;
this.lVideoBitratekBits.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label3
//
this.label3.Location = new System.Drawing.Point(8, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(184, 24);
this.label3.TabIndex = 4;
this.label3.Text = "Bitrate des Audiostreams in kBit/s:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// tbAudioBitratekBits
//
this.tbAudioBitratekBits.Location = new System.Drawing.Point(192, 72);
this.tbAudioBitratekBits.Name = "tbAudioBitratekBits";
this.tbAudioBitratekBits.TabIndex = 5;
this.tbAudioBitratekBits.Text = "128";
this.tbAudioBitratekBits.TextChanged += new System.EventHandler(this.TbAudioBitratekBitsTextChanged);
//
// label5
//
this.label5.Location = new System.Drawing.Point(8, 144);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(184, 24);
this.label5.TabIndex = 7;
this.label5.Text = "Größe des Videostreams in MB:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label6
//
this.label6.Location = new System.Drawing.Point(8, 176);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(184, 24);
this.label6.TabIndex = 8;
this.label6.Text = "Bitrate des Videostreams in kBit/s:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label1
//
this.label1.Location = new System.Drawing.Point(48, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(144, 24);
this.label1.TabIndex = 0;
this.label1.Text = "Länge des Films in Minuten:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label2
//
this.label2.Location = new System.Drawing.Point(56, 40);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(136, 24);
this.label2.TabIndex = 2;
this.label2.Text = "Zielgröße in MB:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 112);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(184, 24);
this.label4.TabIndex = 6;
this.label4.Text = "Größe des Audiostreams in MB:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// BitrateCalc
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(448, 205);
this.Controls.Add(this.lVideoBitratekBits);
this.Controls.Add(this.lVideoSizeMB);
this.Controls.Add(this.lAudioSizeMB);
this.Controls.Add(this.lFilesizeByte);
this.Controls.Add(this.lLenghtsec);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.tbAudioBitratekBits);
this.Controls.Add(this.label3);
this.Controls.Add(this.tbFilesizeMB);
this.Controls.Add(this.label2);
this.Controls.Add(this.tbLenghtmin);
this.Controls.Add(this.label1);
this.Name = "BitrateCalc";
this.Text = "BitrateCalc";
this.ResumeLayout(false);
}
#endregion
void TbLenghtminTextChanged(object sender, System.EventArgs e)
{
if(tbLenghtmin.Text!="")
{
lLenghtsec.Text = "("+Convert.ToString(Convert.ToDecimal(tbLenghtmin.Text)*60)+" sek)";
CalculateAudioStream();
CalculateVideoStream();
CalculateVideoBitrate();
} else {
lLenghtsec.Text = "(- sek)";
lAudioSizeMB.Text = "";
lVideoSizeMB.Text = "";
lVideoBitratekBits.Text = "";
}
}
void TbFilesizeTextChanged(object sender, System.EventArgs e)
{
if(tbFilesizeMB.Text!="")
{
lFilesizeByte.Text = "("+Convert.ToString(Convert.ToDecimal(tbFilesizeMB.Text)*1048576)+" byte)";
CalculateAudioStream();
CalculateVideoStream();
CalculateVideoBitrate();
} else {
lFilesizeByte.Text = "(- byte)";
lAudioSizeMB.Text = "";
lVideoSizeMB.Text = "";
lVideoBitratekBits.Text = "";
}
}
void TbAudioBitratekBitsTextChanged(object sender, System.EventArgs e)
{
if(tbAudioBitratekBits.Text!="")
{
CalculateAudioStream();
CalculateVideoStream();
CalculateVideoBitrate();
} else {
lAudioSizeMB.Text = "";
lVideoSizeMB.Text = "";
lVideoBitratekBits.Text = "";
}
}
void CalculateAudioStream()
{
if(tbAudioBitratekBits.Text!=""&&tbLenghtmin.Text!="")
{
lAudioSizeMB.Text = Convert.ToString(Math.Round(Convert.ToDouble(tbLenghtmin.Text)*Convert.ToDouble(tbAudioBitratekBits.Text)*0.007152557373046875, 2))+" ("+Convert.ToString(Math.Round(Convert.ToDouble(tbLenghtmin.Text)*Convert.ToDouble(tbAudioBitratekBits.Text)*7500))+" byte)";
}
}
void CalculateVideoStream()
{
if(tbAudioBitratekBits.Text!=""&&tbLenghtmin.Text!=""&&tbFilesizeMB.Text!="")
{
lVideoSizeMB.Text = Convert.ToString(Math.Round(Convert.ToDouble(tbFilesizeMB.Text)-Convert.ToDouble(tbLenghtmin.Text)*Convert.ToDouble(tbAudioBitratekBits.Text)*0.007152557373046875, 2))+" ("+Convert.ToString(Math.Round(Convert.ToDouble(tbFilesizeMB.Text)*1048576-Convert.ToDouble(tbLenghtmin.Text)*Convert.ToDouble(tbAudioBitratekBits.Text)*7500))+" byte)";
}
}
void CalculateVideoBitrate()
{
if(tbAudioBitratekBits.Text!=""&&tbLenghtmin.Text!=""&&tbFilesizeMB.Text!="")
{
lVideoBitratekBits.Text = Convert.ToString(Math.Round((Convert.ToDouble(tbFilesizeMB.Text)*8388.608-Convert.ToDouble(tbLenghtmin.Text)*Convert.ToDouble(tbAudioBitratekBits.Text)*60)/(Convert.ToDouble(tbLenghtmin.Text)*60)));
}
}
}
}

@ -0,0 +1,32 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

@ -0,0 +1,16 @@
<Combine fileversion="1.0" name="C# Viewer" description="">
<StartMode startupentry="C# Viewer" single="True">
<Execute entry="C# Viewer" type="None" />
</StartMode>
<Entries>
<Entry filename=".\C# Viewer.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="C# Viewer" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="C# Viewer" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

@ -0,0 +1,26 @@
<Project name="C# Viewer" standardNamespace="C__Viewer" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\MainForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\C__Viewer.MainForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
</Contents>
<References />
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Debug" assembly="C# Viewer" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Debug">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Debug" assembly="C# Viewer" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Release" assembly="C# Viewer" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

@ -0,0 +1,124 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 01.06.2005
* Time: 10:40
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.IO;
using System.Drawing;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace C__Viewer
{
/// <summary>
/// Description of MainForm.
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem1;
public static string path;
public MainForm(string[] args)
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm(args));
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.SuspendLayout();
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2});
this.menuItem1.Text = "Datei";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Text = "Öffnen...";
this.menuItem2.Click += new System.EventHandler(this.MenuItem2Click);
//
// openFileDialog1
//
this.openFileDialog1.Filter = "C# Dateien|*.cs|Alle Dateien|*.*";
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1});
//
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(544, 421);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
// MainForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(544, 421);
this.Controls.Add(this.richTextBox1);
this.Menu = this.mainMenu1;
this.Name = "MainForm";
this.Text = "MainForm";
this.ResumeLayout(false);
}
#endregion
void MenuItem2Click(object sender, System.EventArgs e)
{
if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
using (StreamReader sr = new StreamReader(openFileDialog1.FileName))
{
String line;
while ((line = sr.ReadLine()) != null)
{
richTextBox1.Text += line+"\n";
}
richTextBox1.Find("public", RichTextBoxFinds.WholeWord);
richTextBox1.SelectionColor = Color.Blue;
}
}
}
}
}

@ -0,0 +1,32 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

@ -0,0 +1,16 @@
<Combine fileversion="1.0" name="Chat 3" description="">
<StartMode startupentry="Chat 3" single="True">
<Execute entry="Chat 3" type="None" />
</StartMode>
<Entries>
<Entry filename=".\Chat 3.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="Chat 3" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="Chat 3" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

@ -0,0 +1,30 @@
<Project name="Chat 3" standardNamespace="Chat_3" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\MainForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Chat_3.MainForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
<File name=".\EinstellungenForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Chat_3.EinstellungenForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
<File name=".\ÜberForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Chat_3.ÜberForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
</Contents>
<References />
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Release" assembly="Chat 3" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Release">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Debug" assembly="Chat 3" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Release" assembly="Chat 3" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,194 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 02.06.2005
* Time: 21:07
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Chat_3
{
/// <summary>
/// Description of EinstellungenForm.
/// </summary>
public class EinstellungenForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnSchriftart;
private System.Windows.Forms.FontDialog fontDialog1;
private System.Windows.Forms.CheckBox cbVordergrund;
private System.Windows.Forms.RichTextBox txtTest;
private System.Windows.Forms.Button btnAbbrechen;
private System.Windows.Forms.TextBox txtBenutzer;
public Font font;
public Color color;
public string benutzer;
public bool vordergrund;
public EinstellungenForm(Font f, Color c, string b, bool v)
{
InitializeComponent();
fontDialog1.Font = f;
fontDialog1.Color = c;
txtBenutzer.Text = b;
cbVordergrund.Checked = v;
Aktualisiere();
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
this.txtBenutzer = new System.Windows.Forms.TextBox();
this.btnAbbrechen = new System.Windows.Forms.Button();
this.txtTest = new System.Windows.Forms.RichTextBox();
this.cbVordergrund = new System.Windows.Forms.CheckBox();
this.fontDialog1 = new System.Windows.Forms.FontDialog();
this.btnSchriftart = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnOK = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// txtBenutzer
//
this.txtBenutzer.Location = new System.Drawing.Point(120, 16);
this.txtBenutzer.Name = "txtBenutzer";
this.txtBenutzer.Size = new System.Drawing.Size(120, 20);
this.txtBenutzer.TabIndex = 2;
this.txtBenutzer.Text = "JoSch";
this.txtBenutzer.TextChanged += new System.EventHandler(this.TxtBenutzerTextChanged);
//
// btnAbbrechen
//
this.btnAbbrechen.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnAbbrechen.Location = new System.Drawing.Point(136, 192);
this.btnAbbrechen.Name = "btnAbbrechen";
this.btnAbbrechen.TabIndex = 1;
this.btnAbbrechen.Text = "A&bbrechen";
//
// txtTest
//
this.txtTest.Location = new System.Drawing.Point(16, 88);
this.txtTest.Name = "txtTest";
this.txtTest.ReadOnly = true;
this.txtTest.Size = new System.Drawing.Size(192, 40);
this.txtTest.TabIndex = 7;
this.txtTest.Text = "";
//
// cbVordergrund
//
this.cbVordergrund.Location = new System.Drawing.Point(40, 136);
this.cbVordergrund.Name = "cbVordergrund";
this.cbVordergrund.Size = new System.Drawing.Size(168, 24);
this.cbVordergrund.TabIndex = 10;
this.cbVordergrund.Text = "Immer im Vordergrund";
//
// fontDialog1
//
this.fontDialog1.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.fontDialog1.ShowColor = true;
//
// btnSchriftart
//
this.btnSchriftart.Location = new System.Drawing.Point(224, 96);
this.btnSchriftart.Name = "btnSchriftart";
this.btnSchriftart.TabIndex = 8;
this.btnSchriftart.Text = "Schriftart";
this.btnSchriftart.Click += new System.EventHandler(this.BtnSchriftartClick);
//
// label1
//
this.label1.Location = new System.Drawing.Point(24, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(88, 24);
this.label1.TabIndex = 3;
this.label1.Text = "Benutzername:";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label2
//
this.label2.Location = new System.Drawing.Point(32, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(272, 40);
this.label2.TabIndex = 9;
this.label2.Text = "Die eingestellte Farbe ist für alle sichtbar, die ausgewählte Schriftart erschein" +
"t nur bei dir.";
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(224, 192);
this.btnOK.Name = "btnOK";
this.btnOK.TabIndex = 0;
this.btnOK.Text = "&OK";
this.btnOK.Click += new System.EventHandler(this.BtnOKClick);
//
// EinstellungenForm
//
this.AcceptButton = this.btnOK;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.btnAbbrechen;
this.ClientSize = new System.Drawing.Size(314, 231);
this.Controls.Add(this.cbVordergrund);
this.Controls.Add(this.label2);
this.Controls.Add(this.btnSchriftart);
this.Controls.Add(this.txtTest);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtBenutzer);
this.Controls.Add(this.btnAbbrechen);
this.Controls.Add(this.btnOK);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.KeyPreview = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "EinstellungenForm";
this.Text = "Einstellungen";
this.ResumeLayout(false);
}
#endregion
void BtnOKClick(object sender, System.EventArgs e)
{
this.DialogResult = DialogResult.OK;
font = fontDialog1.Font;
color = fontDialog1.Color;
benutzer = txtBenutzer.Text;
vordergrund = cbVordergrund.Checked;
this.Close();
}
void TxtBenutzerTextChanged(object sender, System.EventArgs e)
{
Aktualisiere();
}
void Aktualisiere()
{
txtTest.Text = "";
txtTest.SelectionFont = fontDialog1.Font;
txtTest.SelectionColor = fontDialog1.Color;
txtTest.SelectedText = txtBenutzer.Text;
txtTest.SelectionFont = new Font("Tahoma", 10, FontStyle.Bold);
txtTest.SelectionColor = System.Drawing.Color.FromArgb(0, 0, 0);
txtTest.SelectedText = " (13:24:06): hiho!";
}
void BtnSchriftartClick(object sender, System.EventArgs e)
{
if(fontDialog1.ShowDialog()==DialogResult.OK)
{
Aktualisiere();
}
}
}
}

@ -0,0 +1,423 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 01.06.2005
* Time: 19:10
*/
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace Chat_3
{
/// <summary>
/// Description of MainForm.
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.Button btnSend;
private System.Windows.Forms.Button btnMenü;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.ImageList Bilder;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.RichTextBox txtSend;
private System.Windows.Forms.ListView lstUser;
private System.Windows.Forms.RichTextBox txtmsg;
private System.Windows.Forms.ContextMenu Taskleiste;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem1;
private Thread t1 = null;
private Thread t2 = null;
private Socket s = null;
private Font font;
private Color color;
private string benutzer;
private bool vordergrund;
private string status;
public MainForm()
{
InitializeComponent();
font = new Font("Tahoma", 10, FontStyle.Bold);
color = System.Drawing.Color.FromArgb(255, 0, 0);
benutzer = "JoSch";
vordergrund = false;
status = "Online";
t1 = new Thread(new ThreadStart(Identifizieren));
t1.Start();
t2 = new Thread(new ThreadStart(Empfangen));
t2.Start();
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm());
}
#region Windows Forms Designer generated code
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.Taskleiste = new System.Windows.Forms.ContextMenu();
this.txtmsg = new System.Windows.Forms.RichTextBox();
this.lstUser = new System.Windows.Forms.ListView();
this.txtSend = new System.Windows.Forms.RichTextBox();
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.Bilder = new System.Windows.Forms.ImageList(this.components);
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.btnMenü = new System.Windows.Forms.Button();
this.btnSend = new System.Windows.Forms.Button();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.SuspendLayout();
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.Text = "Chat 3 minimieren";
this.menuItem1.Click += new System.EventHandler(this.Minimieren);
//
// menuItem2
//
this.menuItem2.Index = 1;
this.menuItem2.Text = "Einstellungen";
this.menuItem2.Click += new System.EventHandler(this.EinstellungenÖffnen);
//
// menuItem3
//
this.menuItem3.Index = 2;
this.menuItem3.Text = "Chat 3 beenden";
this.menuItem3.Click += new System.EventHandler(this.Beenden);
//
// Taskleiste
//
this.Taskleiste.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem2,
this.menuItem3,
this.menuItem4,
this.menuItem5});
//
// txtmsg
//
this.txtmsg.Location = new System.Drawing.Point(8, 8);
this.txtmsg.Name = "txtmsg";
this.txtmsg.ReadOnly = true;
this.txtmsg.Size = new System.Drawing.Size(384, 352);
this.txtmsg.TabIndex = 4;
this.txtmsg.Text = "";
//
// lstUser
//
this.lstUser.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2});
this.lstUser.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.lstUser.Location = new System.Drawing.Point(400, 8);
this.lstUser.Name = "lstUser";
this.lstUser.Size = new System.Drawing.Size(144, 416);
this.lstUser.SmallImageList = this.Bilder;
this.lstUser.TabIndex = 7;
this.lstUser.View = System.Windows.Forms.View.Details;
//
// txtSend
//
this.txtSend.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtSend.Location = new System.Drawing.Point(8, 368);
this.txtSend.Name = "txtSend";
this.txtSend.Size = new System.Drawing.Size(296, 64);
this.txtSend.TabIndex = 0;
this.txtSend.Text = "";
this.txtSend.TextChanged += new System.EventHandler(this.TxtSendTextChanged);
//
// columnHeader2
//
this.columnHeader2.Text = "Status";
//
// columnHeader1
//
this.columnHeader1.Text = "Benutzer";
this.columnHeader1.Width = 80;
//
// Bilder
//
this.Bilder.ImageSize = new System.Drawing.Size(16, 16);
this.Bilder.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("Bilder.ImageStream")));
this.Bilder.TransparentColor = System.Drawing.Color.Transparent;
//
// notifyIcon1
//
this.notifyIcon1.ContextMenu = this.Taskleiste;
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "Chat 3";
this.notifyIcon1.Visible = true;
//
// btnMenü
//
this.btnMenü.Location = new System.Drawing.Point(312, 408);
this.btnMenü.Name = "btnMenü";
this.btnMenü.Size = new System.Drawing.Size(80, 24);
this.btnMenü.TabIndex = 5;
this.btnMenü.Text = "Menü öffnen";
this.btnMenü.Click += new System.EventHandler(this.BtnMenüClick);
//
// btnSend
//
this.btnSend.Enabled = false;
this.btnSend.Location = new System.Drawing.Point(312, 368);
this.btnSend.Name = "btnSend";
this.btnSend.Size = new System.Drawing.Size(80, 24);
this.btnSend.TabIndex = 1;
this.btnSend.Text = "Senden";
this.btnSend.Click += new System.EventHandler(this.BtnSendClick);
//
// menuItem4
//
this.menuItem4.Index = 3;
this.menuItem4.Text = "In den Vordergrund";
this.menuItem4.Click += new System.EventHandler(this.Vordergrund);
//
// menuItem5
//
this.menuItem5.Index = 4;
this.menuItem5.Text = "Über...";
this.menuItem5.Click += new System.EventHandler(this.ÜberÖffnen);
//
// MainForm
//
this.AcceptButton = this.btnSend;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(552, 437);
this.Controls.Add(this.lstUser);
this.Controls.Add(this.txtSend);
this.Controls.Add(this.btnMenü);
this.Controls.Add(this.txtmsg);
this.Controls.Add(this.btnSend);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MainForm";
this.ShowInTaskbar = false;
this.Text = "Chat 3";
this.Closed += new System.EventHandler(this.MainFormClosed);
this.ResumeLayout(false);
}
#endregion
#region Network Functions
void Empfangen()
{
s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
s.Bind(new IPEndPoint(IPAddress.Any, 4378));
string temp = "";
while(true)
{
byte[] buffer = new byte[256];
s.Receive(buffer);
string received = Encoding.Unicode.GetString(buffer);
buffer = null;
string[] token = received.Split(new char[] {'‼'});
if(token[0] == "Nachricht")
{
if(token[2]!=temp)
{
txtmsg.SelectionFont = font;
txtmsg.SelectionColor = System.Drawing.Color.FromArgb(int.Parse(token[4]),
int.Parse(token[5]),
int.Parse(token[6]));
txtmsg.SelectedText = token[1];
txtmsg.ScrollToCaret();
txtmsg.SelectionFont = font;
txtmsg.SelectionColor = System.Drawing.Color.FromArgb(0, 0, 0);
txtmsg.SelectedText = " ("+token[2]+"): "+token[3];
txtmsg.SelectedText = "\r\n";
txtmsg.ScrollToCaret();
temp = token[2];
}
}
else if(token[0] == "Status")
{
bool isfound = false;
foreach(ListViewItem i in lstUser.Items)
{
TimeSpan timeout = DateTime.Now - DateTime.Parse(i.SubItems[2].Text);
if(timeout.TotalMilliseconds < 10000)
{
if(token[1]==i.Text)
{
i.SubItems[1].Text = token[3];
i.SubItems[2].Text = token[2];
isfound = true;
}
}
else
{
i.Remove();
}
}
if(!isfound)
{
int count = lstUser.Items.Add(token[1]).Index;
lstUser.Items[count].SubItems.Add(token[3]);
lstUser.Items[count].SubItems.Add(token[2]);
lstUser.Items[count].ImageIndex = 0;
}
}
}
}
void Senden()
{
UdpClient client = new UdpClient();
IPEndPoint ipepbc = new IPEndPoint(IPAddress.Broadcast, 4378);
byte[] msg = Encoding.Unicode.GetBytes("Nachricht"+"‼"+benutzer+"‼"+DateTime.Now.ToLongTimeString()
+"‼"+txtSend.Text+"‼"+color.R.ToString()
+"‼"+color.G.ToString()+"‼"+color.B.ToString());
if(msg.Length < 256)
{
client.Send(msg, msg.Length, ipepbc);
txtSend.Text = "";
}
else
{
MessageBox.Show("Nachricht zu lang!");
}
client.Close();
}
void Identifizieren()
{
UdpClient client = new UdpClient();
IPEndPoint ipepbc = new IPEndPoint(IPAddress.Broadcast, 4378);
while(true)
{
byte[] msg = Encoding.Unicode.GetBytes("Status"+"‼"+benutzer+"‼"
+DateTime.Now.ToLongTimeString()
+"‼"+status);
client.Send(msg, msg.Length, ipepbc);
Thread.Sleep(2000);
}
}
#endregion
#region Eventhandler Functions
void MainFormClosed(object sender, System.EventArgs e)
{
if(s != null)
{
s.Close();
}
if(t1!=null)
{
t1.Abort();
}
if(t2!=null)
{
t2.Abort();
}
notifyIcon1.Dispose();
}
void TxtSendTextChanged(object sender, System.EventArgs e)
{
btnSend.Enabled = (txtSend.Text.Length > 0);
status = "Schreibt";
}
void BtnSendClick(object sender, System.EventArgs e)
{
Senden();
status = "Online";
}
void BtnMenüClick(object sender, System.EventArgs e)
{
Taskleiste.Show(btnMenü, new System.Drawing.Point(0, btnMenü.Height));
}
#endregion
#region Menu Functions
void Minimieren(object sender, System.EventArgs e)
{
if(this.WindowState == FormWindowState.Minimized)
{
this.Visible = true;
this.WindowState = FormWindowState.Normal;
this.menuItem1.Text = "Chat 3 minimieren";
}
else if(this.WindowState == FormWindowState.Normal)
{
this.WindowState = FormWindowState.Minimized;
this.Visible = false;
this.menuItem1.Text = "Chat 3 wiederherstellen";
}
else
{
MessageBox.Show(this.WindowState.ToString());
}
}
void ÜberÖffnen(object sender, System.EventArgs e)
{
ÜberForm über = new ÜberForm();
über.TopMost = this.TopMost;
über.ShowDialog();
über.Dispose();
}
void EinstellungenÖffnen(object sender, System.EventArgs e)
{
EinstellungenForm einst = new EinstellungenForm(font, color, benutzer, vordergrund);
einst.TopMost = this.TopMost;
if(einst.ShowDialog()==DialogResult.OK)
{
font = einst.font;
color = einst.color;
benutzer = einst.benutzer;
vordergrund = einst.vordergrund;
}
einst.Dispose();
this.TopMost = vordergrund;
}
void Vordergrund(object sender, System.EventArgs e)
{
this.BringToFront();
}
void Beenden(object sender, System.EventArgs e)
{
this.Close();
}
#endregion
}
}

@ -0,0 +1,116 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 03.06.2005
* Time: 07:02
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Chat_3
{
/// <summary>
/// Description of ÜberForm.
/// </summary>
public class ÜberForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
public ÜberForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label3
//
this.label3.Location = new System.Drawing.Point(64, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(160, 16);
this.label3.TabIndex = 3;
this.label3.Text = "a.k.a. JoSch";
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 104);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(304, 16);
this.label4.TabIndex = 4;
this.label4.Text = "Für meine liebste Angelika";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// button1
//
this.button1.Location = new System.Drawing.Point(120, 136);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "OK";
this.button1.Click += new System.EventHandler(this.Button1Click);
//
// label1
//
this.label1.Font = new System.Drawing.Font("Lucida Calligraphy", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label1.Location = new System.Drawing.Point(40, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(248, 56);
this.label1.TabIndex = 1;
this.label1.Text = "Chat 3";
//
// label2
//
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Location = new System.Drawing.Point(56, 56);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(248, 16);
this.label2.TabIndex = 2;
this.label2.Text = "von Johannes Schauer (J.Schauer@web.de)";
//
// ÜberForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
this.ClientSize = new System.Drawing.Size(314, 167);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ÜberForm";
this.Text = "Über...";
this.ResumeLayout(false);
}
#endregion
void Button1Click(object sender, System.EventArgs e)
{
this.Dispose();
}
}
}

@ -0,0 +1,32 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

Binary file not shown.

@ -0,0 +1,16 @@
<Combine fileversion="1.0" name="Chat" description="">
<StartMode startupentry="Chat" single="True">
<Execute entry="Chat" type="None" />
</StartMode>
<Entries>
<Entry filename=".\Chat.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="Chat" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="Chat" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

@ -0,0 +1,36 @@
<Project name="Chat" standardNamespace="Chat" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\MainForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Chat.MainForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
<File name=".\ChatPeerSample.ChatPeer.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
<File name=".\DPlayConnect.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\DPlayConnect_AddressForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\DPlayConnect_CreateForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\DPlayConnect_JoinForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\DPlayConnect_ServiceProviderForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CreateJoinForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
</Contents>
<References>
<Reference type="Gac" refto="Microsoft.DirectX, Version=1.0.1901.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" localcopy="True" />
<Reference type="Gac" refto="Microsoft.DirectX.DirectPlay, Version=1.0.1901.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" localcopy="True" />
</References>
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Release" assembly="Chat" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Release">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Debug" assembly="Chat" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Release" assembly="Chat" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

Binary file not shown.

@ -0,0 +1,272 @@
//-----------------------------------------------------------------------------
// File: DPlayConnect.cs
//
// Desc: Application class for the DirectPlay samples framework.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Windows.Forms;
using System.Threading;
using System.Timers;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectPlay;
using System.Runtime.InteropServices;
/// <summary>
/// The connection wizard will allow our users to pick a service provider,
/// and then connect to an existing application, or create a new one as the host.
/// </summary>
public class ConnectWizard
{
private Peer peerObject;
private Address deviceAddress;
private ChooseServiceProviderForm serviceProviderForm;
private CreateJoinForm createJoinForm;
private Guid serviceProviderGuid;
private string username;
private string samplename;
private bool isInSession = false;
private bool isHost = false;
private int port = 0;
private Guid applicationGuid;
/// <summary>
/// Constructor
/// </summary>
/// <param name="peer"></param>
/// <param name="applicationGuid"></param>
/// <param name="sampleName"></param>
public ConnectWizard(Peer peer, Guid application, string sampleName)
{
peerObject = peer;
applicationGuid = application;
samplename = sampleName;
}
/// <summary>
/// The guid for the current service provider
/// </summary>
public Guid ServiceProvider
{
get
{ return serviceProviderGuid; }
set
{ serviceProviderGuid = value; }
}
/// <summary>
/// The game's default port number
/// </summary>
public int DefaultPort
{
get
{ return port; }
set
{ port = value; }
}
/// <summary>
/// Am I the host
/// </summary>
public bool IsHost
{
get
{ return isHost; }
set
{ isHost = value; }
}
/// <summary>
/// The username
/// </summary>
public string Username
{
get
{ return username; }
set
{ username = value; }
}
/// <summary>
/// The sample name
/// </summary>
public string SampleName
{
get
{ return samplename; }
}
/// <summary>
/// The applications guid
/// </summary>
public Guid ApplicationGuid
{
get
{ return applicationGuid; }
}
/// <summary>
/// Are we in a session
/// </summary>
public bool InSession
{
get { return isInSession; }
set { isInSession = value; }
}
/// <summary>
/// Returns true if the given provider requires a port component
/// </summary>
/// <param name="provider">ServiceProvider Guid</param>
/// <returns></returns>
static public bool ProviderRequiresPort(Guid provider)
{
return (provider != Address.ServiceProviderSerial &&
provider != Address.ServiceProviderModem &&
provider != Address.ServiceProviderBlueTooth);
}
/// <summary>
/// Handler for when our form is disposed
/// </summary>
public void FormDisposed(object sender, EventArgs e)
{
if (sender == createJoinForm)
createJoinForm = null;
if (sender == serviceProviderForm)
serviceProviderForm = null;
}
/// <summary>
/// Set the user information
/// </summary>
public void SetUserInfo()
{
//Before we call host, let's actually call SetPeerInformation
PlayerInformation myinformation = new PlayerInformation();
myinformation.Name = username;
peerObject.SetPeerInformation(myinformation, SyncFlags.PeerInformation);
}
/// <summary>
/// Show the service providers form
/// </summary>
/// <returns>True if a service provider was picked, false otherwise</returns>
public bool DoShowServiceProviders()
{
if (serviceProviderForm == null)
{
username = null;
serviceProviderForm = new ChooseServiceProviderForm(peerObject,this);
serviceProviderForm.Disposed += new System.EventHandler(this.FormDisposed);
}
if (serviceProviderForm.ShowDialog() == DialogResult.OK)
return true;
// The didn't hit ok
return false;
}
/// <summary>
/// Show the create or join screen
/// </summary>
/// <returns>True if we will be in a session, false otherwise</returns>
public bool DoCreateJoinGame()
{
if (deviceAddress != null)
deviceAddress.Dispose();
deviceAddress = new Address();
if (createJoinForm != null)
createJoinForm.Dispose();
createJoinForm = new CreateJoinForm(peerObject, deviceAddress, this);
createJoinForm.Disposed += new System.EventHandler(this.FormDisposed);
//Set the address's service provider (this will be the device address)
deviceAddress.ServiceProvider = serviceProviderGuid;
DialogResult drCreateJoin = createJoinForm.ShowDialog();
if (drCreateJoin == DialogResult.Cancel)
return false;
this.isHost = (drCreateJoin == DialogResult.Yes);
return true;
}
/// <summary>
/// Start the wizard
/// </summary>
/// <returns>True if we are in a session, false otherwise</returns>
public bool StartWizard()
{
isInSession = false;
while (this.DoShowServiceProviders())
{
//Now let's create a game or join a session
if (this.DoCreateJoinGame())
{
// A game has been created or joined now, set our flag
isInSession = true;
break;
}
}
return isInSession;
}
}

@ -0,0 +1,220 @@
//-----------------------------------------------------------------------------
// File: DPlayConnect_AddressForm.cs
//
// Desc: Application class for the DirectPlay samples framework.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectPlay;
/// <summary>
/// Summary description for AddressForm.
/// </summary>
public class AddressForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox hostnameTextBox;
private System.Windows.Forms.TextBox portTextBox;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Constructor
/// </summary>
public AddressForm( int defaultPort )
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
// Set default port value
Port = defaultPort;
}
/// <summary>
/// The remote port on which to connect
/// </summary>
public int Port
{
get
{
int port = 0;
try
{
port = int.Parse(portTextBox.Text);
}
catch {}
return port;
}
set
{
if( value > 0 )
portTextBox.Text = value.ToString();
}
}
/// <summary>
/// Remote hostname
/// </summary>
public string Hostname
{
get
{ return hostnameTextBox.Text; }
set
{ hostnameTextBox.Text = value; }
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(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.label1 = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.hostnameTextBox = new System.Windows.Forms.TextBox();
this.portTextBox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(248, 48);
this.label1.TabIndex = 0;
this.label1.Text = "Please enter the optional components of the remote session address. If set blank," +
" DirectPlay will attempt to search the local network.";
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(104, 144);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(72, 24);
this.okButton.TabIndex = 1;
this.okButton.Text = "&OK";
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(184, 144);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(72, 24);
this.cancelButton.TabIndex = 2;
this.cancelButton.Text = "&Cancel";
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// label2
//
this.label2.Location = new System.Drawing.Point(32, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(100, 16);
this.label2.TabIndex = 3;
this.label2.Text = "Hostname";
//
// label3
//
this.label3.Location = new System.Drawing.Point(160, 80);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 16);
this.label3.TabIndex = 4;
this.label3.Text = "Port";
//
// hostnameTextBox
//
this.hostnameTextBox.Location = new System.Drawing.Point(32, 96);
this.hostnameTextBox.Name = "hostnameTextBox";
this.hostnameTextBox.Size = new System.Drawing.Size(120, 20);
this.hostnameTextBox.TabIndex = 5;
this.hostnameTextBox.Text = "";
//
// portTextBox
//
this.portTextBox.Location = new System.Drawing.Point(160, 96);
this.portTextBox.Name = "portTextBox";
this.portTextBox.Size = new System.Drawing.Size(56, 20);
this.portTextBox.TabIndex = 6;
this.portTextBox.Text = "";
//
// AddressForm
//
this.AcceptButton = this.okButton;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(264, 176);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.portTextBox,
this.hostnameTextBox,
this.label3,
this.label2,
this.cancelButton,
this.okButton,
this.label1});
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AddressForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Remote Address";
this.ResumeLayout(false);
}
#endregion
private void okButton_Click(object sender, System.EventArgs e)
{
DialogResult = DialogResult.OK;
}
private void cancelButton_Click(object sender, System.EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}

@ -0,0 +1,363 @@
//-----------------------------------------------------------------------------
// File: DPlayConnect_CreateForm.cs
//
// Desc: Application class for the DirectPlay samples framework.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectPlay;
/// <summary>
/// This form will allow you to create a new session, and set certain properties
/// of the session.
/// </summary>
public class CreateSessionForm : System.Windows.Forms.Form
{
private Peer peer;
private ConnectWizard connectionWizard;
private Address deviceAddress;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtSession;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton notSignedRadio;
private System.Windows.Forms.RadioButton fullSignedRadio;
private System.Windows.Forms.RadioButton fastSignedRadio;
private System.Windows.Forms.CheckBox migrateHostCheckBox;
private System.Windows.Forms.CheckBox useDPNSVRCheckBox;
private System.Windows.Forms.TextBox localPortTextBox;
private System.Windows.Forms.Label localPortLabel;
private System.Windows.Forms.Button btnCancel;
/// <summary>
/// Constructor
/// </summary>
public CreateSessionForm(Peer peerObject, Address addressObject, ConnectWizard connectionWizard)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
peer = peerObject;
this.connectionWizard = connectionWizard;
deviceAddress = addressObject;
txtSession.Text = null;
this.Text = connectionWizard.SampleName + " - " + this.Text;
//Get the default session from the registry if it exists
Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\DirectX\\SDK\\csDPlay");
if (regKey != null)
{
// Get session name
txtSession.Text = (string)regKey.GetValue("DirectPlaySessionName", null);
// Get host migration option
if (regKey.GetValue("DirectPlayMigrateHost",null) != null)
{
migrateHostCheckBox.Checked = ((int)regKey.GetValue("DirectPlayMigrateHost",1)==1);
}
// Get session signing option
if (regKey.GetValue("DirectPlaySessionSigning",null) != null)
{
if ("Full" == (string)regKey.GetValue("DirectPlaySessionSigning",null))
fullSignedRadio.Checked = true;
else if ("Fast" == (string)regKey.GetValue("DirectPlaySessionSigning",null))
fastSignedRadio.Checked = true;
else
notSignedRadio.Checked = true;
}
regKey.Close();
}
// Set default port value and hide port UI if provider doesn't use them
Port = connectionWizard.DefaultPort;
if (!ConnectWizard.ProviderRequiresPort(deviceAddress.ServiceProvider))
{
localPortTextBox.Hide();
localPortLabel.Hide();
}
}
/// <summary>
/// The port on which to host
/// </summary>
public int Port
{
get
{
int port = 0;
try
{
port = int.Parse(localPortTextBox.Text);
}
catch {}
return port;
}
set
{
if( value > 0 )
localPortTextBox.Text = value.ToString();
}
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool Disposing)
{
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.txtSession = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.fullSignedRadio = new System.Windows.Forms.RadioButton();
this.fastSignedRadio = new System.Windows.Forms.RadioButton();
this.notSignedRadio = new System.Windows.Forms.RadioButton();
this.migrateHostCheckBox = new System.Windows.Forms.CheckBox();
this.useDPNSVRCheckBox = new System.Windows.Forms.CheckBox();
this.localPortLabel = new System.Windows.Forms.Label();
this.localPortTextBox = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// txtSession
//
this.txtSession.Location = new System.Drawing.Point(96, 24);
this.txtSession.Name = "txtSession";
this.txtSession.Size = new System.Drawing.Size(176, 20);
this.txtSession.TabIndex = 3;
this.txtSession.Text = "";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 28);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(288, 12);
this.label1.TabIndex = 2;
this.label1.Text = "Session Name:";
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(128, 168);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(74, 27);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(208, 168);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(74, 27);
this.btnCancel.TabIndex = 1;
this.btnCancel.Text = "Cancel";
//
// groupBox1
//
this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.fullSignedRadio,
this.fastSignedRadio,
this.notSignedRadio});
this.groupBox1.Location = new System.Drawing.Point(16, 64);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(112, 88);
this.groupBox1.TabIndex = 10;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Session Signing";
//
// fullSignedRadio
//
this.fullSignedRadio.Location = new System.Drawing.Point(18, 22);
this.fullSignedRadio.Name = "fullSignedRadio";
this.fullSignedRadio.Size = new System.Drawing.Size(80, 16);
this.fullSignedRadio.TabIndex = 9;
this.fullSignedRadio.Text = "Full signed";
//
// fastSignedRadio
//
this.fastSignedRadio.Checked = true;
this.fastSignedRadio.Location = new System.Drawing.Point(18, 41);
this.fastSignedRadio.Name = "fastSignedRadio";
this.fastSignedRadio.Size = new System.Drawing.Size(88, 16);
this.fastSignedRadio.TabIndex = 8;
this.fastSignedRadio.TabStop = true;
this.fastSignedRadio.Text = "Fast signed";
//
// notSignedRadio
//
this.notSignedRadio.Location = new System.Drawing.Point(18, 55);
this.notSignedRadio.Name = "notSignedRadio";
this.notSignedRadio.Size = new System.Drawing.Size(72, 24);
this.notSignedRadio.TabIndex = 10;
this.notSignedRadio.Text = "Disabled";
//
// migrateHostCheckBox
//
this.migrateHostCheckBox.Checked = true;
this.migrateHostCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.migrateHostCheckBox.Location = new System.Drawing.Point(144, 64);
this.migrateHostCheckBox.Name = "migrateHostCheckBox";
this.migrateHostCheckBox.Size = new System.Drawing.Size(136, 24);
this.migrateHostCheckBox.TabIndex = 11;
this.migrateHostCheckBox.Text = "Enable Host Migration";
//
// useDPNSVRCheckBox
//
this.useDPNSVRCheckBox.Location = new System.Drawing.Point(144, 84);
this.useDPNSVRCheckBox.Name = "useDPNSVRCheckBox";
this.useDPNSVRCheckBox.Size = new System.Drawing.Size(136, 24);
this.useDPNSVRCheckBox.TabIndex = 12;
this.useDPNSVRCheckBox.Text = "Use DPNSVR";
//
// localPortLabel
//
this.localPortLabel.Location = new System.Drawing.Point(152, 122);
this.localPortLabel.Name = "localPortLabel";
this.localPortLabel.Size = new System.Drawing.Size(64, 17);
this.localPortLabel.TabIndex = 13;
this.localPortLabel.Text = "Local Port:";
//
// localPortTextBox
//
this.localPortTextBox.Location = new System.Drawing.Point(216, 120);
this.localPortTextBox.Name = "localPortTextBox";
this.localPortTextBox.Size = new System.Drawing.Size(56, 20);
this.localPortTextBox.TabIndex = 14;
this.localPortTextBox.Text = "";
//
// CreateSessionForm
//
this.AcceptButton = this.btnOK;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(290, 200);
this.ControlBox = false;
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.localPortTextBox,
this.localPortLabel,
this.useDPNSVRCheckBox,
this.migrateHostCheckBox,
this.txtSession,
this.label1,
this.groupBox1,
this.btnOK,
this.btnCancel});
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.HelpButton = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "CreateSessionForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Create a Session";
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.CreateSessionForm_HelpRequested);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// We are ready to create a session. Ensure the data is valid
/// then create the session
/// </summary>
private void btnOK_Click(object sender, System.EventArgs e)
{
ApplicationDescription dpApp;
if ((txtSession.Text == null) || (txtSession.Text == ""))
{
MessageBox.Show(this,"Please enter a session name before clicking OK.","No sessionname",MessageBoxButtons.OK,MessageBoxIcon.Information);
return;
}
Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\DirectX\\SDK\\csDPlay");
if (regKey != null)
{
regKey.SetValue("DirectPlaySessionName", txtSession.Text);
if (migrateHostCheckBox.Checked)
regKey.SetValue("DirectPlayMigrateHost",1);
else
regKey.SetValue("DirectPlayMigrateHost",0);
if (fastSignedRadio.Checked)
regKey.SetValue("DirectPlaySessionSigning","Fast");
else if (fullSignedRadio.Checked)
regKey.SetValue("DirectPlaySessionSigning","Full");
else
regKey.SetValue("DirectPlaySessionSigning","Disabled");
regKey.Close();
}
dpApp = new ApplicationDescription();
dpApp.GuidApplication = connectionWizard.ApplicationGuid;
dpApp.SessionName = txtSession.Text;
dpApp.Flags = 0;
if (migrateHostCheckBox.Checked)
dpApp.Flags |= SessionFlags.MigrateHost;
if (!useDPNSVRCheckBox.Checked)
dpApp.Flags |= SessionFlags.NoDpnServer;
if (fastSignedRadio.Checked)
dpApp.Flags |= SessionFlags.FastSigned;
else if (fullSignedRadio.Checked)
dpApp.Flags |= SessionFlags.FullSigned;
// Specify the port number if available
if (ConnectWizard.ProviderRequiresPort(deviceAddress.ServiceProvider))
{
if (Port > 0)
deviceAddress.AddComponent(Address.KeyPort, Port);
}
connectionWizard.SetUserInfo();
// Host a game on deviceAddress as described by dpApp
// HostFlags.OkToQueryForAddressing allows DirectPlay to prompt the user
// using a dialog box for any device address information that is missing
peer.Host(dpApp,deviceAddress,HostFlags.OkToQueryForAddressing);
this.DialogResult = DialogResult.OK;
}
private void CreateSessionForm_HelpRequested(object sender, System.Windows.Forms.HelpEventArgs hlpevent)
{
}
}

@ -0,0 +1,516 @@
//-----------------------------------------------------------------------------
// File: DPlayConnect_JoinForm.cs
//
// Desc: Application class for the DirectPlay samples framework.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Windows.Forms;
using System.Threading;
using System.Timers;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectPlay;
/// <summary>
/// This form will search for existing running samples and allow you to join them or will
/// allow you to create your own session as a host
/// </summary>
public class CreateJoinForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnJoin;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnCreate;
private System.Windows.Forms.ListBox lstSession;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnSearch;
private const int EnumExpireThreshold = 2000;
private bool amJoining = false;
/// <summary>
/// Hold our information of hosts we found
/// </summary>
private struct FindHostsResponseInformation
{
public int LastFoundTime;
public ApplicationDescription ApplicationDesc;
public int RoundTripLatencyMs;
public Address sender;
public Address device;
public override string ToString()
{
if (ApplicationDesc.MaxPlayers > 0)
return ApplicationDesc.SessionName + " (" + ApplicationDesc.CurrentPlayers + "/" + ApplicationDesc.MaxPlayers + ") (" + RoundTripLatencyMs + "ms)";
else
return ApplicationDesc.SessionName + " (" + ApplicationDesc.CurrentPlayers + ") (" + RoundTripLatencyMs + "ms)";
}
};
private Peer peer;
private ConnectWizard connectionWizard;
private Address deviceAddress;
private Address hostAddress = null;
private bool isSearching = false;
private int findHostHandle = 0;
private CreateSessionForm createSessionForm = null;
private ResultCode resultCode;
private ArrayList foundHosts = new ArrayList();
private bool isConnected = false;
private ManualResetEvent connectEvent = null;
private System.Timers.Timer updateListTimer = null;
private System.Timers.Timer connectTimer = null;
/// <summary>
/// Constructor
/// </summary>
public CreateJoinForm(Peer peerObject, Address addressObject, ConnectWizard connectionWizard)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
peer = peerObject;
this.connectionWizard = connectionWizard;
this.Text = connectionWizard.SampleName + " - " + this.Text;
deviceAddress = addressObject;
//Set up the event handlers
peer.FindHostResponse += new FindHostResponseEventHandler(FindHostResponseMessage);
peer.ConnectComplete += new ConnectCompleteEventHandler(ConnectResult);
peer.AsyncOperationComplete += new AsyncOperationCompleteEventHandler(CancelAsync);
//Set up our timer
updateListTimer = new System.Timers.Timer(300); // A 300 ms interval
updateListTimer.Elapsed += new System.Timers.ElapsedEventHandler(this.UpdateTimer);
updateListTimer.SynchronizingObject = this;
updateListTimer.Start();
//Set up our connect timer
connectTimer = new System.Timers.Timer(100); // A 100ms interval
connectTimer.Elapsed += new System.Timers.ElapsedEventHandler(this.ConnectTimer);
connectTimer.SynchronizingObject = this;
// Set up our connect event
connectEvent = new ManualResetEvent(false);
}
/// <summary>
/// An asynchronous operation was cancelled
/// </summary>
private void CancelAsync(object sender, AsyncOperationCompleteEventArgs e)
{
if (e.Message.AsyncOperationHandle == findHostHandle)
{
findHostHandle = 0;
btnSearch.Text = "Start Search";
isSearching = false;
btnCreate.Enabled = true;
btnSearch.Enabled = true;
}
}
/// <summary>
/// A host was found and responded to our query
/// </summary>
private void FindHostResponseMessage(object sender, FindHostResponseEventArgs dpMessage)
{
// Now we need to add this to our list of available sessions
SessionAdd(dpMessage.Message);
}
/// <summary>
/// Add this session to our list
/// </summary>
/// <param name="dpMessage"></param>
private void SessionAdd(FindHostsResponseMessage dpMessage)
{
FindHostsResponseInformation dpInfo = new FindHostsResponseInformation();
dpInfo.ApplicationDesc = dpMessage.ApplicationDescription;
dpInfo.device = dpMessage.AddressDevice;
dpInfo.sender = dpMessage.AddressSender;
dpInfo.RoundTripLatencyMs = dpMessage.RoundTripLatencyMs;
dpInfo.LastFoundTime = Environment.TickCount;
// Let's check the items first and see if this one already exists
bool isFound = false;
lock (foundHosts)
{
for (int i = 0; i < lstSession.Items.Count; i++)
{
if (dpInfo.ApplicationDesc.GuidInstance == ((FindHostsResponseInformation)lstSession.Items[i]).ApplicationDesc.GuidInstance)
{
foundHosts[i] = dpInfo;
lstSession.Items[i] = dpInfo;
isFound = true;
}
}
if (!isFound)
{
lstSession.Items.Add(dpInfo);
foundHosts.Add(dpInfo);
}
}
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool Disposing)
{
base.Dispose(Disposing);
if (isSearching)
{
if (findHostHandle != 0)
peer.CancelAsyncOperation(findHostHandle);
isSearching = !isSearching;
}
if (connectTimer != null)
connectTimer.Dispose();
if (updateListTimer != null)
updateListTimer.Dispose();
}
#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.btnSearch = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.lstSession = new System.Windows.Forms.ListBox();
this.btnCreate = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.btnJoin = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnSearch
//
this.btnSearch.Location = new System.Drawing.Point(319, 7);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(86, 27);
this.btnSearch.TabIndex = 2;
this.btnSearch.Text = "Start Search";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(333, 227);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(74, 27);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
//
// lstSession
//
this.lstSession.Location = new System.Drawing.Point(5, 37);
this.lstSession.Name = "lstSession";
this.lstSession.Size = new System.Drawing.Size(400, 186);
this.lstSession.TabIndex = 1;
this.lstSession.DoubleClick += new System.EventHandler(this.btnJoin_Click);
this.lstSession.SelectedValueChanged += new System.EventHandler(this.SelectedChange);
//
// btnCreate
//
this.btnCreate.DialogResult = System.Windows.Forms.DialogResult.Yes;
this.btnCreate.Location = new System.Drawing.Point(84, 227);
this.btnCreate.Name = "btnCreate";
this.btnCreate.Size = new System.Drawing.Size(74, 27);
this.btnCreate.TabIndex = 2;
this.btnCreate.Text = "Create";
this.btnCreate.Click += new System.EventHandler(this.btnCreate_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(5, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(312, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Select session to join, or click Create to start a new session.";
//
// btnJoin
//
this.btnJoin.Enabled = false;
this.btnJoin.Location = new System.Drawing.Point(7, 227);
this.btnJoin.Name = "btnJoin";
this.btnJoin.Size = new System.Drawing.Size(74, 27);
this.btnJoin.TabIndex = 2;
this.btnJoin.Text = "Join";
this.btnJoin.Click += new System.EventHandler(this.btnJoin_Click);
//
// CreateJoinForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(411, 264);
this.ControlBox = false;
this.Controls.Add(this.btnCreate);
this.Controls.Add(this.btnJoin);
this.Controls.Add(this.btnSearch);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.lstSession);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "CreateJoinForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Join or create a session";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The selected session was changed.
/// </summary>
private void SelectedChange(object sender, System.EventArgs e)
{
if (amJoining)
return; // Do nothing if we are already joining a session
btnJoin.Enabled = (lstSession.SelectedItem != null);
}
/// <summary>
/// We either want to start or stop searching
/// </summary>
private void btnSearch_Click(object sender, System.EventArgs e)
{
if (!isSearching)
{
if( hostAddress != null )
hostAddress.Dispose();
hostAddress = new Address();
hostAddress.ServiceProvider = deviceAddress.ServiceProvider;
// See if we should prompt the user for the remote address
if (ConnectWizard.ProviderRequiresPort(hostAddress.ServiceProvider))
{
AddressForm addressDialog = new AddressForm(connectionWizard.DefaultPort);
addressDialog.ShowDialog(this);
// If the user cancelled the address form, abort the search
if (addressDialog.DialogResult != DialogResult.OK)
return;
// If a port was specified, add the component
if (addressDialog.Hostname != "")
hostAddress.AddComponent(Address.KeyHostname, addressDialog.Hostname);
// If a hostname was specified, add the component
if (addressDialog.Port > 0)
hostAddress.AddComponent(Address.KeyPort, addressDialog.Port);
}
//Time to enum our hosts
ApplicationDescription desc = new ApplicationDescription();
desc.GuidApplication = connectionWizard.ApplicationGuid;
// If the user was not already asked for address information, DirectPlay
// should prompt with native UI
FindHostsFlags flags = 0;
if (!ConnectWizard.ProviderRequiresPort(deviceAddress.ServiceProvider))
flags = FindHostsFlags.OkToQueryForAddressing;
peer.FindHosts(desc,hostAddress,deviceAddress,null,Timeout.Infinite,0,Timeout.Infinite, flags, out findHostHandle);
isSearching = true;
btnCreate.Enabled = false;
btnSearch.Text = "Stop Search";
}
else
{
btnSearch.Text = "Stopping...";
btnSearch.Enabled = false;
if (findHostHandle != 0)
peer.CancelAsyncOperation(findHostHandle);
}
}
/// <summary>
/// A form was disposed
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void FormDisposed(object sender, EventArgs e)
{
if (sender == createSessionForm)
createSessionForm = null;
}
/// <summary>
/// We should create a new session. Display a dialog allowing the user to set
/// certain options
/// </summary>
private void btnCreate_Click(object sender, System.EventArgs e)
{
this.DialogResult = DialogResult.None;
((Button)sender).DialogResult = DialogResult.None;
if (createSessionForm == null)
{
createSessionForm = new CreateSessionForm(peer,deviceAddress,connectionWizard);
createSessionForm.Disposed += new System.EventHandler(this.FormDisposed);
}
if (createSessionForm.ShowDialog(this) != DialogResult.Cancel)
{
((Button)sender).DialogResult = DialogResult.Yes;
this.DialogResult = DialogResult.Yes;
}
}
/// <summary>
/// Determine if we need to expire any of our currently listed servers
/// </summary>
private void UpdateTimer(object sender, System.Timers.ElapsedEventArgs e)
{
lock (foundHosts)
{
for (int i = 0; i< foundHosts.Count; i++)
{
// First check to see if this session has expired
if (Environment.TickCount - ((FindHostsResponseInformation)foundHosts[i]).LastFoundTime > EnumExpireThreshold)
{
foundHosts.RemoveAt(i);
break;
}
}
for (int i = 0; i< lstSession.Items.Count; i++)
{
// First check to see if this session has expired
if (Environment.TickCount - ((FindHostsResponseInformation)lstSession.Items[i]).LastFoundTime > EnumExpireThreshold)
{
lstSession.Items.RemoveAt(i);
break;
}
}
}
}
/// <summary>
/// Wait for a connect to complete
/// </summary>
private void ConnectTimer(object sender, System.Timers.ElapsedEventArgs e)
{
if (connectEvent.WaitOne(0,false)) // Wait for the Connect event to be fired
{
if (isConnected) // Are we connected?
{
// Get rid of the timer
if (updateListTimer != null)
updateListTimer.Stop();
if (connectTimer != null)
connectTimer.Stop();
this.DialogResult = DialogResult.OK;
this.Close();
return;
}
else
{
MessageBox.Show(this,"Failed to connect. The error code was: \n" + resultCode.ToString() ,"Failed to connect",MessageBoxButtons.OK,MessageBoxIcon.Information);
// Restart our timer
updateListTimer.Start();
}
}
}
/// <summary>
/// Fired when a connect complete message is received from DirectPlay. Fire
/// our event to notify the sample we've connected
/// </summary>
private void ConnectResult(object sender, ConnectCompleteEventArgs e)
{
if (e.Message.ResultCode == 0)
{
isConnected = true;
}
else
isConnected = false;
resultCode = e.Message.ResultCode;
// Notify the timer that we've connected.
connectEvent.Set();
}
/// <summary>
/// Join an existing session
/// </summary>
private void btnJoin_Click(object sender, System.EventArgs e)
{
FindHostsResponseInformation dpInfo;
if (lstSession.SelectedItem == null)
{
MessageBox.Show(this,"Please select a session before clicking join.","No session",MessageBoxButtons.OK,MessageBoxIcon.Information);
return;
}
// Turn off all buttons
btnCreate.Enabled = false;
btnCancel.Enabled = false;
btnJoin.Enabled = false;
btnSearch.Enabled = false;
amJoining = true;
// Stop our secondary timer
updateListTimer.Stop();
dpInfo = ((FindHostsResponseInformation)lstSession.SelectedItem);
connectionWizard.SetUserInfo();
peer.Connect(dpInfo.ApplicationDesc,dpInfo.sender, dpInfo.device,null,ConnectFlags.OkToQueryForAddressing);
// Now start our 'Connect' timer
connectTimer.Start();
}
}

@ -0,0 +1,242 @@
//-----------------------------------------------------------------------------
// File: DPlayConnect_ServiceProviderForm.cs
//
// Desc: Application class for the DirectPlay samples framework.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectPlay;
/// <summary>
/// This form allows you to choose a service provider and username for your
/// sample
/// </summary>
public class ChooseServiceProviderForm : System.Windows.Forms.Form
{
private Peer peer;
private ConnectWizard connectionWizard;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox lstSP;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtUser;
private System.Windows.Forms.Button btnCancel;
/// <summary>
/// Constructor
/// </summary>
public ChooseServiceProviderForm(Peer peerObject, ConnectWizard connectionWizard)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
peer = peerObject;
this.connectionWizard = connectionWizard;
this.Text = connectionWizard.SampleName + " - " + this.Text;
// Fill up our listbox with the service providers
ServiceProviderInformation[] serviceProviders = peer.GetServiceProviders(false);
foreach (ServiceProviderInformation info in serviceProviders)
lstSP.Items.Add(info);
txtUser.Text = null;
//Get the default username from the registry if it exists
Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\DirectX\\SDK\\csDPlay");
if (regKey != null)
{
try
{
txtUser.Text = (string)regKey.GetValue("DirectPlayUserName", null);
lstSP.SelectedIndex = (int)regKey.GetValue("DirectPlaySPIndex", 0);
regKey.Close();
}
catch
{
txtUser.Text = null;
lstSP.SelectedIndex = 0;
}
}
else
lstSP.SelectedIndex = 0;
if ((txtUser.Text == null) || (txtUser.Text == ""))
{
txtUser.Text = SystemInformation.UserName;
}
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool Disposing)
{
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.lstSP = new System.Windows.Forms.ListBox();
this.txtUser = new System.Windows.Forms.TextBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lstSP
//
this.lstSP.Location = new System.Drawing.Point(12, 63);
this.lstSP.Name = "lstSP";
this.lstSP.Size = new System.Drawing.Size(324, 147);
this.lstSP.TabIndex = 1;
this.lstSP.DoubleClick += new System.EventHandler(this.lstSP_DoubleClick);
//
// txtUser
//
this.txtUser.Location = new System.Drawing.Point(13, 20);
this.txtUser.MaxLength = 30;
this.txtUser.Name = "txtUser";
this.txtUser.Size = new System.Drawing.Size(326, 20);
this.txtUser.TabIndex = 5;
this.txtUser.Text = "";
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(181, 215);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(74, 27);
this.btnOK.TabIndex = 2;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(260, 215);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(74, 27);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(11, 44);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(376, 19);
this.label1.TabIndex = 0;
this.label1.Text = "Please pick your service provider:";
//
// label2
//
this.label2.Location = new System.Drawing.Point(10, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(327, 12);
this.label2.TabIndex = 4;
this.label2.Text = "User Name:";
//
// ChooseServiceProviderForm
//
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.AcceptButton = this.btnOK;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(343, 246);
this.ControlBox = false;
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.txtUser,
this.label2,
this.btnCancel,
this.btnOK,
this.lstSP,
this.label1});
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ChooseServiceProviderForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Choose Service Provider";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// They don't want to run this sample
/// </summary>
private void btnCancel_Click(object sender, System.EventArgs e)
{
this.Dispose();
}
/// <summary>
/// Same as clicking ok
/// </summary>
private void lstSP_DoubleClick(object sender, System.EventArgs e)
{
// Call the ok button click handler
object[] parameters = new object[] { sender, e };
this.BeginInvoke(new System.EventHandler(btnOK_Click), parameters);
}
/// <summary>
/// Select this username and service provider if valid, then continue the wizard
/// </summary>
private void btnOK_Click(object sender, System.EventArgs e)
{
if ((txtUser.Text == null) || (txtUser.Text == ""))
{
MessageBox.Show(this,"Please enter a username before clicking OK.","No Username",MessageBoxButtons.OK,MessageBoxIcon.Information);
return;
}
try
{
connectionWizard.ServiceProvider = ((ServiceProviderInformation)lstSP.SelectedItem).Guid;
connectionWizard.Username = txtUser.Text;
}
catch // We assume if we got here there was no selected item.
{
MessageBox.Show(this,"Please select a service provider before clicking OK.","No Service Provider",MessageBoxButtons.OK,MessageBoxIcon.Information);
return;
}
Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\DirectX\\SDK\\csDPlay");
if (regKey != null)
{
regKey.SetValue("DirectPlayUserName", txtUser.Text);
regKey.SetValue("DirectPlaySPIndex", lstSP.SelectedIndex);
regKey.Close();
}
this.Dispose();
}
}

@ -0,0 +1,443 @@
//----------------------------------------------------------------------------
// File: ChatPeer.cs
//
// Desc: The main game file for the ChatPeer sample. It connects
// players together with dialog boxes to prompt users on the
// connection settings to join or create a session. After the user
// connects to a session, the sample displays the chat dialog.
//
// After a new game has started the sample begins a very simplistic
// chat session where users can send text to each other.
//
// This sample Interops with the C++ and VB.NET version of the
// sample as well.
//
// Copyright (c) Microsoft Corp. All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectPlay;
namespace ChatPeerSample
{
/// <summary>
/// Summary description for ChatPeer.
/// </summary>
public class ChatPeer : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblUsers;
private System.Windows.Forms.Button btnSend;
private System.Windows.Forms.TextBox txtChat;
private System.Windows.Forms.TextBox txtSend;
private delegate void PeerCloseCallback(); // This delegate will be called when the session terminated event is fired.
/// <summary>
/// Our players structure
/// </summary>
public struct Players
{
public int playerId;
public string Name;
public Players(int id, string n)
{ playerId = id; Name = n; }
}
private const int MaxChatStringLength = 508;
private const byte ChatMessageId = 1;
private const int DefaultPort = 2502;
// Local variables for this app
public Peer peerObject = null; // Main DPlay object
private ConnectWizard connectWizard = null; // The wizard to create/join a DPlay Session
private ArrayList playerList = new ArrayList();
private int localPlayerId;
// This GUID allows DirectPlay to find other instances of the same game on
// the network. So it must be unique for every game, and the same for
// every instance of that game. // {876A3036-FFD7-46bc-9209-B42F617B9BE7}
// However, we are using the same guid the C++ and VB.NET version of the
// samples use so they can all communicate together.
public Guid localApplicationGuid = new Guid(0x876a3036, 0xffd7, 0x46bc, 0x92, 0x9, 0xb4, 0x2f, 0x61, 0x7b, 0x9b, 0xe7);
/// <summary>
/// Constuctor
/// </summary>
public ChatPeer()
{
try
{
// Load the icon from our resources
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(this.GetType());
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
}
catch
{
// It's no big deal if we can't load our icons, but try to load the embedded one
try { this.Icon = new System.Drawing.Icon(this.GetType(), "directx.ico"); }
catch {}
}
//
// Required for Windows Form Designer support
//
InitializeComponent();
peerObject = new Peer();
// First set up our event handlers (We only need events for the ones we care about)
peerObject.PlayerCreated += new PlayerCreatedEventHandler(this.PlayerCreated);
peerObject.PlayerDestroyed += new PlayerDestroyedEventHandler(this.PlayerDestroyed);
peerObject.HostMigrated += new HostMigratedEventHandler(this.HostMigrated);
peerObject.Receive += new ReceiveEventHandler(this.DataReceived);
peerObject.SessionTerminated += new SessionTerminatedEventHandler(this.SessionTerminated);
connectWizard = new ConnectWizard(peerObject, localApplicationGuid, "Chat Peer");
connectWizard.DefaultPort = DefaultPort;
if (connectWizard.StartWizard())
{
// Great we've connected (or joined).. Now we can start the sample
// Are we the host?
if (connectWizard.IsHost)
this.Text += " (HOST)";
}
else
// We obviously didn't want to start a session
this.Dispose();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
this.Hide();
base.Dispose(disposing);
// Cleanup DPlay
if (peerObject != null)
peerObject.Dispose();
peerObject = null;
}
#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.txtSend = new System.Windows.Forms.TextBox();
this.txtChat = new System.Windows.Forms.TextBox();
this.btnSend = new System.Windows.Forms.Button();
this.lblUsers = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.btnExit = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// txtSend
//
this.txtSend.Location = new System.Drawing.Point(14, 205);
this.txtSend.MaxLength = 508;
this.txtSend.Name = "txtSend";
this.txtSend.Size = new System.Drawing.Size(280, 21);
this.txtSend.TabIndex = 5;
this.txtSend.Text = "";
this.txtSend.TextChanged += new System.EventHandler(this.SendTextChanged);
//
// txtChat
//
this.txtChat.Location = new System.Drawing.Point(15, 45);
this.txtChat.Multiline = true;
this.txtChat.Name = "txtChat";
this.txtChat.ReadOnly = true;
this.txtChat.Size = new System.Drawing.Size(354, 152);
this.txtChat.TabIndex = 3;
this.txtChat.Text = "";
//
// btnSend
//
this.btnSend.Enabled = false;
this.btnSend.Location = new System.Drawing.Point(297, 204);
this.btnSend.Name = "btnSend";
this.btnSend.Size = new System.Drawing.Size(72, 22);
this.btnSend.TabIndex = 4;
this.btnSend.Text = "&Send";
this.btnSend.Click += new System.EventHandler(this.btnSend_Click);
//
// lblUsers
//
this.lblUsers.Location = new System.Drawing.Point(198, 18);
this.lblUsers.Name = "lblUsers";
this.lblUsers.Size = new System.Drawing.Size(37, 14);
this.lblUsers.TabIndex = 1;
this.lblUsers.Text = "0";
this.lblUsers.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtSend);
this.groupBox1.Controls.Add(this.btnSend);
this.groupBox1.Controls.Add(this.txtChat);
this.groupBox1.Controls.Add(this.btnExit);
this.groupBox1.Controls.Add(this.lblUsers);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(9, 6);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(377, 235);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
//
// label1
//
this.label1.Location = new System.Drawing.Point(11, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(183, 14);
this.label1.TabIndex = 0;
this.label1.Text = "Number of people in conversation: ";
//
// btnExit
//
this.btnExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnExit.Location = new System.Drawing.Point(294, 16);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(72, 22);
this.btnExit.TabIndex = 2;
this.btnExit.Text = "E&xit";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// ChatPeer
//
this.AcceptButton = this.btnSend;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
this.CancelButton = this.btnExit;
this.ClientSize = new System.Drawing.Size(394, 253);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ChatPeer";
this.Text = "C# Chat Peer Sample";
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
#region DirectPlayEvents
/// <summary>
/// A player was created
/// </summary>
private void PlayerCreated(object sender, PlayerCreatedEventArgs e)
{
// Get the PlayerInformation and store it
PlayerInformation peerInfo = peerObject.GetPeerInformation(e.Message.PlayerID);
Players oPlayer = new Players(e.Message.PlayerID,peerInfo.Name);
// We lock the data here since it is shared across multiple threads.
lock (playerList)
{
playerList.Add(oPlayer);
// Update our number of players and our button
lblUsers.Text = playerList.Count.ToString();
}
// Save this player id if it's ourselves
if (peerInfo.Local)
localPlayerId = e.Message.PlayerID;
}
/// <summary>
/// A player was destroyed
/// </summary>
private void PlayerDestroyed(object sender, PlayerDestroyedEventArgs e)
{
// Remove this player from our list
// We lock the data here since it is shared across multiple threads.
lock (playerList)
{
foreach (Players player in playerList)
{
if (e.Message.PlayerID == player.playerId)
{
playerList.Remove(player);
break;
}
}
// Update our number of players and our button
lblUsers.Text = playerList.Count.ToString();
}
}
/// <summary>
/// The host was migrated, see if you're the new host
/// </summary>
private void HostMigrated(object sender, HostMigratedEventArgs e)
{
if (localPlayerId == e.Message.NewHostID)
{
// I'm the new host, update my UI
this.Text += " (HOST)";
}
}
/// <summary>
/// We've received data, parse it
/// </summary>
private void DataReceived(object sender, ReceiveEventArgs e)
{
if ((byte)e.Message.ReceiveData.Read(typeof(byte)) == ChatMessageId) // We've received text chat
{
// We won't be using the helper functions here since we want to
// interop with the c++ version of the app. It packages it's messages
// up with the first byte being the msg id (ChatMessageId), and
// the next xxx bytes as an ANSI string.
// Get the default ASCII decoder
System.Text.Decoder dec = System.Text.Encoding.ASCII.GetDecoder();
int length = (int)e.Message.ReceiveData.Length - 1;
// Create a char array of the right length
byte[] data = (byte[])e.Message.ReceiveData.Read(typeof(byte), length);
char[] c = new char[dec.GetCharCount(data, 0, length)];
// Get the actual decoded characters
dec.GetChars(data, 0, length, c, 0);
// Now we can use the string builder to actually build our string
System.Text.StringBuilder sb = new System.Text.StringBuilder(c.Length);
sb.Insert(0, c, 0, dec.GetCharCount(data, 0, length));
string sChatText = sb.ToString(); // The actual chat text
// Now build the string we will be displaying to the user:
string sChatString = "<" + GetPlayerName(e.Message.SenderID) + "> " + sChatText;
// Now update our text
lock(txtChat)
{
if (txtChat.Text.Length > (txtChat.MaxLength * 0.95))
txtChat.Text = txtChat.Text.Remove(0, (int)(txtChat.MaxLength / 2));
txtChat.AppendText(sChatString);
txtChat.AppendText("\r\n");
txtChat.SelectionStart = txtChat.Text.Length;
txtChat.ScrollToCaret();
}
}
e.Message.ReceiveData.Dispose(); // We no longer need the data, Dispose the buffer
}
/// <summary>
/// The session was terminated
/// </summary>
private void SessionTerminated(object sender, SessionTerminatedEventArgs e)
{
// Well, this session is being terminated, let the user know
if (e.Message.ResultCode == ResultCode.HostTerminatedSession)
MessageBox.Show("The Host has terminated this session. This sample will now exit.", "Exiting", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("The session has been lost. This sample will now exit.", "Exiting", MessageBoxButtons.OK, MessageBoxIcon.Information);
// This will post a message on the main thread to shut down our form
this.BeginInvoke(new PeerCloseCallback(this.PeerClose));
}
#endregion
/// <summary>
/// Exit the application
/// </summary>
private void btnExit_Click(object sender, System.EventArgs e)
{
// Exit the application
this.Dispose();
}
/// <summary>
/// This will return a players name based on the ID of that player
/// </summary>
private string GetPlayerName(int idPlayer)
{
lock (playerList)
{
foreach (Players p in playerList)
{
if (p.playerId == idPlayer)
return p.Name;
}
}
return null;
}
/// <summary>
/// Fired when the text to send has been changed
/// </summary>
private void SendTextChanged(object sender, System.EventArgs e)
{
btnSend.Enabled = (((TextBox)sender).Text.Length > 0);
}
/// <summary>
/// We want to send our chat message
/// </summary>
private void btnSend_Click(object sender, System.EventArgs e)
{
// Ok, we need to package up the text into a format
// that the c++ version of the sample expects since
// we are interop'ing with it.
int strlen = System.Text.Encoding.ASCII.GetByteCount(txtSend.Text);
NetworkPacket data = new NetworkPacket();
byte[] stringdata = new byte[strlen]; // Create our buffer
data.Write(ChatMessageId); // Set the msg type
//Now fill up the rest of the byte array with the ASCII chars of the string
System.Text.Encoding.ASCII.GetBytes(txtSend.Text, 0, strlen, stringdata, 0);
data.Write(stringdata);
// Now we've got the data setup, send it off.
peerObject.SendTo((int)PlayerID.AllPlayers, data, 0, SendFlags.Guaranteed);
// Now that we've sent out the text, clear it
txtSend.Text = null;
}
/// <summary>
/// Shut down the sample
/// </summary>
public void PeerClose()
{
// The session was terminated, go ahead and shut down
this.Dispose();
}
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
using (ChatPeer wfData = new ChatPeer())
{
try
{
Application.Run(wfData);
}
catch{}
}
}
}
}

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chat2", "Chat2\Chat2.csproj", "{A17F9B44-A98F-4779-8C88-E75074567C07}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A17F9B44-A98F-4779-8C88-E75074567C07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A17F9B44-A98F-4779-8C88-E75074567C07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A17F9B44-A98F-4779-8C88-E75074567C07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A17F9B44-A98F-4779-8C88-E75074567C07}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

@ -0,0 +1,121 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50215</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A17F9B44-A98F-4779-8C88-E75074567C07}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Chat</RootNamespace>
<AssemblyName>Chat2</AssemblyName>
<IsWebBootstrapper>true</IsWebBootstrapper>
<PublishUrl>http://localhost/Chat2/</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationVersion>1.0.0.*</ApplicationVersion>
<BootstrapperEnabled>true</BootstrapperEnabled>
<ApplicationIcon>TextFile.ico</ApplicationIcon>
</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>
</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>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<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="Hilfe.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Hilfe.Designer.cs">
<DependentUpon>Hilfe.cs</DependentUpon>
</Compile>
<Compile Include="Main.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main.Designer.cs">
<DependentUpon>Main.cs</DependentUpon>
</Compile>
<Compile Include="PrivateChat.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PrivateChat.Designer.cs">
<DependentUpon>PrivateChat.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Hilfe.resx">
<DependentUpon>Hilfe.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Main.resx">
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PrivateChat.resx">
<DependentUpon>PrivateChat.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="app.config" />
<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>
<Compile Include="Settings.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<InProject>False</InProject>
<ProductName>.NET Framework 2.0 Beta</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="Resources\notify.wav" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\transmission.wav" />
</ItemGroup>
<ItemGroup>
<Content Include="TextFile.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,17 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastOpenVersion>8.0.50215</LastOpenVersion>
<PublishUrlHistory>http://localhost/Chat2/</PublishUrlHistory>
<InstallUrlHistory>
</InstallUrlHistory>
<SupportUrlHistory>
</SupportUrlHistory>
<UpdateUrlHistory>
</UpdateUrlHistory>
<BootstrapperUrlHistory>
</BootstrapperUrlHistory>
<ApplicationRevision>0</ApplicationRevision>
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>true</VerifyUploadedFiles>
</PropertyGroup>
</Project>

@ -0,0 +1,61 @@
namespace Chat
{
partial class Hilfe
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Hilfe));
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.SuspendLayout();
//
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(527, 330);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = resources.GetString("richTextBox1.Text");
//
// Hilfe
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(527, 330);
this.Controls.Add(this.richTextBox1);
this.Name = "Hilfe";
this.Text = "Hilfe";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.RichTextBox richTextBox1;
}
}

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Chat
{
public partial class Hilfe : Form
{
public Hilfe()
{
InitializeComponent();
}
}
}

@ -0,0 +1,146 @@
<?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: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: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: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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="richTextBox1.Text">
<value xml:space="preserve">Willkommen bei der Chat 2.1 Hilfe!
1. Erste Schritte
Um eine einfache Kommunikation mit anderen Teilnehmern zu gewährleisten stellen Sie bitte einen eindeutigen Benutzernamen und eine gut erkennbare Farbe für ihre Nachrichten ein. Ihre Einstellungen werden nach Beenden des Programms gespeichert und sind beim nächsten Start sofort wieder verfügbar.
Alle von ihnen eingegebenen Nachrichten werden durch Bestätigung mit der Eingabetaste oder einen Klick auf "Senden" ausnahmslos an alle aktiven Benutzer gesendet.
Eine alle fünf Sekunden aktualisierte Übersicht aller aktiven Benutzer erhalten Sie an der rechten Seite.
2. Private Nachrichten
Sollen Nachrichten nur an bestimmte Benutzer gesendet werden, so tun sie dies indem sie vor ihre Nachricht ein "PRIV Benutzername" setzen, wobei sie für Benutzername die Zielperson eintragen.
Beispiel: "PRIV JoSch Hallo!"
Wollen sie Nachrichten an mehrere Benutzer schicken, so geben sie diese durch Pluszeichen voneinander getrennt an.
Beispiel: "PRIV JoSch+Law Hallo Leute!"
Wollen Sie nicht ständig "PRIV" gefolgt von den Benutzernamen eintippen, so können Sie diese Arbeit automatisieren indem sie in der Liste der aktiven Benutzer am rechten Rand alle Benutzer mit einem Häkchen versehen, an die Sie senden wollen und danach auf "PRIV" klicken. Das Programm wird dann automatisch den entsprechenden Nachrichtenanfang für Sie generieren.
Jeder Benutzer dem Sie eine private Nachricht schreiben erhält genau die von Ihnen eingetippte Zeile. Er kann also erkennen, dass diese Nachricht nur er liest oder ablesen wer ebenfalls die selbe Nachricht bekommen hat.
Beispiel: "JoSch (20:12:56): PRIV Law+Taires+HC Zocken?"
Diese Nachricht werden alle angegebenen Benutzer erhalten und somit sehen können von wem sie ist und wer sie ebenfalls erhalten hat.
3. Akustische Bemerkungen
Ist ein als aktiv angezeigter Benutzer anscheinend nicht erreichbar, so können Sie diesen durch eine akustische Nachricht auf sich aufmerksam machen.
4. L33T</value>
</data>
</root>

@ -0,0 +1,425 @@
namespace Chat
{
partial class Chat22
{
/// <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();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Chat22));
this.Sendbtn = new System.Windows.Forms.Button();
this.InputTextBox = new System.Windows.Forms.TextBox();
this.tbUsername = new System.Windows.Forms.TextBox();
this.btnColor = new System.Windows.Forms.Button();
this.cbL33T = new System.Windows.Forms.CheckBox();
this.ColorDlg = new System.Windows.Forms.ColorDialog();
this.lvOnline = new System.Windows.Forms.ListView();
this.Sendstatus = new System.Windows.Forms.Timer(this.components);
this.CheckTimeouts = new System.Windows.Forms.Timer(this.components);
this.pColor = new System.Windows.Forms.Panel();
this.btnPRIV = new System.Windows.Forms.Button();
this.btnWAKE = new System.Windows.Forms.Button();
this.llHilfe = new System.Windows.Forms.LinkLabel();
this.btnClear = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.cbSilent = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.lOpazität = new System.Windows.Forms.Label();
this.nUDOpacity = new System.Windows.Forms.NumericUpDown();
this.cbAlwaysOnTop = new System.Windows.Forms.CheckBox();
this.OutputTextBox = new System.Windows.Forms.RichTextBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.silentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hauptfensteranzeigenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.chatbeendenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDOpacity)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// Sendbtn
//
this.Sendbtn.Dock = System.Windows.Forms.DockStyle.Fill;
this.Sendbtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Sendbtn.Location = new System.Drawing.Point(0, 0);
this.Sendbtn.Name = "Sendbtn";
this.Sendbtn.Size = new System.Drawing.Size(569, 69);
this.Sendbtn.TabIndex = 0;
this.Sendbtn.Text = "senden";
this.Sendbtn.Click += new System.EventHandler(this.Sendbtn_Click);
//
// InputTextBox
//
this.InputTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.InputTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.InputTextBox.Location = new System.Drawing.Point(0, 0);
this.InputTextBox.Multiline = true;
this.InputTextBox.Name = "InputTextBox";
this.InputTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.InputTextBox.Size = new System.Drawing.Size(569, 69);
this.InputTextBox.TabIndex = 0;
//
// tbUsername
//
this.tbUsername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbUsername.Location = new System.Drawing.Point(3, 29);
this.tbUsername.Name = "tbUsername";
this.tbUsername.Size = new System.Drawing.Size(146, 20);
this.tbUsername.TabIndex = 3;
//
// btnColor
//
this.btnColor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnColor.Location = new System.Drawing.Point(74, 57);
this.btnColor.Name = "btnColor";
this.btnColor.Size = new System.Drawing.Size(75, 20);
this.btnColor.TabIndex = 4;
this.btnColor.Text = "Farbe";
this.btnColor.Click += new System.EventHandler(this.btnColor_Click);
//
// cbL33T
//
this.cbL33T.AutoSize = true;
this.cbL33T.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbL33T.Location = new System.Drawing.Point(3, 83);
this.cbL33T.Name = "cbL33T";
this.cbL33T.Size = new System.Drawing.Size(44, 17);
this.cbL33T.TabIndex = 5;
this.cbL33T.Text = "L33T";
//
// ColorDlg
//
this.ColorDlg.AnyColor = true;
this.ColorDlg.FullOpen = true;
//
// lvOnline
//
this.lvOnline.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lvOnline.CheckBoxes = true;
this.lvOnline.FullRowSelect = true;
this.lvOnline.Location = new System.Drawing.Point(3, 107);
this.lvOnline.MultiSelect = false;
this.lvOnline.Name = "lvOnline";
this.lvOnline.Size = new System.Drawing.Size(146, 284);
this.lvOnline.TabIndex = 6;
this.lvOnline.View = System.Windows.Forms.View.List;
this.lvOnline.DoubleClick += new System.EventHandler(this.lvOnline_DoubleClick);
//
// Sendstatus
//
this.Sendstatus.Enabled = true;
this.Sendstatus.Interval = 5000;
this.Sendstatus.Tick += new System.EventHandler(this.Sendstatus_Tick);
//
// CheckTimeouts
//
this.CheckTimeouts.Enabled = true;
this.CheckTimeouts.Interval = 15000;
this.CheckTimeouts.Tick += new System.EventHandler(this.CheckTimeouts_Tick);
//
// pColor
//
this.pColor.Location = new System.Drawing.Point(3, 56);
this.pColor.Name = "pColor";
this.pColor.Size = new System.Drawing.Size(65, 21);
this.pColor.TabIndex = 9;
//
// btnPRIV
//
this.btnPRIV.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPRIV.Location = new System.Drawing.Point(3, 397);
this.btnPRIV.Name = "btnPRIV";
this.btnPRIV.Size = new System.Drawing.Size(66, 20);
this.btnPRIV.TabIndex = 10;
this.btnPRIV.Text = "PRIV";
this.btnPRIV.Click += new System.EventHandler(this.btnPRIV_Click);
//
// btnWAKE
//
this.btnWAKE.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWAKE.Location = new System.Drawing.Point(88, 397);
this.btnWAKE.Name = "btnWAKE";
this.btnWAKE.Size = new System.Drawing.Size(61, 20);
this.btnWAKE.TabIndex = 11;
this.btnWAKE.Text = "WAKE";
this.btnWAKE.Click += new System.EventHandler(this.btnWAKE_Click);
//
// llHilfe
//
this.llHilfe.AutoSize = true;
this.llHilfe.Location = new System.Drawing.Point(125, 85);
this.llHilfe.Name = "llHilfe";
this.llHilfe.Size = new System.Drawing.Size(24, 13);
this.llHilfe.TabIndex = 12;
this.llHilfe.TabStop = true;
this.llHilfe.Text = "Hilfe";
this.llHilfe.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llHilfe_LinkClicked);
//
// btnClear
//
this.btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClear.Location = new System.Drawing.Point(3, 3);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(65, 20);
this.btnClear.TabIndex = 13;
this.btnClear.Text = "Clear";
//
// btnSave
//
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.Location = new System.Drawing.Point(74, 3);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(75, 20);
this.btnSave.TabIndex = 14;
this.btnSave.Text = "Save";
//
// cbSilent
//
this.cbSilent.AutoSize = true;
this.cbSilent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbSilent.Location = new System.Drawing.Point(61, 84);
this.cbSilent.Name = "cbSilent";
this.cbSilent.Size = new System.Drawing.Size(45, 17);
this.cbSilent.TabIndex = 15;
this.cbSilent.Text = "Silent";
this.cbSilent.CheckedChanged += new System.EventHandler(this.cbSilent_CheckedChanged);
//
// panel1
//
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.lOpazität);
this.panel1.Controls.Add(this.nUDOpacity);
this.panel1.Controls.Add(this.cbAlwaysOnTop);
this.panel1.Controls.Add(this.btnClear);
this.panel1.Controls.Add(this.cbSilent);
this.panel1.Controls.Add(this.tbUsername);
this.panel1.Controls.Add(this.btnColor);
this.panel1.Controls.Add(this.btnSave);
this.panel1.Controls.Add(this.cbL33T);
this.panel1.Controls.Add(this.llHilfe);
this.panel1.Controls.Add(this.lvOnline);
this.panel1.Controls.Add(this.btnWAKE);
this.panel1.Controls.Add(this.pColor);
this.panel1.Controls.Add(this.btnPRIV);
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
this.panel1.Location = new System.Drawing.Point(571, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(152, 468);
this.panel1.TabIndex = 16;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(110, 446);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(11, 13);
this.label1.TabIndex = 19;
this.label1.Text = "%";
//
// lOpazität
//
this.lOpazität.AutoSize = true;
this.lOpazität.Location = new System.Drawing.Point(6, 446);
this.lOpazität.Name = "lOpazität";
this.lOpazität.Size = new System.Drawing.Size(45, 13);
this.lOpazität.TabIndex = 18;
this.lOpazität.Text = "Opazität:";
//
// nUDOpacity
//
this.nUDOpacity.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nUDOpacity.Increment = new decimal(new int[] {
5,
0,
0,
0});
this.nUDOpacity.Location = new System.Drawing.Point(57, 446);
this.nUDOpacity.Minimum = new decimal(new int[] {
15,
0,
0,
0});
this.nUDOpacity.Name = "nUDOpacity";
this.nUDOpacity.Size = new System.Drawing.Size(47, 20);
this.nUDOpacity.TabIndex = 17;
this.nUDOpacity.Value = new decimal(new int[] {
100,
0,
0,
0});
this.nUDOpacity.ValueChanged += new System.EventHandler(this.nUDOpacity_ValueChanged);
//
// cbAlwaysOnTop
//
this.cbAlwaysOnTop.AutoSize = true;
this.cbAlwaysOnTop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbAlwaysOnTop.Location = new System.Drawing.Point(3, 423);
this.cbAlwaysOnTop.Name = "cbAlwaysOnTop";
this.cbAlwaysOnTop.Size = new System.Drawing.Size(85, 17);
this.cbAlwaysOnTop.TabIndex = 16;
this.cbAlwaysOnTop.Text = "Always on top";
this.cbAlwaysOnTop.CheckedChanged += new System.EventHandler(this.cbAlwaysOnTop_CheckedChanged);
//
// OutputTextBox
//
this.OutputTextBox.BackColor = System.Drawing.SystemColors.Window;
this.OutputTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.OutputTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.OutputTextBox.Location = new System.Drawing.Point(0, 0);
this.OutputTextBox.Name = "OutputTextBox";
this.OutputTextBox.ReadOnly = true;
this.OutputTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical;
this.OutputTextBox.Size = new System.Drawing.Size(569, 391);
this.OutputTextBox.TabIndex = 18;
this.OutputTextBox.Text = "";
//
// splitContainer1
//
this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.OutputTextBox);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.InputTextBox);
this.splitContainer1.Panel2.Controls.Add(this.Sendbtn);
this.splitContainer1.Size = new System.Drawing.Size(571, 468);
this.splitContainer1.SplitterDistance = 393;
this.splitContainer1.TabIndex = 19;
this.splitContainer1.Text = "splitContainer1";
//
// notifyIcon1
//
this.notifyIcon1.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "Chat 2.2";
this.notifyIcon1.Visible = true;
this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick);
this.notifyIcon1.BalloonTipClicked += new System.EventHandler(this.notifyIcon1_BalloonTipClicked);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Enabled = true;
this.contextMenuStrip1.GripMargin = new System.Windows.Forms.Padding(2);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.silentToolStripMenuItem,
this.hauptfensteranzeigenToolStripMenuItem,
this.chatbeendenToolStripMenuItem});
this.contextMenuStrip1.Location = new System.Drawing.Point(79, 59);
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.contextMenuStrip1.Size = new System.Drawing.Size(174, 70);
//
// silentToolStripMenuItem
//
this.silentToolStripMenuItem.CheckOnClick = true;
this.silentToolStripMenuItem.Name = "silentToolStripMenuItem";
this.silentToolStripMenuItem.Text = "Silent";
this.silentToolStripMenuItem.CheckedChanged += new System.EventHandler(this.silentToolStripMenuItem_CheckedChanged);
//
// hauptfensteranzeigenToolStripMenuItem
//
this.hauptfensteranzeigenToolStripMenuItem.Name = "hauptfensteranzeigenToolStripMenuItem";
this.hauptfensteranzeigenToolStripMenuItem.Text = "Hauptfenster anzeigen";
this.hauptfensteranzeigenToolStripMenuItem.Click += new System.EventHandler(this.hauptfensteranzeigenToolStripMenuItem_Click);
//
// chatbeendenToolStripMenuItem
//
this.chatbeendenToolStripMenuItem.Name = "chatbeendenToolStripMenuItem";
this.chatbeendenToolStripMenuItem.Text = "Chat beenden";
this.chatbeendenToolStripMenuItem.Click += new System.EventHandler(this.chatbeendenToolStripMenuItem_Click);
//
// Chat22
//
this.AcceptButton = this.Sendbtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(723, 468);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Chat22";
this.Text = "Chat 2.2.1";
this.Shown += new System.EventHandler(this.Chat21_Shown);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Chat_FormClosing);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDOpacity)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
this.splitContainer1.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button Sendbtn;
private System.Windows.Forms.TextBox InputTextBox;
private System.Windows.Forms.TextBox tbUsername;
private System.Windows.Forms.Button btnColor;
private System.Windows.Forms.CheckBox cbL33T;
private System.Windows.Forms.ColorDialog ColorDlg;
private System.Windows.Forms.ListView lvOnline;
private System.Windows.Forms.Timer Sendstatus;
private System.Windows.Forms.Timer CheckTimeouts;
private System.Windows.Forms.Panel pColor;
private System.Windows.Forms.Button btnPRIV;
private System.Windows.Forms.Button btnWAKE;
private System.Windows.Forms.LinkLabel llHilfe;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.CheckBox cbSilent;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.RichTextBox OutputTextBox;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem chatbeendenToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem hauptfensteranzeigenToolStripMenuItem;
private System.Windows.Forms.CheckBox cbAlwaysOnTop;
private System.Windows.Forms.Label lOpazität;
private System.Windows.Forms.NumericUpDown nUDOpacity;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ToolStripMenuItem silentToolStripMenuItem;
}
}

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -0,0 +1,116 @@
namespace Chat
{
partial class PrivateChat
{
/// <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.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.bSenden = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.richTextBox1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.textBox1);
this.splitContainer1.Panel2.Controls.Add(this.bSenden);
this.splitContainer1.Size = new System.Drawing.Size(475, 472);
this.splitContainer1.SplitterDistance = 397;
this.splitContainer1.TabIndex = 0;
this.splitContainer1.Text = "splitContainer1";
//
// richTextBox1
//
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical;
this.richTextBox1.Size = new System.Drawing.Size(473, 395);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
// bSenden
//
this.bSenden.Location = new System.Drawing.Point(364, 43);
this.bSenden.Name = "bSenden";
this.bSenden.Size = new System.Drawing.Size(8, 8);
this.bSenden.TabIndex = 0;
this.bSenden.Text = "button1";
this.bSenden.Click += new System.EventHandler(this.bSenden_Click);
//
// textBox1
//
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Location = new System.Drawing.Point(0, 0);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox1.Size = new System.Drawing.Size(473, 69);
this.textBox1.TabIndex = 1;
//
// PrivateChat
//
this.AcceptButton = this.bSenden;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(475, 472);
this.Controls.Add(this.splitContainer1);
this.Name = "PrivateChat";
this.Text = "PrivateChat";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button bSenden;
private System.Windows.Forms.TextBox textBox1;
}
}

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Chat
{
public partial class PrivateChat : Form
{
public PrivateChat()
{
InitializeComponent();
}
private void bSenden_Click(object sender, EventArgs e)
{
}
}
}

@ -0,0 +1,117 @@
<?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: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: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: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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,33 @@
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("Chat")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Chat")]
[assembly: AssemblyCopyright("Copyright © 2005")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM componenets. 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("facf2ae1-0036-4bb2-bcfc-0686c24db7e0")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,77 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50215.44
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Chat.Properties.Resources.get_ResourceManager():System.Resources.ResourceManager")]
[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Chat.Properties.Resources.get_Culture():System.Globalization.CultureInfo")]
[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Chat.Properties.Resources.set_Culture(System.Globalization.CultureInfo):Void")]
namespace Chat.Properties {
/// <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.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 ((resourceMan == null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Chat.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.IO.UnmanagedMemoryStream notify {
get {
return ResourceManager.GetStream("notify", resourceCulture);
}
}
internal static System.IO.UnmanagedMemoryStream transmission {
get {
return ResourceManager.GetStream("transmission", resourceCulture);
}
}
}
}

@ -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: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: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: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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="notify" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\notify.wav;System.IO.MemoryStream, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="transmission" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\transmission.wav;System.IO.MemoryStream, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

@ -0,0 +1,51 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50215.44
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="Chat.Properties.Settings.get_Default():Chat.Properties.Settings")]
namespace Chat.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = new Settings();
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Black")]
public global::System.Drawing.Color color {
get {
return ((global::System.Drawing.Color)(this["color"]));
}
set {
this["color"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("JoSch")]
public string username {
get {
return ((string)(this["username"]));
}
set {
this["username"] = value;
}
}
}
}

@ -0,0 +1,14 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Chat.Properties" GeneratedClassName="Settings">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings>
<Setting Name="color" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Black</Value>
</Setting>
<Setting Name="username" Type="System.String" Scope="User">
<Value Profile="(Default)">JoSch</Value>
</Setting>
</Settings>
</SettingsFile>

Binary file not shown.

@ -0,0 +1,28 @@
namespace Chat.Properties {
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
internal sealed partial class Settings {
public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Chat.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" />
</sectionGroup>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Chat.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
</configSections>
<userSettings>
<Chat.Properties.Settings>
<setting name="color" serializeAs="String">
<value>Black</value>
</setting>
<setting name="username" serializeAs="String">
<value>JoSch</value>
</setting>
</Chat.Properties.Settings>
</userSettings>
<applicationSettings>
<Chat.Properties.Settings />
</applicationSettings>
</configuration>

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace Chat
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Chat22());
}
}
}

@ -0,0 +1,32 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

@ -0,0 +1,16 @@
<Combine fileversion="1.0" name="CheckMail" description="">
<StartMode startupentry="CheckMail" single="True">
<Execute entry="CheckMail" type="None" />
</StartMode>
<Entries>
<Entry filename=".\CheckMail.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="CheckMail" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="CheckMail" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

@ -0,0 +1,26 @@
<Project name="CheckMail" standardNamespace="CheckMail" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\MainForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CheckMail.MainForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
</Contents>
<References />
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Debug" assembly="CheckMail" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Debug">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Debug" assembly="CheckMail" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory=".\bin\Release" assembly="CheckMail" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

@ -0,0 +1,333 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 10.06.2005
* Time: 12:55
*/
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
namespace CheckMail
{
/// <summary>
/// Description of MainForm.
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components;
private System.Windows.Forms.ListBox lbMsgDetails;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnLogin;
private System.Windows.Forms.ListBox lbFolders;
private System.Windows.Forms.Button btnGetFolderList;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.Button btnLogout;
private TcpClient cl = null;
private NetworkStream str = null;
private int neueEmails = 0;
public MainForm()
{
InitializeComponent();
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm());
}
private void DoStuff()
{
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
this.btnLogout = new System.Windows.Forms.Button();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.btnOK = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.btnGetFolderList = new System.Windows.Forms.Button();
this.lbFolders = new System.Windows.Forms.ListBox();
this.btnLogin = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.lbMsgDetails = new System.Windows.Forms.ListBox();
this.SuspendLayout();
//
// btnLogout
//
this.btnLogout.Location = new System.Drawing.Point(176, 8);
this.btnLogout.Name = "btnLogout";
this.btnLogout.TabIndex = 4;
this.btnLogout.Text = "Logout";
this.btnLogout.Click += new System.EventHandler(this.BtnLogoutClick);
//
// notifyIcon1
//
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "notifyIcon1";
this.notifyIcon1.Visible = true;
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(568, 536);
this.btnOK.Name = "btnOK";
this.btnOK.TabIndex = 7;
this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.BtnOKClick);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(24, 40);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(304, 376);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "";
//
// btnGetFolderList
//
this.btnGetFolderList.Location = new System.Drawing.Point(528, 8);
this.btnGetFolderList.Name = "btnGetFolderList";
this.btnGetFolderList.Size = new System.Drawing.Size(104, 23);
this.btnGetFolderList.TabIndex = 5;
this.btnGetFolderList.Text = "Get Folder List";
this.btnGetFolderList.Click += new System.EventHandler(this.BtnGetFolderListClick);
//
// lbFolders
//
this.lbFolders.Location = new System.Drawing.Point(368, 48);
this.lbFolders.Name = "lbFolders";
this.lbFolders.Size = new System.Drawing.Size(296, 368);
this.lbFolders.TabIndex = 2;
//
// btnLogin
//
this.btnLogin.Location = new System.Drawing.Point(24, 8);
this.btnLogin.Name = "btnLogin";
this.btnLogin.TabIndex = 0;
this.btnLogin.Text = "Login";
this.btnLogin.Click += new System.EventHandler(this.BtnLoginClick);
//
// label1
//
this.label1.Location = new System.Drawing.Point(24, 536);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(208, 24);
this.label1.TabIndex = 8;
this.label1.Text = "Neue Emails:";
//
// button2
//
this.button2.Location = new System.Drawing.Point(400, 8);
this.button2.Name = "button2";
this.button2.TabIndex = 3;
this.button2.Text = "Angelika";
this.button2.Click += new System.EventHandler(this.Button2Click);
//
// lbMsgDetails
//
this.lbMsgDetails.Location = new System.Drawing.Point(24, 432);
this.lbMsgDetails.Name = "lbMsgDetails";
this.lbMsgDetails.Size = new System.Drawing.Size(640, 95);
this.lbMsgDetails.TabIndex = 6;
//
// MainForm
//
this.AcceptButton = this.btnOK;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(712, 567);
this.ControlBox = false;
this.Controls.Add(this.label1);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.lbMsgDetails);
this.Controls.Add(this.btnGetFolderList);
this.Controls.Add(this.btnLogout);
this.Controls.Add(this.button2);
this.Controls.Add(this.lbFolders);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.btnLogin);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "MainForm";
this.Text = "MainForm";
this.Closed += new System.EventHandler(this.MainFormClosed);
this.ResumeLayout(false);
}
#endregion
void BtnLoginClick(object sender, System.EventArgs e)
{
textBox1.Text += Connect();
textBox1.Text += SendCommand("? LOGIN J.Schauer porenta\r\n");
}
string SendCommand(string command)
{
byte[] send = Encoding.ASCII.GetBytes(command);
str.Write(send, 0, send.Length);
byte[] receive = new byte[4096];
int k = str.Read(receive, 0, receive.Length);
string msg = "";
for(int i = 0; i<k; i++)
{
msg += Convert.ToChar(receive[i]).ToString();
}
return msg;
}
string Connect()
{
cl = new TcpClient("imap.web.de", 143);
str = cl.GetStream();
byte[] buffer = new byte[4096];
int k = str.Read(buffer, 0, buffer.Length);
string msg = "";
for(int i = 0; i<k; i++)
{
msg += Convert.ToChar(buffer[i]).ToString();
}
return msg;
}
void MainFormClosed(object sender, System.EventArgs e)
{
notifyIcon1.Dispose();
if(str!=null)
{
str.Close();
}
if(cl!=null)
{
cl.Close();
}
}
void Button2Click(object sender, System.EventArgs e)
{
}
int[] GetUnreadIDs(string folder)
{
SendCommand("? SELECT "+folder+"\r\n");
string response = SendCommand("? SEARCH UNSEEN\r\n");
if(response.Length > 34)
{
response = response.Remove(0,9);
response = response.Remove(response.Length-25, 25);
string[] collection = response.Split(' ');
int[] IDs = new int[collection.Length];
if(collection.Length>0)
{
for(int i=0; i<collection.Length; i++)
{
IDs[i] = int.Parse(collection[i]);
}
}
return IDs;
}
return null;
}
string GetMailSubject(string folder, int ID)
{
return "Betreff";
}
string GetMailFrom(string folder, int ID)
{
return "Angelika.Fertig@web.de";
}
void GetFolderList()
{
neueEmails = 0;
lbFolders.Items.Clear();
string list = SendCommand("? LIST \"\" *\r\n");
list = list.Remove(list.Length-22,22);
string[] collection = list.Split('\n');
for(int i = 0; i<collection.Length; i++)
{
collection[i] = collection[i].Remove(0, 27);
collection[i] = collection[i].Remove(collection[i].Length-2, 2);
if(collection[i]!="Unerw&APw-nscht")
{
int[] IDs = GetUnreadIDs(collection[i]);
if(IDs!=null)
{
UpdateUnreadMsgDetails(collection[i], IDs);
collection[i] += " ("+IDs.Length.ToString()+")";
neueEmails += IDs.Length;
label1.Text = "Neue Emails: " +neueEmails.ToString();
}
lbFolders.Items.Add(collection[i]);
}
}
}
void UpdateUnreadMsgDetails(string folder, int[] IDs)
{
lbMsgDetails.Items.Clear();
textBox1.Text += SendCommand("? SELECT "+folder+"\r\n");
for(int i = 0; i<IDs.Length; i++)
{
string sender = SendCommand("? FETCH "+IDs[i]+" (FLAGS BODY[HEADER.FIELDS (SENDER)])\r\n");
Regex re1 = new Regex("Sender: (?<sender>\\S+)", RegexOptions.IgnoreCase);
Match m1 = re1.Match(sender);
sender = m1.Groups["sender"].Value;
string subject = SendCommand("? FETCH "+IDs[i]+" (FLAGS BODY[HEADER.FIELDS (SUBJECT)])\r\n");
Regex re2 = new Regex("Subject: (?<subject>\\S+)", RegexOptions.IgnoreCase);
Match m2 = re2.Match(subject);
subject = m2.Groups["subject"].Value;
SendCommand("? STORE "+IDs[i]+" -FLAGS (\\SEEN)\r\n");
lbMsgDetails.Items.Add(sender+" "+subject);
}
}
void BtnLogoutClick(object sender, System.EventArgs e)
{
textBox1.Text += SendCommand("? LOGOUT\r\n");
str.Close();
cl.Close();
}
void BtnGetFolderListClick(object sender, System.EventArgs e)
{
Thread t = new Thread(new ThreadStart(GetFolderList));
t.Start();
}
void BtnOKClick(object sender, System.EventArgs e)
{
this.Close();
}
}
}

@ -0,0 +1,109 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 11.06.2005
* Time: 09:50
*/
using System;
using System.Runtime.InteropServices;
namespace CheckMail
{
/// <summary>
/// Description of NotifyIcon.
/// </summary>
public class NotifyIcon
{
[StructLayout(LayoutKind.Sequential)]
public struct NotifyIconData
{
public System.UInt32 cbSize; // DWORD
public System.IntPtr hWnd; // HWND
public System.UInt32 uID; // UINT
public NotifyFlags uFlags; // UINT
public System.UInt32 uCallbackMessage; // UINT
public System.IntPtr hIcon; // HICON
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)]
public System.String szTip; // char[128]
public System.UInt32 dwState; // DWORD
public System.UInt32 dwStateMask; // DWORD
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=256)]
public System.String szInfo; // char[256]
public System.UInt32 uTimeoutOrVersion; // UINT
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)]
public System.String szInfoTitle; // char[64]
public System.UInt32 dwInfoFlags; // DWORD
//GUID guidItem; > IE 6
}
public enum NotifyCommand {Add = 0, Modify = 1, Delete = 2, SetFocus = 3,
SetVersion = 4}
public enum NotifyFlags {Message = 1, Icon = 2, Tip = 4, State = 8, Info = 16,
Guid = 32}
[DllImport("shell32.Dll")]
public static extern System.Int32 Shell_NotifyIcon(NotifyCommand cmd,
ref NotifyIconData data);
[DllImport("Kernel32.Dll")]
public static extern System.UInt32 GetCurrentThreadId();
public delegate System.Int32 EnumThreadWndProc(System.IntPtr hWnd,
System.UInt32 lParam);
[DllImport("user32.Dll")]
public static extern System.Int32 EnumThreadWindows(System.UInt32 threadId,
EnumThreadWndProc callback,
System.UInt32 param);
[DllImport("user32.Dll")]
public static extern System.Int32 GetClassName(System.IntPtr hWnd,
System.Text.StringBuilder className,
System.Int32 maxCount);
private System.IntPtr m_notifyWindow;
private bool m_foundNotifyWindow;
// Win32 Callback Function
private System.Int32 FindNotifyWindowCallback(System.IntPtr hWnd,
System.UInt32 lParam)
{
System.Text.StringBuilder buffer = new System.Text.StringBuilder(256);
GetClassName(hWnd, buffer, buffer.Capacity);
// but what if this changes? - anybody got a better idea?
if(buffer.ToString() == "WindowsForms10.Window.0.app1")
{
m_notifyWindow = hWnd;
m_foundNotifyWindow = true;
return 0; // stop searching
}
return 1;
}
public void ShowBalloon(uint iconId, string title, string text, uint timeout)
{
// find notify window
uint threadId = GetCurrentThreadId();
EnumThreadWndProc cb = new EnumThreadWndProc(FindNotifyWindowCallback);
m_foundNotifyWindow = false;
EnumThreadWindows(threadId, cb, 0);
if(m_foundNotifyWindow)
{
// show the balloon
NotifyIconData data = new NotifyIconData();
data.cbSize = (System.UInt32)
System.Runtime.InteropServices.Marshal.SizeOf(
typeof(NotifyIconData));
data.hWnd = m_notifyWindow;
data.uID = iconId;
data.uFlags = NotifyFlags.Info;
data.uTimeoutOrVersion = 15000;
data.szInfo = text;
data.szInfoTitle = title;
Shell_NotifyIcon(NotifyCommand.Modify, ref data);
}
}
}
}

@ -0,0 +1,94 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 11.06.2005
* Time: 10:04
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace CheckMail
{
/// <summary>
/// Description of test.
/// </summary>
public class test : System.Windows.Forms.Form
{
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.Button button1;
private System.ComponentModel.IContainer components;
public test()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (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();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// notifyIcon1
//
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "notifyIcon1";
this.notifyIcon1.Visible = true;
//
// button1
//
this.button1.Location = new System.Drawing.Point(72, 56);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(88, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Show Balloon";
this.button1.Click += new System.EventHandler(this.OnShowBalloon);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(240, 142);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.button1});
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
private void OnShowBalloon(object sender, System.EventArgs e)
{
CheckMail.NotifyIcon notifyIcon = new CheckMail.NotifyIcon();
notifyIcon.ShowBalloon(1, "My Title", "My Text", 15000);
}
}
}

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity name="CheckMail.application" version="1.1.0.3" publicKeyToken="b811bca8130ffd16" language="de" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="Johannes Schauer" asmv2:product="CheckMail" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" disallowUrlActivation="true" mapFileExtensions="true" />
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="CheckMail_1_1_0_3\CheckMail.exe.manifest" size="7383">
<assemblyIdentity name="CheckMail.exe" version="1.1.0.3" publicKeyToken="b811bca8130ffd16" language="de" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>QIINJDl5CGPQc+KssJZCJh77VU4=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>GIVMHoBlUVkdBdM5x8lxxpEdnps=</DigestValue></Reference><Reference URI="#StrongNameKeyInfo"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>su5U5Nh3Jww+ZI2gSIoSWs8Z0OA=</DigestValue></Reference></SignedInfo><SignatureValue>fhrKqUE48TgTw74s8oUGdCnoxlsloy5jj02DiunH/nvIqtEtsLtX+6U8lSx9mh8YrmfxJU85RTIdtGEITXDNgBbZnarjxTX96f/5LuEwEktgj45ALyUdqVDUcyy0Dq1h0ap6kwCViYrHKrH2sSLFWBMmCL1mfzeaGZ2VziQDBuo=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>xHIZyznsihMfToKiA1FUq5U3jSvBxsRRlZCypIl+2nLjeN8eBgcW24NWbwWz7F9PHiijG3N+ndvPJo4hKIyc5y85ptqLK10ARy7nIo1QWKFqLklhvb4yap2hIhaWUZEgQDC68BydQuwk4joQIn04LS6qzknaG8PFNIDMGnODUD0=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="42a27828004565c7b8d58e232a577c30791745dc" Description="" Url=""><as:assemblyIdentity name="CheckMail.application" version="1.1.0.3" publicKeyToken="b811bca8130ffd16" language="de" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=JOSCH\Johannes</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>1wLQ5QjD477HG05Dp1Lk3VQnQSA=</DigestValue></Reference></SignedInfo><SignatureValue>U1yxmYYpvGlgTrZ6E5B8MpTm4a8mLnmhrH40rDpWTegf/UVlVD1fBljlYsDrxs1lR4pXf0DakTG5v/x5KzOyqJGCH7Tp5eloqIcgFv+fbNPMdy8ZfMhH+D160e/lDnQJUrgzzxZS6IC91SXTHpfWxRmuE4ajoChWEZrecz7V0jI=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>xHIZyznsihMfToKiA1FUq5U3jSvBxsRRlZCypIl+2nLjeN8eBgcW24NWbwWz7F9PHiijG3N+ndvPJo4hKIyc5y85ptqLK10ARy7nIo1QWKFqLklhvb4yap2hIhaWUZEgQDC68BydQuwk4joQIn04LS6qzknaG8PFNIDMGnODUD0=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIByTCCATagAwIBAgIQh9SthCpWXpdMLgXvuNaBtzAJBgUrDgMCHQUAMCcxJTAjBgNVBAMeHABKAE8AUwBDAEgAXABKAG8AaABhAG4AbgBlAHMwHhcNMDUwNjExMTExNDUzWhcNMDYwNjExMTcxNDUzWjAnMSUwIwYDVQQDHhwASgBPAFMAQwBIAFwASgBvAGgAYQBuAG4AZQBzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEchnLOeyKEx9OgqIDUVSrlTeNK8HGxFGVkLKkiX7acuN43x4GBxbbg1ZvBbPsX08eKKMbc36d288mjiEojJznLzmm2osrXQBHLucijVBYoWouSWG9vjJqnaEiFpZRkSBAMLrwHJ1C7CTiOhAifTgtLqrOSdobw8U0gMwac4NQPQIDAQABMAkGBSsOAwIdBQADgYEAcr9aTBqIwCSFVSvwkdG28Sn7/U3xjdbbggv8HzsVmpmeu/xzUOhQKQuxbPn8qy+s7BCFgrJj/ZFGru5qKrvh9hoY1cbzQYkFjbQrZItPAhecfWwvAYO+f4BTEdCbWGcW/3VYYHTLWlnqCbh2F00iZx2lZN4D7n83j6y7Vb+8O7k=</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CheckMail", "CheckMail\CheckMail.csproj", "{924E3D26-0DF0-41E8-B8B5-E70CB0842EB5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{924E3D26-0DF0-41E8-B8B5-E70CB0842EB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{924E3D26-0DF0-41E8-B8B5-E70CB0842EB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{924E3D26-0DF0-41E8-B8B5-E70CB0842EB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{924E3D26-0DF0-41E8-B8B5-E70CB0842EB5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

@ -0,0 +1,115 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50215</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{924E3D26-0DF0-41E8-B8B5-E70CB0842EB5}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CheckMail</RootNamespace>
<AssemblyName>CheckMail</AssemblyName>
<GenerateManifests>true</GenerateManifests>
<SignManifests>true</SignManifests>
<ManifestCertificateThumbprint>8C5CB58138AEB531D4AFA0B0F5BA208CF9F2B10E</ManifestCertificateThumbprint>
<ManifestKeyFile>CheckMail_TemporaryKey.pfx</ManifestKeyFile>
<IsWebBootstrapper>false</IsWebBootstrapper>
<ApplicationIcon>mail.ico</ApplicationIcon>
<PublishUrl>E:\Quelltexte\CheckMail2\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<TargetCulture>de</TargetCulture>
<ProductName>CheckMail</ProductName>
<PublisherName>Johannes Schauer</PublisherName>
<CreateWebPageOnPublish>false</CreateWebPageOnPublish>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<DisallowUrlActivation>true</DisallowUrlActivation>
<ApplicationVersion>1.1.0.*</ApplicationVersion>
<BootstrapperEnabled>true</BootstrapperEnabled>
</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>
</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>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<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="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainForm.de.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Über.resx">
<DependentUpon>Über.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="app.config" />
<None Include="CheckMail_TemporaryKey.pfx" />
<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>
<Compile Include="Settings.cs" />
<Compile Include="Über.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Über.Designer.cs">
<DependentUpon>Über.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<InProject>False</InProject>
<ProductName>.NET Framework 2.0 Beta</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="mail.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,16 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastOpenVersion>8.0.50215</LastOpenVersion>
<PublishUrlHistory>E:\Quelltexte\CheckMail2\</PublishUrlHistory>
<InstallUrlHistory>
</InstallUrlHistory>
<SupportUrlHistory>http://www.johannes-schauer.de</SupportUrlHistory>
<UpdateUrlHistory>
</UpdateUrlHistory>
<BootstrapperUrlHistory>
</BootstrapperUrlHistory>
<ApplicationRevision>4</ApplicationRevision>
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>true</VerifyUploadedFiles>
</PropertyGroup>
</Project>

@ -0,0 +1,862 @@
/*
* Created by SharpDevelop.
* User: Johannes
* Date: 10.06.2005
* Time: 12:55
*/
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Configuration;
using CheckMail.Properties;
namespace CheckMail
{
/// <summary>
/// Description of MainForm.
/// </summary>
public class CheckMail : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components;
private System.Windows.Forms.ListBox lbMsgDetails;
private System.Windows.Forms.Label lNeueEmails;
private System.Windows.Forms.ListBox lbFolders;
private System.Windows.Forms.Button btnCheckNow;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private TcpClient cl = null; //Globaler TcpClient
private NetworkStream str = null; //Globaler Netzwerkstream
private int neueEmails = 0; //Anzahl der neuen Emails
private TextBox tbUser; //Textbox Benutzername
private TextBox tbPass; //Textbox Passwort
private string GlobalSenders = ""; //String Liste aller Sender neuer Emails
private string user = ""; //Benutzername
private CheckBox cbAutoCheck; //Checkbox AutoCheck ja/nein
private NumericUpDown nUDIntervall; //Periode mit der geprüft wird
private Label label1;
private System.Windows.Forms.Timer timer1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem BeendenToolStripMenuItem;
private ToolStripMenuItem minimierenToolStripMenuItem;
private ToolStripMenuItem tothefrontToolStripMenuItem;
private string pass = ""; //Passwort
private Thread t = null;
private Button btnBeenden;
private ToolStripMenuItem ÜberToolStripMenuItem;
private StatusStrip statusStrip1;
private ToolStripStatusLabel toolStripStatusLabel1;
private Button bProxy;
private Settings sett = new Settings();
private delegate void ClearFolderListHandler();
private delegate void AddFolderListItemHandler(string text);
private delegate void ClearMsgDetailsListHandler();
private delegate void AddMsgDetailsListItemHandler(string text);
private delegate void SetNeueEmailLabelHandler(string text);
private delegate void SetNotifyIconTextHandler(string text);
private delegate void SetBtnCheckNowEnabledHandler(bool enabled);
private delegate void SetSchließenToolStripMenuItemEnabledHandler(bool enabled);
private delegate void SetBtnBeendenEnabledHandler(bool enabled);
public CheckMail()
{
InitializeComponent();
tbUser.Text = sett.user;
tbPass.Text = sett.pass;
toolStripStatusLabel1.Text = "Fertig";
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new CheckMail());
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CheckMail));
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ÜberToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.minimierenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tothefrontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BeendenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.btnOK = new System.Windows.Forms.Button();
this.btnCheckNow = new System.Windows.Forms.Button();
this.lbFolders = new System.Windows.Forms.ListBox();
this.lNeueEmails = new System.Windows.Forms.Label();
this.lbMsgDetails = new System.Windows.Forms.ListBox();
this.tbUser = new System.Windows.Forms.TextBox();
this.tbPass = new System.Windows.Forms.TextBox();
this.cbAutoCheck = new System.Windows.Forms.CheckBox();
this.nUDIntervall = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.btnBeenden = new System.Windows.Forms.Button();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.bProxy = new System.Windows.Forms.Button();
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nUDIntervall)).BeginInit();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// notifyIcon1
//
this.notifyIcon1.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "0 neue Emails";
this.notifyIcon1.Visible = true;
this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Enabled = true;
this.contextMenuStrip1.GripMargin = new System.Windows.Forms.Padding(2);
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ÜberToolStripMenuItem,
this.minimierenToolStripMenuItem,
this.tothefrontToolStripMenuItem,
this.BeendenToolStripMenuItem});
this.contextMenuStrip1.Location = new System.Drawing.Point(78, 0);
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.contextMenuStrip1.Size = new System.Drawing.Size(158, 92);
//
// ÜberToolStripMenuItem
//
this.ÜberToolStripMenuItem.Name = "ÜberToolStripMenuItem";
this.ÜberToolStripMenuItem.Text = "Über...";
this.ÜberToolStripMenuItem.Click += new System.EventHandler(this.ÜberToolStripMenuItem_Click);
//
// minimierenToolStripMenuItem
//
this.minimierenToolStripMenuItem.Name = "minimierenToolStripMenuItem";
this.minimierenToolStripMenuItem.Text = "Minimieren";
this.minimierenToolStripMenuItem.Click += new System.EventHandler(this.minimierenToolStripMenuItem_Click);
//
// tothefrontToolStripMenuItem
//
this.tothefrontToolStripMenuItem.Name = "tothefrontToolStripMenuItem";
this.tothefrontToolStripMenuItem.Text = "In den Vordergrund";
this.tothefrontToolStripMenuItem.Click += new System.EventHandler(this.tothefrontToolStripMenuItem_Click);
//
// BeendenToolStripMenuItem
//
this.BeendenToolStripMenuItem.Name = "BeendenToolStripMenuItem";
this.BeendenToolStripMenuItem.Text = "Beenden";
this.BeendenToolStripMenuItem.Click += new System.EventHandler(this.BeendenToolStripMenuItem_Click);
//
// btnOK
//
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btnOK.Location = new System.Drawing.Point(408, 410);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(136, 23);
this.btnOK.TabIndex = 6;
this.btnOK.Text = "&Minimize to Tray";
this.btnOK.Click += new System.EventHandler(this.BtnOKClick);
//
// btnCheckNow
//
this.btnCheckNow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCheckNow.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.btnCheckNow.Location = new System.Drawing.Point(228, 10);
this.btnCheckNow.Name = "btnCheckNow";
this.btnCheckNow.Size = new System.Drawing.Size(104, 23);
this.btnCheckNow.TabIndex = 3;
this.btnCheckNow.Text = "Check &Now";
this.btnCheckNow.Click += new System.EventHandler(this.BtnCheckNowClick);
//
// lbFolders
//
this.lbFolders.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lbFolders.FormattingEnabled = true;
this.lbFolders.HorizontalScrollbar = true;
this.lbFolders.Location = new System.Drawing.Point(12, 38);
this.lbFolders.Name = "lbFolders";
this.lbFolders.SelectionMode = System.Windows.Forms.SelectionMode.None;
this.lbFolders.Size = new System.Drawing.Size(137, 366);
this.lbFolders.TabIndex = 2;
this.lbFolders.TabStop = false;
//
// lNeueEmails
//
this.lNeueEmails.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lNeueEmails.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.lNeueEmails.Location = new System.Drawing.Point(14, 410);
this.lNeueEmails.Name = "lNeueEmails";
this.lNeueEmails.Size = new System.Drawing.Size(208, 21);
this.lNeueEmails.TabIndex = 11;
this.lNeueEmails.Text = "Neue Emails:";
this.lNeueEmails.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lbMsgDetails
//
this.lbMsgDetails.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lbMsgDetails.FormattingEnabled = true;
this.lbMsgDetails.HorizontalScrollbar = true;
this.lbMsgDetails.Location = new System.Drawing.Point(157, 38);
this.lbMsgDetails.Name = "lbMsgDetails";
this.lbMsgDetails.SelectionMode = System.Windows.Forms.SelectionMode.None;
this.lbMsgDetails.Size = new System.Drawing.Size(387, 366);
this.lbMsgDetails.TabIndex = 12;
this.lbMsgDetails.TabStop = false;
//
// tbUser
//
this.tbUser.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbUser.Location = new System.Drawing.Point(12, 12);
this.tbUser.Name = "tbUser";
this.tbUser.Size = new System.Drawing.Size(102, 20);
this.tbUser.TabIndex = 1;
this.tbUser.Text = "J.Schauer";
this.tbUser.TextChanged += new System.EventHandler(this.tbUser_TextChanged);
//
// tbPass
//
this.tbPass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbPass.Location = new System.Drawing.Point(120, 12);
this.tbPass.Name = "tbPass";
this.tbPass.PasswordChar = '*';
this.tbPass.Size = new System.Drawing.Size(102, 20);
this.tbPass.TabIndex = 2;
this.tbPass.Text = "porenta";
this.tbPass.TextChanged += new System.EventHandler(this.tbPass_TextChanged);
//
// cbAutoCheck
//
this.cbAutoCheck.AutoSize = true;
this.cbAutoCheck.Checked = true;
this.cbAutoCheck.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbAutoCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbAutoCheck.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.cbAutoCheck.Location = new System.Drawing.Point(338, 13);
this.cbAutoCheck.Name = "cbAutoCheck";
this.cbAutoCheck.Size = new System.Drawing.Size(94, 17);
this.cbAutoCheck.TabIndex = 4;
this.cbAutoCheck.Text = "Auto Check alle";
this.cbAutoCheck.CheckedChanged += new System.EventHandler(this.cbAutoCheck_CheckedChanged);
//
// nUDIntervall
//
this.nUDIntervall.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nUDIntervall.Location = new System.Drawing.Point(438, 12);
this.nUDIntervall.Maximum = new decimal(new int[] {
60,
0,
0,
0});
this.nUDIntervall.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nUDIntervall.Name = "nUDIntervall";
this.nUDIntervall.Size = new System.Drawing.Size(51, 20);
this.nUDIntervall.TabIndex = 5;
this.nUDIntervall.Value = new decimal(new int[] {
5,
0,
0,
0});
this.nUDIntervall.ValueChanged += new System.EventHandler(this.nUDIntervall_ValueChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.label1.Location = new System.Drawing.Point(495, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 13);
this.label1.TabIndex = 13;
this.label1.Text = "Minuten";
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 300000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// btnBeenden
//
this.btnBeenden.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBeenden.Location = new System.Drawing.Point(321, 410);
this.btnBeenden.Name = "btnBeenden";
this.btnBeenden.Size = new System.Drawing.Size(81, 23);
this.btnBeenden.TabIndex = 14;
this.btnBeenden.Text = "&Beenden";
this.btnBeenden.Click += new System.EventHandler(this.btnBeenden_Click);
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1});
this.statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;
this.statusStrip1.Location = new System.Drawing.Point(0, 439);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(556, 22);
this.statusStrip1.SizingGrip = false;
this.statusStrip1.TabIndex = 15;
this.statusStrip1.Text = "statusStrip1";
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Spring = true;
this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// bProxy
//
this.bProxy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.bProxy.Location = new System.Drawing.Point(157, 410);
this.bProxy.Name = "bProxy";
this.bProxy.Size = new System.Drawing.Size(71, 23);
this.bProxy.TabIndex = 16;
this.bProxy.Text = "Proxy";
//
// CheckMail
//
this.AcceptButton = this.btnCheckNow;
this.ClientSize = new System.Drawing.Size(556, 461);
this.ControlBox = false;
this.Controls.Add(this.bProxy);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.btnBeenden);
this.Controls.Add(this.tbPass);
this.Controls.Add(this.nUDIntervall);
this.Controls.Add(this.label1);
this.Controls.Add(this.tbUser);
this.Controls.Add(this.lbMsgDetails);
this.Controls.Add(this.lNeueEmails);
this.Controls.Add(this.cbAutoCheck);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCheckNow);
this.Controls.Add(this.lbFolders);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "CheckMail";
this.ShowInTaskbar = false;
this.Text = "CheckMail";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.CheckMail_FormClosed);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CheckMail_FormClosing);
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.nUDIntervall)).EndInit();
this.statusStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
#region CORE-Functions
/*
* SendCommand
*
* Schreibt einen übergebenen String in den Netzwerstream und gibt die Antwort
* Des Servers zurück
*/
string SendCommand(string command)
{
try
{
byte[] send = Encoding.ASCII.GetBytes(command);
str.Write(send, 0, send.Length);
byte[] receive = new byte[4096];
int k = str.Read(receive, 0, receive.Length);
string msg = "";
for (int i = 0; i < k; i++)
{
msg += Convert.ToChar(receive[i]).ToString();
}
return msg;
}
catch (Exception e)
{
toolStripStatusLabel1.Text = e.Message;
return "";
}
}
/*
* Login
*
* Erstellt einen neuen TcpClient und Netzwerkstream mit imap.web.de:143 und
* sendet die Login Daten
*/
string Login()
{
try
{
cl = new TcpClient("imap.web.de", 143);
cl.ReceiveTimeout = 30000;
cl.SendTimeout = 30000;
str = cl.GetStream();
str.ReadTimeout = 45000;
str.WriteTimeout = 45000;
byte[] buffer = new byte[4096];
int k = str.Read(buffer, 0, buffer.Length);
string msg = "";
for (int i = 0; i < k; i++)
{
msg += Convert.ToChar(buffer[i]).ToString();
}
SendCommand("? LOGIN " + user + " " + pass + "\r\n");
return msg;
}
catch (Exception e)
{
toolStripStatusLabel1.Text = e.Message;
return "";
}
}
/*
* GetUnreadIDs
*
* Nach Übergabe eines Ordners wird dieser selectet und nach ungelesenen Nachrichten durchsucht.
* Der zurückgegebene String wird auf die Nummern gekürzt und diese durch ein Split
* in ein int-Array geschrieben welches zurück gegeben wird
*/
int[] GetUnreadIDs(string folder)
{
SendCommand("? SELECT "+folder+"\r\n");
string response = SendCommand("? SEARCH UNSEEN\r\n");
if(response.Length > 34)
{
response = response.Remove(0,9);
response = response.Remove(response.Length-25, 25);
string[] collection = response.Split(' ');
int[] IDs = new int[collection.Length];
if(collection.Length>0)
{
for(int i=0; i<collection.Length; i++)
{
IDs[i] = int.Parse(collection[i]);
}
}
return IDs;
}
return null;
}
/*
* GetFolderList
*
* Hauptfuntion. Nachdem Variablen und Listen zurück gesetzt wurden und der Check-Button
* und das Schließen-MenuItem und -Button deaktiviert wurden, wird ein Login gemacht
* und die Liste Aller Ordner im rot-Verzeichnis abgerufen. Der zurückgegebene String wir
* durch ein Split aufgeteilt und jedes Element des Erzeugtn Arrays in einer Schleife
* bearbeitet. In dieser wird er von unnötigen Teilen befreit und wenn er nicht zu
* unerwünschten Ordnern gehört auf ungelesene Nachrichten überprüft. Existieren solche,
* werden diese durch übergabe des Ordners und sämtlicher ungelesener IDs in diesem
* auf Absender und Betreff untersucht und der MsgDetails Liste hinzugefügt.
* An die Ordnerliste wird die Zahl der neuen Nachrichten in einer Klammer angehängt und
* die Zahl der Gesamtemails um die jemweilige Anzahl erhöht. Diese neue Anzahl wird
* sofort im entsprechenden Label aktualisiert. Egal ob neue emails vorhaneden waren
* oder nicht wird der Ordner der Liste hinzugefügt.
* Nachdem die Schleife abgearbeitet ist, Zeigt ein Balloon Tip (fette Sache!!!)
* im Falle neuer Nachrichten die Anzahl und die Absender in der Taskleiste an.
* Danach wird nur noch der angezeigte Hover Text des Trayicons aktualisiert und
* der Button und das Schließen-MenuItem und -Button wieder aktiviert.
*/
void GetFolderList()
{
neueEmails = 0;
GlobalSenders = "Von: ";
this.Invoke(new SetSchließenToolStripMenuItemEnabledHandler(SetSchließenToolStripMenuItemEnabled), new object[] { false});
this.Invoke(new SetBtnBeendenEnabledHandler(SetBtnBeendenEnabled), new object[] { false });
this.Invoke(new SetBtnCheckNowEnabledHandler(SetBtnCheckNowEnabled), new object[] { false });
this.Invoke(new ClearFolderListHandler(ClearFolderList));
this.Invoke(new ClearMsgDetailsListHandler(ClearMsgDetailsList));
this.Invoke(new SetNotifyIconTextHandler(SetNotifyIconText), new object[] { neueEmails.ToString() + " neue Emails" });
this.Invoke(new SetNeueEmailLabelHandler(SetNeueEmailLabel), new object[] { neueEmails.ToString() });
if (Login() != "")
{
try
{
string list = SendCommand("? LIST \"\" *\r\n");
list = list.Remove(list.Length - 22, 22);
string[] collection = list.Split('\n');
for (int i = 0; i < collection.Length; i++)
{
collection[i] = collection[i].Remove(0, 27);
collection[i] = collection[i].Remove(collection[i].Length - 2, 2);
if (collection[i] != "Unerw&APw-nscht" && collection[i] != "Postausgang" && collection[i] != "Gesendet" && collection[i] != "Papierkorb" && collection[i] != "Entwurf")
{
int[] IDs = GetUnreadIDs(collection[i]);
if (IDs != null)
{
UpdateUnreadMsgDetails(collection[i], IDs);
collection[i] += " (" + IDs.Length.ToString() + ")";
neueEmails += IDs.Length;
this.Invoke(new SetNeueEmailLabelHandler(SetNeueEmailLabel), new object[] { neueEmails.ToString() });
}
this.Invoke(new AddFolderListItemHandler(AddFolderListItem), new object[] { collection[i] });
}
}
if (neueEmails > 0)
{
notifyIcon1.ShowBalloonTip(1000, neueEmails.ToString() + " neue Emails", GlobalSenders, ToolTipIcon.Info);
}
this.Invoke(new SetNotifyIconTextHandler(SetNotifyIconText), new object[] { neueEmails.ToString() + " neue Emails" });
Logout();
}
catch (Exception e)
{
toolStripStatusLabel1.Text = e.Message;
}
}
this.Invoke(new SetBtnCheckNowEnabledHandler(SetBtnCheckNowEnabled), new object[] { true });
this.Invoke(new SetSchließenToolStripMenuItemEnabledHandler(SetSchließenToolStripMenuItemEnabled), new object[] { true });
this.Invoke(new SetBtnBeendenEnabledHandler(SetBtnBeendenEnabled), new object[] { true });
}
/*
* UpdateUnreadMsgDetails
*
* Nachdem ein neuer Überpunkt in der MsgDetails Liste mit dem entsprechenden Ordner als Überschrift angelegt
* wurde, wird der übergebene Ordner auf dem Server selectet und eine schleife arbeitet alle
* durch ein int-Array als ungelesen übergebenen Emails ab. Dabei werden die von FETCH zurück
* gegebenen Strings für SENDER und SUBJECT durch eine Regular Expression von ihrem Drumherum
* befreit und nachdem das getan ist die Email wieder auf ungelesen gesetzt.
* Die MsgDetails Liste wird um den entsprechenden Eintrag mit Absender und Betreff erweitert und
* die Liste mit allen Absendern um den entsprechenden string erweitert.
*/
void UpdateUnreadMsgDetails(string folder, int[] IDs)
{
this.Invoke(new AddMsgDetailsListItemHandler(AddMsgDetailsListItem), new object[] { "Neu in Ordner: " + folder });
SendCommand("? SELECT " + folder + "\r\n");
for(int i = 0; i<IDs.Length; i++)
{
string sender = SendCommand("? FETCH "+IDs[i]+" (FLAGS BODY[HEADER.FIELDS (SENDER)])\r\n");
Regex re1 = new Regex("Sender: (?<sender>[^\n\r]+)", RegexOptions.IgnoreCase);
Match m1 = re1.Match(sender);
sender = m1.Groups["sender"].Value;
string subject = SendCommand("? FETCH "+IDs[i]+" (FLAGS BODY[HEADER.FIELDS (SUBJECT)])\r\n");
Regex re2 = new Regex("Subject: (?<subject>[^\n\r]+)", RegexOptions.IgnoreCase);
Match m2 = re2.Match(subject);
subject = m2.Groups["subject"].Value;
SendCommand("? STORE "+IDs[i]+" -FLAGS (\\SEEN)\r\n");
this.Invoke(new AddMsgDetailsListItemHandler(AddMsgDetailsListItem), new object[] { " > "+sender + " - " + subject});
GlobalSenders += sender + " ";
}
}
/*
* Logout
*
* Ein LOGOUT wird gesendet und danach der Stream und der TcpClient geschlossen.
*/
void Logout()
{
SendCommand("? LOGOUT\r\n");
str.Close();
cl.Close();
}
#endregion
#region delgates
void AddFolderListItem(string text)
{
lbFolders.Items.Add(text);
}
void AddMsgDetailsListItem(string text)
{
lbMsgDetails.Items.Add(text);
}
void ClearFolderList()
{
lbFolders.Items.Clear();
}
void ClearMsgDetailsList()
{
lbMsgDetails.Items.Clear();
}
void SetNeueEmailLabel(string text)
{
lNeueEmails.Text = "Neue Emails: " + text;
}
void SetNotifyIconText(string text)
{
notifyIcon1.Text = text;
}
void SetBtnCheckNowEnabled(bool enabled)
{
btnCheckNow.Enabled = enabled;
}
void SetSchließenToolStripMenuItemEnabled(bool enabled)
{
BeendenToolStripMenuItem.Enabled = enabled;
}
void SetBtnBeendenEnabled(bool enabled)
{
btnBeenden.Enabled = enabled;
}
#endregion
#region form events
/*
* BtnCheckNowClick
*
* Benutzername und Passwort werden aus den Textboxen geholt und ein neuer Thread
* für das aktualisieren gestartet, wenn der Button nicht deaktiviert sein sollte,
* was nur der Fall ist, wenn schon eine Überprüfung läuft.
*/
void BtnCheckNowClick(object sender, EventArgs e)
{
user = tbUser.Text;
pass = tbPass.Text;
if (btnCheckNow.Enabled)
{
Thread t = new Thread(new ThreadStart(GetFolderList));
t.Start();
}
}
/*
* timer1_Tick
*
* wird bei jedem Tick von timer1 ausgeführt - wie BtnCheckNowClick
*/
private void timer1_Tick(object sender, EventArgs e)
{
user = tbUser.Text;
pass = tbPass.Text;
if (btnCheckNow.Enabled)
{
t = new Thread(new ThreadStart(GetFolderList));
t.Start();
}
}
/*
* BtnOKClick
*
* Die Anwendung wird in das TrayIcon minimiert
*/
void BtnOKClick(object sender, System.EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
this.Visible = false;
}
/*
* cbAutoCheck_CheckedChanged
*
* je nachdem ob checked oder nicht wird die IntervallNumericUpDown zusammen
* mit dem Timer an und aus gestellt wenn sich checked ändert.
*/
private void cbAutoCheck_CheckedChanged(object sender, EventArgs e)
{
nUDIntervall.Enabled = cbAutoCheck.Checked;
timer1.Enabled = cbAutoCheck.Checked;
}
/*
* nUDIntervall_ValueChanged
*
* Wird der Wert des numericUPDown gändert so wird dieser von Minuten in Millisekunden
* umgerechnet sofort in den Interval Wert von timer1 übertragen
*/
private void nUDIntervall_ValueChanged(object sender, EventArgs e)
{
timer1.Interval = Convert.ToInt32(nUDIntervall.Value) * 60000;
}
/*
* btnBeenden_Click
*
* Beendet das Programm
*/
private void btnBeenden_Click(object sender, EventArgs e)
{
this.Close();
}
#region notifyIcon related
/*
* notifyIcon1_DoubleClick
*
* Holt das Programm egal aus welchem WindowState in den Vordergrund
*/
private void notifyIcon1_DoubleClick(object sender, EventArgs e)
{
this.Visible = true;
this.WindowState = FormWindowState.Normal;
this.BringToFront();
}
/*
* minimierenToolStripMenuItem_Click
*
* Überprüft den WindowState und ändert diesen zusammen mit der Sichtbarkeit
* und dem ToolStripMenuItem-Text dementsprechend
*/
private void minimierenToolStripMenuItem_Click(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Normal)
{
this.WindowState = FormWindowState.Minimized;
this.Visible = false;
this.minimierenToolStripMenuItem.Text = "Wiederherstellen";
}
else
{
this.Visible = true;
this.WindowState = FormWindowState.Normal;
this.minimierenToolStripMenuItem.Text = "Minimieren";
}
}
/*
* tothefrontToolStripMenuItem_Click
*
* Holt das Programm egal aus welchem WindowState in den Vordergrund
*/
private void tothefrontToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Visible = true;
this.WindowState = FormWindowState.Normal;
this.BringToFront();
}
/*
* ÜberToolStripMenuItem_Click
*
* Öffnet den Über... Dialog
*/
private void ÜberToolStripMenuItem_Click(object sender, EventArgs e)
{
Über über = new Über();
über.ShowDialog();
}
/*
* toolStripMenuItem1_Click
*
* Beendet das Programm
*/
private void BeendenToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
#endregion
/*
* CheckMail_FormClosed
*
* Wenn die Form geschlossen ist
*/
private void CheckMail_FormClosed(object sender, FormClosedEventArgs e)
{
notifyIcon1.Dispose();
if (str != null)
{
str.Close();
}
if (cl != null)
{
cl.Close();
}
}
/*
* CheckMail_FormClosing
*
* Bevor die Form geschlossen ist. Speichert Benutzerdaten.
*/
private void CheckMail_FormClosing(object sender, FormClosingEventArgs e)
{
if (t != null)
{
t.Abort();
}
sett.user = tbUser.Text;
sett.pass = tbPass.Text;
sett.Save();
}
/*
* Damit kein automatisches Checken erfolgt, während Werte geändert werden
*/
private void tbUser_TextChanged(object sender, EventArgs e)
{
cbAutoCheck.Checked = false;
}
private void tbPass_TextChanged(object sender, EventArgs e)
{
cbAutoCheck.Checked = false;
}
#endregion
}
}

@ -0,0 +1,168 @@
<?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: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: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: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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="contextMenuStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>96, 0</value>
</data>
<data name="notifyIcon1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAEBAAAAAAAABoBQAAJgAAABAQAAAAAAAAaAQAAI4FAAAoAAAAEAAAACAAAAABAAgAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAg2BZAGZmZgChd3MAo3p2ALuLigDDkpEAQHaZAE15mQBzg5kAmYyZAMyZ
mQDOm5kAz5yZANCdmQDWo5kA26iZAN2qmQDotZkA6reZAM+dmgDfr5sAz5+cAPLDnAD1xZwA9cedANan
ngDvwZ4As5mfAMmdnwDJn58Az5+fAP/ToADftaIA1qyjAM6mpQDWrKUA/9ilACt5pgDBoaYA2bOmADiB
pwDQp6cA1qynAP/apwDRqakA7MqqAN++qwDOrKwA/9+sAN+/rQDy060A5sqwAPLWsADcubEA37+xAP/k
sQA9jLMAP4yzAECMswC+prMAv62zANmzswDfv7YA37+3AP/qtwBQlrkAVpy5ALaluQC8s7kA3Lm5AN+/
ugD867sA8uO9AP/wvQD16b8A//K/AP/2wwD/+MUAy8PGAP/5xgDy5scA8ubKAP/8ygCAs8wA///MAOzZ
zgD//88A8ubQAP//0ACPvNIArsPSANvR0gD//9MA/PnUAPz51QBeuNkArNPZAP//2QDy5t0A9ezeAP//
3wD//+AA///iAHDC5gCk2OYAv9nmAP//6ACi4+wAm8ryAN/s8gDQ7/IA2/DyAIvO+QDa+fkA/Pn5AAAA
AACLxP8Akcz/AJPP/wCV2f8AluL/AJfs/wDi//8A5v//AOj//wDs//8A7///APP//wD0//8A+f//APz/
/wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAHNzAQEBAXNzc3Nzc3Nzc3NzIgoOCgQBAQEBAQFzc3NzcyIMFB8W
EQ8LBQIAAQEBc3MiGhMtNzAkHxcSEA0KAwFzIjQyFUpNS0A3MCQYCwoBcyJITzMjXVxYUk1HGRAKAXMi
UFxWJz9qZmReISArCgFzIldlUSMKRmJjKi5MSQoBcylVNR5bb048CiYxVlQKAXMsCkRygoB+fHpxLzZh
CgFzHQlBg4ODgX99e24bPgoBc3MdOm1pWVM5OCUGCAoKAXNzcygHQl9ncHZ1dEMKAXNzc3NzHR1reXh3
bDsBAXNzc3Nzc3MdHWBoWhwBAXNzc3Nzc3Nzc3M9PUUBc3Nzc3PD/wAAgA8AAIABAACAAAAAgAAAAIAA
AACAAAAAgAAAAIAAAACAAAAAgAAAAMAAAADgAQAA8AMAAPgHAAD+HwAAKAAAABAAAAAgAAAAAQAgAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC2hoWcoXVx23JNRuVGKh7dOh8TzUAkGL1LLiOpTzEmiksu
JWJDJh1GSi4jOlI0Jy9TNSoiTC8mFkQzIgwAAAAAwpGQzsyZmf/Wo5n/zJmZ/7qKif2WbGj4c1BI708x
Jt84HxLNPSIWwUksIK9OMieVTzEnc0MmHUZEKRstAAAAAMKRkM7PnJn/36+b///ToP/yw5z/6LWZ/9uo
mf/Om5n/w5KR/p90cPp8V1DyY0E45jofE9E5HxK6RikfjQAAAADCkZDO78Ge/8+dmv/syqr//+Sx///f
rP//2KX//9Og//XFnP/qt5n/3aqZ/9Cdmf/MmZn/oHVx9jcdEbMAAAAAwpGQzvLWsP/y063/z5+c//Xp
v///+MX///K////qt///5LH//9+s///Ypf/1x53/zpuZ/8yZmf80Gw69AAAAAMKRkM7y473///nG/+bK
sP/WrKX//PnU////0////9D///zK///4xf/867v/1qee/92qmf/MmZn/MxoNvwAAAADCkZDO8ubH////
0////8//2bOm/9+/t////+j////i////3//8+dX/1qyj/9+1ov//2qf/zJmZ/zMaDb8AAAAAwpGQzvLm
0P///+D/8ubK/9aspf/MmZn/37+6//Lm3f/17N7/1qyn/9++q///9sP///C9/8yZmf8zGg2/AAAAAMSS
kc3s2c7/3Lmx/8+fn//b0dL/2/Dy/8vDxv+/rbP/zJmZ/8Ghpv/fv63////P////zP/MmZn/MxoNvwAA
AADFk5PKzJmZ/7yzuf/8+fn//P////T////v////6P///+L////a+fn/zqys/9+/sf///9n/zJmZ/zQb
Dr0AAAAAxJKSmZmMmf9Qlrn/////////////////+f////P////s////5v///9Dv8v+zmZ//37+2/8yZ
mf84HRGyAAAAAE0zMwidiZKqQIyz/9/s8v+/2eb/j7zS/4CzzP8/jLP/PYyz/yt5pv9Adpn/c4OZ/8yZ
mf/MmZn/TC4kiAAAAACAAAACRi4XCRFoltVNeZn/Vpy5/1642f9wwub/i875/5PP//+RzP//i8T//7al
uf/MmZn/pHh1u0wuJjYAAAAAAAAAAIAAAAJGLi4JwI+Ojcmfn/+i4+z/l+z//5bi//+V2f//m8ry/76m
s//BkI/zjGVfgE8zJSxVNSsTAAAAAAAAAAAAAAAAgAAAAk0zMwi8i4pwyZ+f/6zT2f+k2Ob/rsPS/8md
n/+oe3jOaUg/Uk83KyJLPC0OZjMzBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMyZmVDMmZm/zJmZv8yZ
ma/MmZlAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAEBgABzc4AAc3OAAHNzgAAKDoAAAQGAAAEBgABzc4AA
DBSAABEPgAACAIAAAXOAABoTwAAwJOAAEhD8HwMB
</value>
</data>
</root>

@ -0,0 +1,227 @@
<?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: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: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: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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>230, 16</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="notifyIcon1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAEBAAAAAAAABoBQAAJgAAABAQAAAAAAAAaAQAAI4FAAAoAAAAEAAAACAAAAABAAgAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAg2BZAGZmZgChd3MAo3p2ALuLigDDkpEAQHaZAE15mQBzg5kAmYyZAMyZ
mQDOm5kAz5yZANCdmQDWo5kA26iZAN2qmQDotZkA6reZAM+dmgDfr5sAz5+cAPLDnAD1xZwA9cedANan
ngDvwZ4As5mfAMmdnwDJn58Az5+fAP/ToADftaIA1qyjAM6mpQDWrKUA/9ilACt5pgDBoaYA2bOmADiB
pwDQp6cA1qynAP/apwDRqakA7MqqAN++qwDOrKwA/9+sAN+/rQDy060A5sqwAPLWsADcubEA37+xAP/k
sQA9jLMAP4yzAECMswC+prMAv62zANmzswDfv7YA37+3AP/qtwBQlrkAVpy5ALaluQC8s7kA3Lm5AN+/
ugD867sA8uO9AP/wvQD16b8A//K/AP/2wwD/+MUAy8PGAP/5xgDy5scA8ubKAP/8ygCAs8wA///MAOzZ
zgD//88A8ubQAP//0ACPvNIArsPSANvR0gD//9MA/PnUAPz51QBeuNkArNPZAP//2QDy5t0A9ezeAP//
3wD//+AA///iAHDC5gCk2OYAv9nmAP//6ACi4+wAm8ryAN/s8gDQ7/IA2/DyAIvO+QDa+fkA/Pn5AAAA
AACLxP8Akcz/AJPP/wCV2f8AluL/AJfs/wDi//8A5v//AOj//wDs//8A7///APP//wD0//8A+f//APz/
/wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAHNzAQEBAXNzc3Nzc3Nzc3NzIgoOCgQBAQEBAQFzc3NzcyIMFB8W
EQ8LBQIAAQEBc3MiGhMtNzAkHxcSEA0KAwFzIjQyFUpNS0A3MCQYCwoBcyJITzMjXVxYUk1HGRAKAXMi
UFxWJz9qZmReISArCgFzIldlUSMKRmJjKi5MSQoBcylVNR5bb048CiYxVlQKAXMsCkRygoB+fHpxLzZh
CgFzHQlBg4ODgX99e24bPgoBc3MdOm1pWVM5OCUGCAoKAXNzcygHQl9ncHZ1dEMKAXNzc3NzHR1reXh3
bDsBAXNzc3Nzc3MdHWBoWhwBAXNzc3Nzc3Nzc3M9PUUBc3Nzc3PD/wAAgA8AAIABAACAAAAAgAAAAIAA
AACAAAAAgAAAAIAAAACAAAAAgAAAAMAAAADgAQAA8AMAAPgHAAD+HwAAKAAAABAAAAAgAAAAAQAgAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC2hoWcoXVx23JNRuVGKh7dOh8TzUAkGL1LLiOpTzEmiksu
JWJDJh1GSi4jOlI0Jy9TNSoiTC8mFkQzIgwAAAAAwpGQzsyZmf/Wo5n/zJmZ/7qKif2WbGj4c1BI708x
Jt84HxLNPSIWwUksIK9OMieVTzEnc0MmHUZEKRstAAAAAMKRkM7PnJn/36+b///ToP/yw5z/6LWZ/9uo
mf/Om5n/w5KR/p90cPp8V1DyY0E45jofE9E5HxK6RikfjQAAAADCkZDO78Ge/8+dmv/syqr//+Sx///f
rP//2KX//9Og//XFnP/qt5n/3aqZ/9Cdmf/MmZn/oHVx9jcdEbMAAAAAwpGQzvLWsP/y063/z5+c//Xp
v///+MX///K////qt///5LH//9+s///Ypf/1x53/zpuZ/8yZmf80Gw69AAAAAMKRkM7y473///nG/+bK
sP/WrKX//PnU////0////9D///zK///4xf/867v/1qee/92qmf/MmZn/MxoNvwAAAADCkZDO8ubH////
0////8//2bOm/9+/t////+j////i////3//8+dX/1qyj/9+1ov//2qf/zJmZ/zMaDb8AAAAAwpGQzvLm
0P///+D/8ubK/9aspf/MmZn/37+6//Lm3f/17N7/1qyn/9++q///9sP///C9/8yZmf8zGg2/AAAAAMSS
kc3s2c7/3Lmx/8+fn//b0dL/2/Dy/8vDxv+/rbP/zJmZ/8Ghpv/fv63////P////zP/MmZn/MxoNvwAA
AADFk5PKzJmZ/7yzuf/8+fn//P////T////v////6P///+L////a+fn/zqys/9+/sf///9n/zJmZ/zQb
Dr0AAAAAxJKSmZmMmf9Qlrn/////////////////+f////P////s////5v///9Dv8v+zmZ//37+2/8yZ
mf84HRGyAAAAAE0zMwidiZKqQIyz/9/s8v+/2eb/j7zS/4CzzP8/jLP/PYyz/yt5pv9Adpn/c4OZ/8yZ
mf/MmZn/TC4kiAAAAACAAAACRi4XCRFoltVNeZn/Vpy5/1642f9wwub/i875/5PP//+RzP//i8T//7al
uf/MmZn/pHh1u0wuJjYAAAAAAAAAAIAAAAJGLi4JwI+Ojcmfn/+i4+z/l+z//5bi//+V2f//m8ry/76m
s//BkI/zjGVfgE8zJSxVNSsTAAAAAAAAAAAAAAAAgAAAAk0zMwi8i4pwyZ+f/6zT2f+k2Ob/rsPS/8md
n/+oe3jOaUg/Uk83KyJLPC0OZjMzBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMyZmVDMmZm/zJmZv8yZ
ma/MmZlAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAEBgABzc4AAc3OAAHNzgAAKDoAAAQGAAAEBgABzc4AA
DBSAABEPgAACAIAAAXOAABoTwAAwJOAAEhD8HwMB
</value>
</data>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>124, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>375, 16</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>50</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAEBAAAAAAAABoBQAAJgAAABAQAAAAAAAAaAQAAI4FAAAoAAAAEAAAACAAAAABAAgAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAg2BZAGZmZgChd3MAo3p2ALuLigDDkpEAQHaZAE15mQBzg5kAmYyZAMyZ
mQDOm5kAz5yZANCdmQDWo5kA26iZAN2qmQDotZkA6reZAM+dmgDfr5sAz5+cAPLDnAD1xZwA9cedANan
ngDvwZ4As5mfAMmdnwDJn58Az5+fAP/ToADftaIA1qyjAM6mpQDWrKUA/9ilACt5pgDBoaYA2bOmADiB
pwDQp6cA1qynAP/apwDRqakA7MqqAN++qwDOrKwA/9+sAN+/rQDy060A5sqwAPLWsADcubEA37+xAP/k
sQA9jLMAP4yzAECMswC+prMAv62zANmzswDfv7YA37+3AP/qtwBQlrkAVpy5ALaluQC8s7kA3Lm5AN+/
ugD867sA8uO9AP/wvQD16b8A//K/AP/2wwD/+MUAy8PGAP/5xgDy5scA8ubKAP/8ygCAs8wA///MAOzZ
zgD//88A8ubQAP//0ACPvNIArsPSANvR0gD//9MA/PnUAPz51QBeuNkArNPZAP//2QDy5t0A9ezeAP//
3wD//+AA///iAHDC5gCk2OYAv9nmAP//6ACi4+wAm8ryAN/s8gDQ7/IA2/DyAIvO+QDa+fkA/Pn5AAAA
AACLxP8Akcz/AJPP/wCV2f8AluL/AJfs/wDi//8A5v//AOj//wDs//8A7///APP//wD0//8A+f//APz/
/wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAHNzAQEBAXNzc3Nzc3Nzc3NzIgoOCgQBAQEBAQFzc3NzcyIMFB8W
EQ8LBQIAAQEBc3MiGhMtNzAkHxcSEA0KAwFzIjQyFUpNS0A3MCQYCwoBcyJITzMjXVxYUk1HGRAKAXMi
UFxWJz9qZmReISArCgFzIldlUSMKRmJjKi5MSQoBcylVNR5bb048CiYxVlQKAXMsCkRygoB+fHpxLzZh
CgFzHQlBg4ODgX99e24bPgoBc3MdOm1pWVM5OCUGCAoKAXNzcygHQl9ncHZ1dEMKAXNzc3NzHR1reXh3
bDsBAXNzc3Nzc3MdHWBoWhwBAXNzc3Nzc3Nzc3M9PUUBc3Nzc3PD/wAAgA8AAIABAACAAAAAgAAAAIAA
AACAAAAAgAAAAIAAAACAAAAAgAAAAMAAAADgAQAA8AMAAPgHAAD+HwAAKAAAABAAAAAgAAAAAQAgAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC2hoWcoXVx23JNRuVGKh7dOh8TzUAkGL1LLiOpTzEmiksu
JWJDJh1GSi4jOlI0Jy9TNSoiTC8mFkQzIgwAAAAAwpGQzsyZmf/Wo5n/zJmZ/7qKif2WbGj4c1BI708x
Jt84HxLNPSIWwUksIK9OMieVTzEnc0MmHUZEKRstAAAAAMKRkM7PnJn/36+b///ToP/yw5z/6LWZ/9uo
mf/Om5n/w5KR/p90cPp8V1DyY0E45jofE9E5HxK6RikfjQAAAADCkZDO78Ge/8+dmv/syqr//+Sx///f
rP//2KX//9Og//XFnP/qt5n/3aqZ/9Cdmf/MmZn/oHVx9jcdEbMAAAAAwpGQzvLWsP/y063/z5+c//Xp
v///+MX///K////qt///5LH//9+s///Ypf/1x53/zpuZ/8yZmf80Gw69AAAAAMKRkM7y473///nG/+bK
sP/WrKX//PnU////0////9D///zK///4xf/867v/1qee/92qmf/MmZn/MxoNvwAAAADCkZDO8ubH////
0////8//2bOm/9+/t////+j////i////3//8+dX/1qyj/9+1ov//2qf/zJmZ/zMaDb8AAAAAwpGQzvLm
0P///+D/8ubK/9aspf/MmZn/37+6//Lm3f/17N7/1qyn/9++q///9sP///C9/8yZmf8zGg2/AAAAAMSS
kc3s2c7/3Lmx/8+fn//b0dL/2/Dy/8vDxv+/rbP/zJmZ/8Ghpv/fv63////P////zP/MmZn/MxoNvwAA
AADFk5PKzJmZ/7yzuf/8+fn//P////T////v////6P///+L////a+fn/zqys/9+/sf///9n/zJmZ/zQb
Dr0AAAAAxJKSmZmMmf9Qlrn/////////////////+f////P////s////5v///9Dv8v+zmZ//37+2/8yZ
mf84HRGyAAAAAE0zMwidiZKqQIyz/9/s8v+/2eb/j7zS/4CzzP8/jLP/PYyz/yt5pv9Adpn/c4OZ/8yZ
mf/MmZn/TC4kiAAAAACAAAACRi4XCRFoltVNeZn/Vpy5/1642f9wwub/i875/5PP//+RzP//i8T//7al
uf/MmZn/pHh1u0wuJjYAAAAAAAAAAIAAAAJGLi4JwI+Ojcmfn/+i4+z/l+z//5bi//+V2f//m8ry/76m
s//BkI/zjGVfgE8zJSxVNSsTAAAAAAAAAAAAAAAAgAAAAk0zMwi8i4pwyZ+f/6zT2f+k2Ob/rsPS/8md
n/+oe3jOaUg/Uk83KyJLPC0OZjMzBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMyZmVDMmZm/zJmZv8yZ
ma/MmZlAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAEBgABzc4AAc3OAAHNzgAAKDoAAAQGAAAEBgABzc4AA
DBSAABEPgAACAIAAAXOAABoTwAAwJOAAEhD8HwMB
</value>
</data>
</root>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save