Skip to content

Commit

Permalink
Beta20
Browse files Browse the repository at this point in the history
  • Loading branch information
briandunnington committed Aug 17, 2009
1 parent 4bd4370 commit 575cb64
Show file tree
Hide file tree
Showing 75 changed files with 2,431 additions and 807 deletions.
9 changes: 8 additions & 1 deletion Growl Connectors/NET/NET.sln
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NET", "Sample App\NET.csproj", "{455C376A-D658-405D-922F-26F9DC530808}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Csharp Example", "Sample App\Csharp Example.csproj", "{455C376A-D658-405D-922F-26F9DC530808}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libraries", "libraries", "{EB7CE495-2FB9-432B-B4E4-D061D61D50E9}"
ProjectSection(SolutionItems) = preProject
libraries\Growl.Connector.dll = libraries\Growl.Connector.dll
libraries\Growl.CoreLibrary.dll = libraries\Growl.CoreLibrary.dll
libraries\license.txt = libraries\license.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A8D53781-E9E8-45D1-AF7E-340C67509245}"
ProjectSection(SolutionItems) = preProject
Growl for Windows - Application Integration Guide.doc = Growl for Windows - Application Integration Guide.doc
EndProjectSection
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VB.NET Example", "VB.NET Example\VB.NET Example.vbproj", "{7D82D19D-231D-41FD-B3FE-FC0AAA2D7936}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -24,6 +27,10 @@ Global
{455C376A-D658-405D-922F-26F9DC530808}.Debug|Any CPU.Build.0 = Debug|Any CPU
{455C376A-D658-405D-922F-26F9DC530808}.Release|Any CPU.ActiveCfg = Release|Any CPU
{455C376A-D658-405D-922F-26F9DC530808}.Release|Any CPU.Build.0 = Release|Any CPU
{7D82D19D-231D-41FD-B3FE-FC0AAA2D7936}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D82D19D-231D-41FD-B3FE-FC0AAA2D7936}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D82D19D-231D-41FD-B3FE-FC0AAA2D7936}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D82D19D-231D-41FD-B3FE-FC0AAA2D7936}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions Growl Connectors/NET/Sample App/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ private void button1_Click(object sender, EventArgs e)

private void button2_Click(object sender, EventArgs e)
{
CallbackContext callbackContext = new CallbackContext();
callbackContext.Data = "some fake information";
callbackContext.Type = "fake data";
CallbackContext callbackContext = new CallbackContext("some fake information", "fake data");

Notification notification = new Notification(this.application.Name, this.notificationType.Name, DateTime.Now.Ticks.ToString(), this.textBox2.Text, this.textBox3.Text);
this.growl.Notify(notification, callbackContext);
Expand Down
146 changes: 146 additions & 0 deletions Growl Connectors/NET/VB.NET Example/Form1.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 120 additions & 0 deletions Growl Connectors/NET/VB.NET Example/Form1.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?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>
</root>
44 changes: 44 additions & 0 deletions Growl Connectors/NET/VB.NET Example/Form1.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Imports Growl.Connector

Public Class Form1

Dim WithEvents growl As GrowlConnector
Dim nt As NotificationType
Dim app As Growl.Connector.Application
Dim sampleNotificationType As String = "SAMPLE_NOTIFICATION"


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.nt = New NotificationType(Me.sampleNotificationType, "Sample Notification")

Me.growl = New GrowlConnector()
'Me.growl = New GrowlConnector("password") ' use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password
'Me.growl = New GrowlConnector("password", "hostname", GrowlConnector.TCP_PORT) ' use this if you want to connect to a remote Growl instance on another machine

' set this so messages are sent in plain text (easier for debugging)
Me.growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText
End Sub


Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Me.app = New Growl.Connector.Application(Me.textBox1.Text)
Dim types() As NotificationType = New NotificationType() {Me.nt}

Me.growl.Register(Me.app, types)

Me.Panel1.Visible = True
End Sub

Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
Dim cc As CallbackContext = New CallbackContext("some fake information", "fake data")

Dim n As New Notification(Me.app.Name, Me.nt.Name, DateTime.Now.Ticks.ToString(), Me.textBox2.Text, Me.textBox3.Text)
Me.growl.Notify(n, cc)
End Sub

Private Sub growl_NotificationCallback(ByVal response As Response, ByVal callbackData As CallbackData) Handles growl.NotificationCallback
Dim text As String = String.Format("Response Type: {0} - Notification ID: {1} - Callback Data: {2} - Callback Data Type: {3}", callbackData.Result, callbackData.NotificationID, callbackData.Data, callbackData.Type)
MessageBox.Show(text, "Callback received", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
End Sub

End Class

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 575cb64

Please sign in to comment.