Öhm alles mögliche, erste brauchbare version
This commit is contained in:
@@ -58,7 +58,7 @@ namespace Speak
|
||||
DatabaseEventInfo d = DatabaseEventInfo.FromHandle(lParam);
|
||||
if (d.Type == DatabaseEventType.Message && !((d.Flags & DatabaseEventProperties.Sent) == DatabaseEventProperties.Sent))
|
||||
{
|
||||
ContactInfo c = ContactInfo.FromHandle(d.GetContactHandle());
|
||||
ContactInfo c = ContactInfo.FromHandle(wParam);
|
||||
Settings s = Settings.getInstance();
|
||||
if (s.canMessageRead(d.Data, c.UniqueID.ToString()))
|
||||
{
|
||||
@@ -86,7 +86,7 @@ namespace Speak
|
||||
{
|
||||
TextToSpeak tts = TextToSpeak.getInstance();
|
||||
string text = String.Format(s.getStatusString(c.Status), c.DisplayName, c.Status.ToString());
|
||||
tts.speak(text,"");
|
||||
tts.speak(text, text + DateTime.Now.Ticks.ToString());
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -28,21 +28,21 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\..\..\Desktop\Miranda\Plugins\</OutputPath>
|
||||
<OutputPath>E:\Programme\Miranda\Plugins\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DocumentationFile>..\..\..\..\..\Desktop\Miranda\Plugins\Speak.master.XML</DocumentationFile>
|
||||
<DocumentationFile>..\..\Out\Plugins\XML\Speak.master.XML</DocumentationFile>
|
||||
<NoWarn>1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Win32Resource>C:\Users\netz\Documents\Visual Studio 2012\Projects\Speak\Speak\Opt\dialog.res</Win32Resource>
|
||||
<Win32Resource>D:\Visual Studio 2012\Projects\miranda\Speak\Speak\Opt\dialog.res</Win32Resource>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Hyphen">
|
||||
<HintPath>..\..\..\..\..\Desktop\Miranda\Plugins\Hyphen.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Reference Include="Hyphen, Version=0.8.3000.909, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Hyphen\Virtuoso.Hyphen\bin\Release\Hyphen.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Drawing" />
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speak", "Speak.csproj", "{EC92954F-19E9-43D6-8871-09C651108FA9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EC92954F-19E9-43D6-8871-09C651108FA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EC92954F-19E9-43D6-8871-09C651108FA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EC92954F-19E9-43D6-8871-09C651108FA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EC92954F-19E9-43D6-8871-09C651108FA9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -57,7 +57,10 @@ namespace Speak.Storage
|
||||
Contact c = new Contact(item.Status.ToString(),
|
||||
Options.readDBBool("message", "speak_config", item.MirandaHandle, true),
|
||||
Options.readDBBool("status", "speak_config", item.MirandaHandle, true));
|
||||
this.contactlist.Add(item.UniqueID.ToString(), c);
|
||||
if (!this.contactlist.Keys.Contains(item.UniqueID.ToString()))
|
||||
{
|
||||
this.contactlist.Add(item.UniqueID.ToString(), c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,14 @@ namespace Speak.TTS
|
||||
catch (InvalidOperationException) { }
|
||||
if (text != "")
|
||||
{
|
||||
syn.Speak(text);
|
||||
try
|
||||
{
|
||||
syn.Speak(text);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(e.Message, e.Source, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -105,7 +112,14 @@ namespace Speak.TTS
|
||||
{
|
||||
if (voice == "")
|
||||
return false;
|
||||
this.syn.SelectVoice(voice);
|
||||
try
|
||||
{
|
||||
this.syn.SelectVoice(voice);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return this.syn.Voice.Name == voice;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user