Winify

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 74  →  ?path2? @ 75
/trunk/Announcements/Announcement.cs
@@ -79,6 +79,19 @@
}
}
 
[XmlElement(ElementName = "Chime")]
public byte[] Chime
{
get => _chime;
set
{
if (value == _chime) return;
 
_chime = value;
OnPropertyChanged();
}
}
 
#endregion
 
#region Private Delegates, Events, Enums, Properties, Indexers and Fields
@@ -93,6 +106,8 @@
 
private bool _enableChime = true;
 
private byte[] _chime = new byte[] {};
 
#endregion
 
#region Constructors, Destructors and Finalizers
/trunk/Announcements/Announcements.xsd
@@ -13,6 +13,7 @@
<xsd:element name="LingerTime" type="xsd:decimal" />
<xsd:element name="Ignore" type="xsd:boolean" />
<xsd:element name="EnableChime" type="xsd:boolean" />
<xs:element type="xs:base64Binary" name="Chime"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
/trunk/Configuration/Configuration.cs
@@ -14,6 +14,7 @@
private int _toastDuration = 5000;
private bool _infiniteToastDuration;
private int _retrievePastNotificationHours;
private byte[] _chime;
 
public bool LaunchOnBoot
{
@@ -81,6 +82,17 @@
}
}
 
public byte[] Chime
{
get => _chime;
set
{
if (Equals(value, _proxy)) return;
_chime = value;
OnPropertyChanged();
}
}
 
[UsedImplicitly]
public Configuration()
{
/trunk/Configuration/Configuration.xsd
@@ -8,6 +8,18 @@
<xsd:sequence>
<xsd:element name="LaunchOnBoot" type="xsd:boolean" />
<xsd:element name="IgnoreSelfSignedCertificates" type="xsd:boolean" />
<xsd:element name="ToastDuration" type="xsd:integer" />
<xsd:element name="InfiniteToastDuration" type="xsd:boolean" />
<xsd:element name="RetrievePastNotificationHours" type="xsd:integer" />
<xs:element name="Proxy">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="Enable"/>
<xs:element type="xs:anyURI" name="Url"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element type="xs:base64Binary" name="Chime"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
/trunk/Winify/MainForm.cs
@@ -217,6 +217,7 @@
e.Message.Message)
{
EnableChime = announcement.EnableChime,
Chime = announcement.Chime ?? Configuration.Chime,
LingerTime = (int)announcement.LingerTime,
Image = e.Image
};
@@ -232,6 +233,7 @@
$"{e.Message.Title} ({e.Message.Server.Name}/{e.Message.AppId})",
e.Message.Message)
{
Chime = Configuration.Chime,
Image = e.Image
};
 
@@ -244,6 +246,7 @@
$"{e.Message.Title} ({e.Message.Server.Name}/{e.Message.AppId})",
e.Message.Message)
{
Chime = Configuration.Chime,
LingerTime = Configuration.ToastDuration,
Image = e.Image
};
/trunk/Winify/Settings/SettingsForm.Designer.cs
@@ -52,6 +52,9 @@
this.label13 = new System.Windows.Forms.Label();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.textBox4 = new System.Windows.Forms.TextBox();
this.groupBox9 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel15 = new System.Windows.Forms.TableLayoutPanel();
this.button7 = new System.Windows.Forms.Button();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
@@ -74,6 +77,7 @@
this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel10 = new System.Windows.Forms.TableLayoutPanel();
this.label16 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.appIdTextBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
@@ -80,6 +84,9 @@
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.label14 = new System.Windows.Forms.Label();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.label15 = new System.Windows.Forms.Label();
this.button8 = new System.Windows.Forms.Button();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel();
this.button4 = new System.Windows.Forms.Button();
@@ -100,8 +107,8 @@
this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.label15 = new System.Windows.Forms.Label();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.globalChimeOpenFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.announcementsChimeOpenFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.tabControl1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
@@ -114,6 +121,8 @@
this.groupBox8.SuspendLayout();
this.tableLayoutPanel14.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
this.groupBox9.SuspendLayout();
this.tableLayoutPanel15.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
this.groupBox1.SuspendLayout();
@@ -164,6 +173,7 @@
this.flowLayoutPanel2.Controls.Add(this.groupBox6);
this.flowLayoutPanel2.Controls.Add(this.groupBox7);
this.flowLayoutPanel2.Controls.Add(this.groupBox8);
this.flowLayoutPanel2.Controls.Add(this.groupBox9);
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
@@ -364,6 +374,40 @@
this.textBox4.Size = new System.Drawing.Size(145, 20);
this.textBox4.TabIndex = 2;
//
// groupBox9
//
this.groupBox9.Controls.Add(this.tableLayoutPanel15);
this.groupBox9.Location = new System.Drawing.Point(3, 146);
this.groupBox9.Name = "groupBox9";
this.groupBox9.Size = new System.Drawing.Size(160, 81);
this.groupBox9.TabIndex = 4;
this.groupBox9.TabStop = false;
this.groupBox9.Text = "Chime";
//
// tableLayoutPanel15
//
this.tableLayoutPanel15.ColumnCount = 1;
this.tableLayoutPanel15.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel15.Controls.Add(this.button7, 0, 0);
this.tableLayoutPanel15.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel15.Location = new System.Drawing.Point(3, 16);
this.tableLayoutPanel15.Name = "tableLayoutPanel15";
this.tableLayoutPanel15.RowCount = 1;
this.tableLayoutPanel15.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel15.Size = new System.Drawing.Size(154, 62);
this.tableLayoutPanel15.TabIndex = 0;
//
// button7
//
this.button7.Anchor = System.Windows.Forms.AnchorStyles.None;
this.button7.Location = new System.Drawing.Point(39, 19);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(75, 23);
this.button7.TabIndex = 0;
this.button7.Text = "Set";
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// tabPage1
//
this.tabPage1.Controls.Add(this.tableLayoutPanel3);
@@ -619,6 +663,7 @@
this.tableLayoutPanel10.ColumnCount = 2;
this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
this.tableLayoutPanel10.Controls.Add(this.label16, 0, 4);
this.tableLayoutPanel10.Controls.Add(this.label4, 0, 0);
this.tableLayoutPanel10.Controls.Add(this.appIdTextBox, 1, 0);
this.tableLayoutPanel10.Controls.Add(this.label6, 0, 1);
@@ -627,19 +672,31 @@
this.tableLayoutPanel10.Controls.Add(this.checkBox5, 1, 2);
this.tableLayoutPanel10.Controls.Add(this.checkBox6, 1, 3);
this.tableLayoutPanel10.Controls.Add(this.label15, 0, 3);
this.tableLayoutPanel10.Controls.Add(this.button8, 1, 4);
this.tableLayoutPanel10.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel10.Location = new System.Drawing.Point(3, 16);
this.tableLayoutPanel10.Name = "tableLayoutPanel10";
this.tableLayoutPanel10.RowCount = 5;
this.tableLayoutPanel10.RowCount = 6;
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel10.Size = new System.Drawing.Size(257, 218);
this.tableLayoutPanel10.TabIndex = 4;
//
// label16
//
this.label16.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(3, 119);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(58, 13);
this.label16.TabIndex = 7;
this.label16.Text = "Chime Clip";
this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
@@ -715,6 +772,39 @@
this.checkBox5.Text = "Enable";
this.checkBox5.UseVisualStyleBackColor = true;
//
// checkBox6
//
this.checkBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox6.AutoSize = true;
this.checkBox6.Location = new System.Drawing.Point(67, 89);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(187, 17);
this.checkBox6.TabIndex = 6;
this.checkBox6.Text = "Enable";
this.checkBox6.UseVisualStyleBackColor = true;
//
// label15
//
this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(3, 91);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(58, 13);
this.label15.TabIndex = 5;
this.label15.Text = "Chime";
this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// button8
//
this.button8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.button8.Location = new System.Drawing.Point(67, 115);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(187, 22);
this.button8.TabIndex = 8;
this.button8.Text = "Set";
this.button8.UseVisualStyleBackColor = true;
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.ColumnCount = 1;
@@ -952,27 +1042,13 @@
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.Button6_Click);
//
// label15
// globalChimeOpenFileDialog1
//
this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(3, 91);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(58, 13);
this.label15.TabIndex = 5;
this.label15.Text = "Chime";
this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.globalChimeOpenFileDialog1.FileName = "openFileDialog1";
//
// checkBox6
// announcementsChimeOpenFileDialog1
//
this.checkBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox6.AutoSize = true;
this.checkBox6.Location = new System.Drawing.Point(67, 89);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(187, 17);
this.checkBox6.TabIndex = 6;
this.checkBox6.Text = "Enable";
this.checkBox6.UseVisualStyleBackColor = true;
this.announcementsChimeOpenFileDialog1.FileName = "openFileDialog1";
//
// SettingsForm
//
@@ -1000,6 +1076,8 @@
this.tableLayoutPanel14.ResumeLayout(false);
this.tableLayoutPanel14.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
this.groupBox9.ResumeLayout(false);
this.tableLayoutPanel15.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tableLayoutPanel3.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
@@ -1097,5 +1175,12 @@
private CheckBox checkBox5;
private Label label15;
private CheckBox checkBox6;
private GroupBox groupBox9;
private TableLayoutPanel tableLayoutPanel15;
private Button button7;
private OpenFileDialog globalChimeOpenFileDialog1;
private Label label16;
private Button button8;
private OpenFileDialog announcementsChimeOpenFileDialog1;
}
}
/trunk/Winify/Settings/SettingsForm.cs
@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
@@ -301,5 +302,41 @@
{
 
}
 
private void button7_Click(object sender, EventArgs e)
{
globalChimeOpenFileDialog1.FileOk += GlobalChimeOpenFileDialog1FileOk;
globalChimeOpenFileDialog1.ShowDialog();
}
 
private void GlobalChimeOpenFileDialog1FileOk(object sender, System.ComponentModel.CancelEventArgs e)
{
globalChimeOpenFileDialog1.FileOk -= GlobalChimeOpenFileDialog1FileOk;
 
if (string.IsNullOrEmpty(globalChimeOpenFileDialog1.FileName) ||
!File.Exists(globalChimeOpenFileDialog1.FileName))
{
return;
}
 
_mainForm.Configuration.Chime = File.ReadAllBytes(globalChimeOpenFileDialog1.FileName);
}
 
private void button8_Click(object sender, EventArgs e)
{
announcementsChimeOpenFileDialog1.FileOk += AnnouncementsChimeOpenFileDialog1_FileOk;
announcementsChimeOpenFileDialog1.ShowDialog();
}
 
private void AnnouncementsChimeOpenFileDialog1_FileOk(object sender, System.ComponentModel.CancelEventArgs e)
{
if (string.IsNullOrEmpty(announcementsChimeOpenFileDialog1.FileName) ||
!File.Exists(announcementsChimeOpenFileDialog1.FileName))
{
return;
}
 
_announcement.Chime = File.ReadAllBytes(announcementsChimeOpenFileDialog1.FileName);
}
}
}
/trunk/Winify/Settings/SettingsForm.resx
@@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="globalChimeOpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="announcementsChimeOpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>210, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>