miranda plugins einckecken
This commit is contained in:
parent
6aa31238bf
commit
2f5cfa1261
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -965,16 +965,16 @@
|
||||
MainClass of Speak
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Speak.MainClass.AfterPluginInitialization">
|
||||
<summary>
|
||||
Run after the Plugin Initialisation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Speak.MainClass.VERSION">
|
||||
<summary>
|
||||
Get Version
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Speak.MainClass.AfterPluginInitialization">
|
||||
<summary>
|
||||
Run after the Plugin Initialisation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Speak.MainClass.Author">
|
||||
<summary>
|
||||
Get Author
|
||||
|
Binary file not shown.
Binary file not shown.
@ -965,16 +965,16 @@
|
||||
MainClass of Speak
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Speak.MainClass.AfterPluginInitialization">
|
||||
<summary>
|
||||
Run after the Plugin Initialisation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Speak.MainClass.VERSION">
|
||||
<summary>
|
||||
Get Version
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Speak.MainClass.AfterPluginInitialization">
|
||||
<summary>
|
||||
Run after the Plugin Initialisation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Speak.MainClass.Author">
|
||||
<summary>
|
||||
Get Author
|
||||
|
@ -22,7 +22,14 @@ namespace Speak
|
||||
/// </summary>
|
||||
public class MainClass : StandalonePlugin
|
||||
{
|
||||
/// <summary>
|
||||
/// Get Version
|
||||
/// </summary>
|
||||
public const String VERSION = "1.0.1.1";
|
||||
|
||||
private Options option;
|
||||
private DateTime status_pause = DateTime.Now;
|
||||
private Dictionary<string, StatusMode> statusmodes = new Dictionary<string, StatusMode>();
|
||||
|
||||
private MainClass()
|
||||
{
|
||||
@ -42,14 +49,46 @@ namespace Speak
|
||||
EventManager.CreateEventHook(API.ME_OPT_INITIALISE, this.option.Opts, this);
|
||||
EventManager.CreateEventHook(API.ME_DB_EVENT_ADDED, Message, this);
|
||||
EventManager.CreateEventHook(API.ME_DB_CONTACT_SETTINGCHANGED, StatusChange, this);
|
||||
Protocol.StatusChanged += StatusModeChange;
|
||||
SpeakWelcome();
|
||||
}
|
||||
|
||||
private bool StatusModeChange(object sender, ProtocolStatusChangeEventArgs e)
|
||||
{
|
||||
StatusMode old = StatusMode.Offline;
|
||||
StatusMode neu = e.NewStatus;
|
||||
if (statusmodes.ContainsKey(e.Protocol.Name))
|
||||
{
|
||||
old = statusmodes[e.Protocol.Name];
|
||||
statusmodes[e.Protocol.Name] = neu;
|
||||
}
|
||||
else
|
||||
{
|
||||
statusmodes.Add(e.Protocol.Name, neu);
|
||||
}
|
||||
if (!Settings.getInstance().getActiveConnect())
|
||||
{
|
||||
if (old == StatusMode.Offline && neu != StatusMode.Offline)
|
||||
{
|
||||
this.status_pause = DateTime.Now.AddSeconds(5);
|
||||
}
|
||||
}
|
||||
if (!Settings.getInstance().getActiveDisconnect())
|
||||
{
|
||||
if (old != StatusMode.Offline && neu == StatusMode.Offline)
|
||||
{
|
||||
this.status_pause = DateTime.Now.AddSeconds(5);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void BeforePluginDisable()
|
||||
{
|
||||
EventManager.RemoveEventHook(API.ME_OPT_INITIALISE, this);
|
||||
EventManager.RemoveEventHook(API.ME_DB_EVENT_ADDED, this);
|
||||
EventManager.RemoveEventHook(API.ME_DB_CONTACT_SETTINGCHANGED, this);
|
||||
Protocol.StatusChanged -= null;
|
||||
TextToSpeak.getInstance().Stop();
|
||||
}
|
||||
|
||||
@ -84,9 +123,12 @@ namespace Speak
|
||||
{
|
||||
if (s.canStatusRead(c.UniqueID.ToString()))
|
||||
{
|
||||
TextToSpeak tts = TextToSpeak.getInstance();
|
||||
string text = String.Format(s.getStatusString(c.Status), c.DisplayName, c.Status.ToString());
|
||||
tts.speak(text, text + DateTime.Now.Ticks.ToString());
|
||||
if (status_pause <= DateTime.Now)
|
||||
{
|
||||
TextToSpeak tts = TextToSpeak.getInstance();
|
||||
string text = String.Format(s.getStatusString(c.Status), c.DisplayName, c.Status.ToString());
|
||||
tts.speak(text, text + DateTime.Now.Ticks.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@ -124,18 +166,13 @@ namespace Speak
|
||||
{
|
||||
try
|
||||
{
|
||||
Update update = new Update(this, new Uri(this.HomePage.ToString() + "files/miranda/speak_last.zip"), new Uri(this.HomePage.ToString() + "files/miranda/speak_updater_version.txt"), " ");
|
||||
Update update = new Update(this, new Uri(this.HomePage.ToString() + "files/speak_last.zip"), new Uri(this.HomePage.ToString() + "files/speak_updater_version.txt"), " ");
|
||||
UpdaterPlugin.RegisterForUpdate(update);
|
||||
}
|
||||
catch (NotSupportedException) { }
|
||||
}
|
||||
|
||||
#region Constants
|
||||
/// <summary>
|
||||
/// Get Version
|
||||
/// </summary>
|
||||
private static Version VERSION = new Version(0, 8, 0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Get Author
|
||||
/// </summary>
|
||||
@ -165,7 +202,7 @@ namespace Speak
|
||||
/// </summary>
|
||||
public override Uri HomePage
|
||||
{
|
||||
get { return new Uri("http://dev.blubbfish.net"); }
|
||||
get { return new Uri("http://miranda.blubbfish.net"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -181,7 +218,7 @@ namespace Speak
|
||||
/// </summary>
|
||||
public override Version Version
|
||||
{
|
||||
get { return VERSION; }
|
||||
get { return new Version(VERSION); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion(Speak.MainClass.VERSION)]
|
||||
[assembly: AssemblyFileVersion(Speak.MainClass.VERSION)]
|
||||
|
@ -28,7 +28,7 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>E:\Programme\Miranda\Plugins\</OutputPath>
|
||||
<OutputPath>..\..\Out\Plugins\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -156,5 +156,17 @@ namespace Speak.Storage
|
||||
}
|
||||
return "{0} ist {1}";
|
||||
}
|
||||
|
||||
public bool getActiveConnect()
|
||||
{
|
||||
return Options.readDBBool("active_connect", "speak_config", false);
|
||||
/*SetCheckState(hWnd, IDI_ANNOUNCE_DISCONNECT, );
|
||||
SetCheckState(hWnd, IDI_ANNOUNCE_SHUTDOWN, readDBBool("active_shutdown", "speak_config"));*/
|
||||
}
|
||||
|
||||
public bool getActiveDisconnect()
|
||||
{
|
||||
return Options.readDBBool("active_disconnect", "speak_config", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,76 +4,77 @@ namespace Speak.Structs
|
||||
{
|
||||
internal static class API
|
||||
{
|
||||
public static string MS_SYSTEM_GETVERSION = "Miranda/System/GetVersion";
|
||||
public const string MS_SYSTEM_GETVERSION = "Miranda/System/GetVersion";
|
||||
|
||||
public static string MS_DB_EVENT_ADD = "DB/Event/Add";
|
||||
public static string MS_DB_EVENT_GET = "DB/Event/Get";
|
||||
public static string MS_DB_EVENT_DELETE = "DB/Event/Delete";
|
||||
public static string MS_DB_EVENT_GETBLOBSIZE = "DB/Event/GetBlobSize";
|
||||
public static string MS_DB_TIME_TIMESTAMPTOLOCAL = "DB/Time/TimestampToLocal";
|
||||
public const string MS_DB_EVENT_ADD = "DB/Event/Add";
|
||||
public const string MS_DB_EVENT_GET = "DB/Event/Get";
|
||||
public const string MS_DB_EVENT_DELETE = "DB/Event/Delete";
|
||||
public const string MS_DB_EVENT_GETBLOBSIZE = "DB/Event/GetBlobSize";
|
||||
public const string MS_DB_TIME_TIMESTAMPTOLOCAL = "DB/Time/TimestampToLocal";
|
||||
|
||||
|
||||
public static string MS_PROTO_ADDTOCONTACT = "Proto/AddToContact";
|
||||
public static string MS_PROTO_ISPROTOONCONTACT = "Proto/IsProtoOnContact";
|
||||
public static string MS_PROTO_REGISTERMODULE = "Proto/RegisterModule";
|
||||
public static string MS_PROTO_CHAINSEND = "Proto/ChainSend";
|
||||
public static string MS_PROTO_CHAINRECV = "Proto/ChainRecv";
|
||||
public static string MS_PROTO_CALLCONTACTSERVICE = "Proto/CallContactService";
|
||||
public static string MS_PROTO_GETCONTACTBASEPROTO = "Proto/GetContactBaseProto";
|
||||
public const string MS_PROTO_ADDTOCONTACT = "Proto/AddToContact";
|
||||
public const string MS_PROTO_ISPROTOONCONTACT = "Proto/IsProtoOnContact";
|
||||
public const string MS_PROTO_REGISTERMODULE = "Proto/RegisterModule";
|
||||
public const string MS_PROTO_CHAINSEND = "Proto/ChainSend";
|
||||
public const string MS_PROTO_CHAINRECV = "Proto/ChainRecv";
|
||||
public const string MS_PROTO_CALLCONTACTSERVICE = "Proto/CallContactService";
|
||||
public const string MS_PROTO_GETCONTACTBASEPROTO = "Proto/GetContactBaseProto";
|
||||
|
||||
public static string PS_SETSTATUS = "/SetStatus";
|
||||
public static string PS_GETSTATUS = "/GetStatus";
|
||||
public const string PS_SETSTATUS = "/SetStatus";
|
||||
public const string PS_GETSTATUS = "/GetStatus";
|
||||
|
||||
public static string PSR_MESSAGE = "/RecvMessage";
|
||||
public static string PSR_MESSAGEW = "/RecvMessageW";
|
||||
public static string PSS_MESSAGE = "/SendMsg";
|
||||
public static string PSS_MESSAGEW = "/SendMsgW"; // instant send msg
|
||||
public const string PSR_MESSAGE = "/RecvMessage";
|
||||
public const string PSR_MESSAGEW = "/RecvMessageW";
|
||||
public const string PSS_MESSAGE = "/SendMsg";
|
||||
public const string PSS_MESSAGEW = "/SendMsgW"; // instant send msg
|
||||
|
||||
public static string MS_MSG_SENDMESSAGE = "SRMsg/SendCommand"; // type msg
|
||||
public static string ME_MSG_WINDOWEVENT = "MessageAPI/WindowEvent";
|
||||
public const string MS_MSG_SENDMESSAGE = "SRMsg/SendCommand"; // type msg
|
||||
public const string ME_MSG_WINDOWEVENT = "MessageAPI/WindowEvent";
|
||||
|
||||
public static string MS_SKIN2_ADDICON = "Skin2/Icons/AddIcon";
|
||||
public static string MS_SKIN2_GETICON = "Skin2/Icons/GetIcon";
|
||||
public static string MS_SKIN2_GETICONBYHANDLE = "Skin2/Icons/GetIconByHandle";
|
||||
public static string ME_SKIN2_ICONSCHANGED = "Skin2/IconsChanged";
|
||||
public const string MS_SKIN2_ADDICON = "Skin2/Icons/AddIcon";
|
||||
public const string MS_SKIN2_GETICON = "Skin2/Icons/GetIcon";
|
||||
public const string MS_SKIN2_GETICONBYHANDLE = "Skin2/Icons/GetIconByHandle";
|
||||
public const string ME_SKIN2_ICONSCHANGED = "Skin2/IconsChanged";
|
||||
|
||||
public static string MS_BB_ADDBUTTON = "TabSRMM/ButtonsBar/AddButton";
|
||||
public static string MS_BB_REMOVEBUTTON = "TabSRMM/ButtonsBar/RemoveButton";
|
||||
public static string MS_BB_GETBUTTONSTATE = "TabSRMM/ButtonsBar/GetButtonState";
|
||||
public static string MS_BB_SETBUTTONSTATE = "TabSRMM/ButtonsBar/SetButtonState";
|
||||
public static string ME_MSG_TOOLBARLOADED = "TabSRMM/ButtonsBar/ModuleLoaded";
|
||||
public static string ME_MSG_BUTTONPRESSED = "TabSRMM/ButtonsBar/ButtonPressed";
|
||||
public const string MS_BB_ADDBUTTON = "TabSRMM/ButtonsBar/AddButton";
|
||||
public const string MS_BB_REMOVEBUTTON = "TabSRMM/ButtonsBar/RemoveButton";
|
||||
public const string MS_BB_GETBUTTONSTATE = "TabSRMM/ButtonsBar/GetButtonState";
|
||||
public const string MS_BB_SETBUTTONSTATE = "TabSRMM/ButtonsBar/SetButtonState";
|
||||
public const string ME_MSG_TOOLBARLOADED = "TabSRMM/ButtonsBar/ModuleLoaded";
|
||||
public const string ME_MSG_BUTTONPRESSED = "TabSRMM/ButtonsBar/ButtonPressed";
|
||||
|
||||
public static string ME_IEVIEW_OPTIONSCHANGED = "IEVIEW/OptionsChanged";
|
||||
public static string ME_DB_CONTACT_SETTINGCHANGED = "DB/Contact/SettingChanged";
|
||||
public const string ME_IEVIEW_OPTIONSCHANGED = "IEVIEW/OptionsChanged";
|
||||
public const string ME_DB_CONTACT_SETTINGCHANGED = "DB/Contact/SettingChanged";
|
||||
|
||||
public static string ME_DB_EVENT_ADDED = "DB/Event/Added";
|
||||
public const string ME_DB_EVENT_ADDED = "DB/Event/Added";
|
||||
|
||||
public static string MS_UTILS_OPENURL = "Utils/OpenURL";
|
||||
public const string MS_UTILS_OPENURL = "Utils/OpenURL";
|
||||
|
||||
public static string ME_OPT_INITIALISE = "Opt/Initialise";
|
||||
public static string MS_OPT_ADDPAGE = "Opt/AddPage";
|
||||
public const string ME_OPT_INITIALISE = "Opt/Initialise";
|
||||
public const string MS_OPT_ADDPAGE = "Opt/AddPage";
|
||||
|
||||
public static string MS_GC_NEWSESSION = "GChat/NewChat";
|
||||
public const string MS_GC_NEWSESSION = "GChat/NewChat";
|
||||
|
||||
public static string MS_MSG_GETWINDOWCLASS = "MessageAPI/WindowClass";
|
||||
public const string MS_MSG_GETWINDOWCLASS = "MessageAPI/WindowClass";
|
||||
|
||||
public static string MS_PROTO_ENUMPROTOS = "Proto/EnumProtos";
|
||||
public static string MS_PROTO_ENUMPROTOCOLS = "Proto/EnumProtocols";
|
||||
public static string MS_PROTO_ENUMACCOUNTS = "Proto/EnumAccounts";
|
||||
public const string MS_PROTO_ENUMPROTOS = "Proto/EnumProtos";
|
||||
public const string MS_PROTO_ENUMPROTOCOLS = "Proto/EnumProtocols";
|
||||
public const string MS_PROTO_ENUMACCOUNTS = "Proto/EnumAccounts";
|
||||
|
||||
public static string MS_IEVIEW_WINDOW = "IEVIEW/NewWindow";
|
||||
public const string MS_IEVIEW_WINDOW = "IEVIEW/NewWindow";
|
||||
|
||||
public static string ME_HPP_RICHEDIT_ITEMPROCESS = "History++/RichEdit/ItemProcessEvent";
|
||||
public static string MS_HPP_EG_WINDOW = "History++/ExtGrid/NewWindow";
|
||||
public static string MS_HPP_GETVERSION = "History++/GetVersion";
|
||||
public const string ME_HPP_RICHEDIT_ITEMPROCESS = "History++/RichEdit/ItemProcessEvent";
|
||||
public const string MS_HPP_EG_WINDOW = "History++/ExtGrid/NewWindow";
|
||||
public const string MS_HPP_GETVERSION = "History++/GetVersion";
|
||||
|
||||
public static string MS_DB_GETPROFILEPATH = "DB/GetProfilePath";
|
||||
public static string MS_DB_GETPROFILENAME = "DB/GetProfileName";
|
||||
public const string MS_DB_GETPROFILEPATH = "DB/GetProfilePath";
|
||||
public const string MS_DB_GETPROFILENAME = "DB/GetProfileName";
|
||||
|
||||
public static Int32 CALLSERVICE_NOTFOUND = unchecked((int) 0x80000000);
|
||||
public static string MS_DB_CONTACT_FINDFIRST = "DB/Contact/FindFirst";
|
||||
public static string MS_DB_CONTACT_FINDNEXT = "DB/Contact/FindNext";
|
||||
public const Int32 CALLSERVICE_NOTFOUND = unchecked((int)0x80000000);
|
||||
public const string MS_DB_CONTACT_FINDFIRST = "DB/Contact/FindFirst";
|
||||
public const string MS_DB_CONTACT_FINDNEXT = "DB/Contact/FindNext";
|
||||
public const string ME_CLIST_STATUSMODECHANGE = "CList/StatusModeChange";
|
||||
|
||||
}
|
||||
|
||||
|
@ -56,11 +56,23 @@ namespace Speak.TTS
|
||||
{
|
||||
try
|
||||
{
|
||||
syn.Speak(text);
|
||||
this.syn.Speak(text);
|
||||
}
|
||||
catch (OutOfMemoryException)
|
||||
{
|
||||
string voice = this.syn.Voice.Name;
|
||||
int vol = this.syn.Volume;
|
||||
int rate = this.syn.Rate;
|
||||
this.syn = null;
|
||||
this.syn = new SpeechSynthesizer();
|
||||
this.setVoice(voice);
|
||||
this.setVolume(vol);
|
||||
this.setRate(rate);
|
||||
quene.Enqueue(text);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(e.Message, e.Source, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
System.Windows.Forms.MessageBox.Show(e.ToString(), "Fehler in: " + e.Source, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
BIN
library/Managed/AutoConnect.dll
Normal file
BIN
library/Managed/AutoConnect.dll
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user