mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-01 08:34:11 +02:00
80 lines
2.0 KiB
C#
80 lines
2.0 KiB
C#
using TweetDck.Core.Utils;
|
|
|
|
namespace TweetDck.Core.Handling{
|
|
class TweetDeckBridge{
|
|
private readonly FormBrowser form;
|
|
|
|
public string BrandName{
|
|
get{
|
|
return Program.BrandName;
|
|
}
|
|
}
|
|
|
|
public string VersionTag{
|
|
get{
|
|
return Program.VersionTag;
|
|
}
|
|
}
|
|
|
|
public bool UpdateCheckEnabled{
|
|
get{
|
|
return Program.UserConfig.EnableUpdateCheck;
|
|
}
|
|
}
|
|
|
|
public string DismissedVersionTag{
|
|
get{
|
|
return Program.UserConfig.DismissedUpdate ?? string.Empty;
|
|
}
|
|
}
|
|
|
|
public TweetDeckBridge(FormBrowser form){
|
|
this.form = form;
|
|
}
|
|
|
|
public void LoadFontSizeClass(string fsClass){
|
|
form.InvokeSafe(() => {
|
|
TweetNotification.SetFontSizeClass(fsClass);
|
|
});
|
|
}
|
|
|
|
public void LoadNotificationHeadContents(string headContents){
|
|
form.InvokeSafe(() => {
|
|
TweetNotification.SetHeadTag(headContents);
|
|
});
|
|
}
|
|
|
|
public void OpenSettingsMenu(){
|
|
form.InvokeSafe(() => {
|
|
form.OpenSettings();
|
|
});
|
|
}
|
|
|
|
public void OnTweetPopup(string tweetHtml, int tweetCharacters){
|
|
form.InvokeSafe(() => {
|
|
form.OnTweetPopup(new TweetNotification(tweetHtml,tweetCharacters));
|
|
});
|
|
}
|
|
|
|
public void OnUpdateAccepted(string versionTag, string downloadUrl){
|
|
form.InvokeSafe(() => {
|
|
});
|
|
}
|
|
|
|
public void OnUpdateDismissed(string versionTag){
|
|
form.InvokeSafe(() => {
|
|
Program.UserConfig.DismissedUpdate = versionTag;
|
|
Program.UserConfig.Save();
|
|
});
|
|
}
|
|
|
|
public void OpenBrowser(string url){
|
|
BrowserUtils.OpenExternalBrowser(url);
|
|
}
|
|
|
|
public void Log(string data){
|
|
System.Diagnostics.Debug.WriteLine(data);
|
|
}
|
|
}
|
|
}
|