mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-09-14 10:32:10 +02:00
Compare commits
57 Commits
Author | SHA1 | Date | |
---|---|---|---|
349cfbd2d5 | |||
40303ef74a | |||
6c652122c2 | |||
3658e3a2aa | |||
2b20fcfcd1 | |||
554d427fef | |||
7cf5b23306 | |||
b26a6098eb | |||
7ad927bdaf | |||
4ed30b3619 | |||
edfa9264d5 | |||
f7516b593f | |||
83ff998f9d | |||
47381e0df4 | |||
ba62d57485 | |||
c014c4bc24 | |||
5d1a3fede2 | |||
53b584fe45 | |||
f53d974400 | |||
c4b4ef19cd | |||
3bfc360362 | |||
584f16d375 | |||
b3d84c3217 | |||
dd14ad470e | |||
85b90574b8 | |||
ee5d172468 | |||
7ca4b94361 | |||
31f1546483 | |||
d8a88a19af | |||
12af79de05 | |||
2260dd419d | |||
61a940cc82 | |||
1bbc1e0d7e | |||
921294eeb3 | |||
baaa90f49d | |||
4e25381770 | |||
272877d0ed | |||
555b947bf7 | |||
da29811b16 | |||
241f67fd4d | |||
eb4ce18e31 | |||
ae99fee440 | |||
d116ac5e56 | |||
28db1f4253 | |||
034312e676 | |||
da83d73ba6 | |||
02e8dc3440 | |||
cac6d1f889 | |||
68fa3294d4 | |||
9b983de8c9 | |||
3a37ee719b | |||
61359c2faa | |||
7f7c5ab35b | |||
a1b483d20a | |||
c3db3ce0f2 | |||
7a1e7637ff | |||
04a78a02d3 |
@@ -4,7 +4,8 @@ using System.IO;
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Runtime.Serialization.Formatters.Binary;
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
using TweetDck.Core;
|
using TweetDck.Core;
|
||||||
using TweetDck.Core.Handling;
|
using TweetDck.Core.Controls;
|
||||||
|
using TweetDck.Core.Notification;
|
||||||
using TweetDck.Core.Utils;
|
using TweetDck.Core.Utils;
|
||||||
using TweetDck.Plugins;
|
using TweetDck.Plugins;
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ namespace TweetDck.Configuration{
|
|||||||
|
|
||||||
public bool IsCustomNotificationPositionSet{
|
public bool IsCustomNotificationPositionSet{
|
||||||
get{
|
get{
|
||||||
return CustomNotificationPosition.X != -32000 && CustomNotificationPosition.X != 32000;
|
return CustomNotificationPosition != ControlExtensions.InvisibleLocation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,6 +66,16 @@ namespace TweetDck.Configuration{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string NotificationSoundPath{
|
||||||
|
get{
|
||||||
|
return !string.IsNullOrEmpty(notificationSoundPath) && File.Exists(notificationSoundPath) ? notificationSoundPath : string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
set{
|
||||||
|
notificationSoundPath = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public TrayIcon.Behavior TrayBehavior{
|
public TrayIcon.Behavior TrayBehavior{
|
||||||
get{
|
get{
|
||||||
return trayBehavior;
|
return trayBehavior;
|
||||||
@@ -94,6 +105,7 @@ namespace TweetDck.Configuration{
|
|||||||
|
|
||||||
private int fileVersion;
|
private int fileVersion;
|
||||||
private bool muteNotifications;
|
private bool muteNotifications;
|
||||||
|
private string notificationSoundPath;
|
||||||
private TrayIcon.Behavior trayBehavior;
|
private TrayIcon.Behavior trayBehavior;
|
||||||
|
|
||||||
private UserConfig(string file){
|
private UserConfig(string file){
|
||||||
@@ -103,7 +115,7 @@ namespace TweetDck.Configuration{
|
|||||||
DisplayNotificationTimer = true;
|
DisplayNotificationTimer = true;
|
||||||
NotificationDuration = TweetNotification.Duration.Medium;
|
NotificationDuration = TweetNotification.Duration.Medium;
|
||||||
NotificationPosition = TweetNotification.Position.TopRight;
|
NotificationPosition = TweetNotification.Position.TopRight;
|
||||||
CustomNotificationPosition = new Point(-32000, -32000);
|
CustomNotificationPosition = ControlExtensions.InvisibleLocation;
|
||||||
NotificationEdgeDistance = 8;
|
NotificationEdgeDistance = 8;
|
||||||
NotificationDurationValue = 25;
|
NotificationDurationValue = 25;
|
||||||
EnableUpdateCheck = true;
|
EnableUpdateCheck = true;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<packages xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<package id="cef.redist.x64" version="3.2785.1478" targetFramework="net452" />
|
<package id="cef.redist.x64" version="3.2785.1486" targetFramework="net452" />
|
||||||
<package id="cef.redist.x86" version="3.2785.1478" targetFramework="net452" />
|
<package id="cef.redist.x86" version="3.2785.1486" targetFramework="net452" />
|
||||||
<package id="CefSharp.Common" version="53.0.0-pre01" targetFramework="net452" />
|
<package id="CefSharp.Common" version="53.0.1" targetFramework="net452" />
|
||||||
<package id="CefSharp.WinForms" version="53.0.0-pre01" targetFramework="net452" />
|
<package id="CefSharp.WinForms" version="53.0.1" targetFramework="net452" />
|
||||||
<package id="Microsoft.VC120.CRT.JetBrains" version="12.0.21005.2" targetFramework="net452" />
|
<package id="Microsoft.VC120.CRT.JetBrains" version="12.0.21005.2" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
19
Core/Bridge/CallbackBridge.cs
Normal file
19
Core/Bridge/CallbackBridge.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using TweetDck.Core.Controls;
|
||||||
|
|
||||||
|
namespace TweetDck.Core.Bridge{
|
||||||
|
sealed class CallbackBridge{
|
||||||
|
private readonly Control owner;
|
||||||
|
private readonly Action safeCallback;
|
||||||
|
|
||||||
|
public CallbackBridge(Control owner, Action safeCallback){
|
||||||
|
this.owner = owner;
|
||||||
|
this.safeCallback = safeCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Trigger(){
|
||||||
|
owner.InvokeSafe(safeCallback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -3,16 +3,21 @@ using System.Drawing;
|
|||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using TweetDck.Core.Utils;
|
|
||||||
using TweetDck.Core.Controls;
|
using TweetDck.Core.Controls;
|
||||||
|
using TweetDck.Core.Notification;
|
||||||
|
using TweetDck.Core.Utils;
|
||||||
|
|
||||||
namespace TweetDck.Core.Handling{
|
namespace TweetDck.Core.Bridge{
|
||||||
class TweetDeckBridge{
|
sealed class TweetDeckBridge{
|
||||||
public static string LastRightClickedLink = string.Empty;
|
public static string LastRightClickedLink = string.Empty;
|
||||||
public static string LastHighlightedTweet = string.Empty;
|
public static string LastHighlightedTweet = string.Empty;
|
||||||
public static string LastHighlightedQuotedTweet = string.Empty;
|
public static string LastHighlightedQuotedTweet = string.Empty;
|
||||||
public static string ClipboardImagePath = string.Empty;
|
public static string ClipboardImagePath = string.Empty;
|
||||||
|
|
||||||
|
public static void ResetStaticProperties(){
|
||||||
|
LastRightClickedLink = LastHighlightedTweet = LastHighlightedQuotedTweet = ClipboardImagePath = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
private readonly FormBrowser form;
|
private readonly FormBrowser form;
|
||||||
private readonly FormNotification notification;
|
private readonly FormNotification notification;
|
||||||
|
|
||||||
@@ -34,6 +39,12 @@ namespace TweetDck.Core.Handling{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasCustomNotificationSound{
|
||||||
|
get{
|
||||||
|
return !string.IsNullOrEmpty(Program.UserConfig.NotificationSoundPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool ExpandLinksOnHover{
|
public bool ExpandLinksOnHover{
|
||||||
get{
|
get{
|
||||||
return Program.UserConfig.ExpandLinksOnHover;
|
return Program.UserConfig.ExpandLinksOnHover;
|
||||||
@@ -100,7 +111,10 @@ namespace TweetDck.Core.Handling{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void OnTweetSound(){
|
public void OnTweetSound(){
|
||||||
form.InvokeSafe(form.OnTweetNotification);
|
form.InvokeSafe(() => {
|
||||||
|
form.OnTweetNotification();
|
||||||
|
form.PlayNotificationSound();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnNotificationReady(){
|
public void OnNotificationReady(){
|
||||||
@@ -154,6 +168,10 @@ namespace TweetDck.Core.Handling{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ScreenshotTweet(string html, int width, int height){
|
||||||
|
form.InvokeSafe(() => form.OnTweetScreenshotReady(html, width, height));
|
||||||
|
}
|
||||||
|
|
||||||
public void OpenBrowser(string url){
|
public void OpenBrowser(string url){
|
||||||
BrowserUtils.OpenExternalBrowser(url);
|
BrowserUtils.OpenExternalBrowser(url);
|
||||||
}
|
}
|
@@ -5,6 +5,8 @@ using TweetDck.Core.Utils;
|
|||||||
|
|
||||||
namespace TweetDck.Core.Controls{
|
namespace TweetDck.Core.Controls{
|
||||||
static class ControlExtensions{
|
static class ControlExtensions{
|
||||||
|
public static readonly Point InvisibleLocation = new Point(-32000, -32000);
|
||||||
|
|
||||||
public static void InvokeSafe(this Control control, Action func){
|
public static void InvokeSafe(this Control control, Action func){
|
||||||
if (control.InvokeRequired){
|
if (control.InvokeRequired){
|
||||||
control.Invoke(func);
|
control.Invoke(func);
|
||||||
|
2
Core/FormBrowser.Designer.cs
generated
2
Core/FormBrowser.Designer.cs
generated
@@ -38,7 +38,7 @@
|
|||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(324, 386);
|
this.ClientSize = new System.Drawing.Size(324, 386);
|
||||||
this.Icon = Properties.Resources.icon;
|
this.Icon = Properties.Resources.icon;
|
||||||
this.Location = new System.Drawing.Point(-32000, -32000);
|
this.Location = TweetDck.Core.Controls.ControlExtensions.InvisibleLocation;
|
||||||
this.MinimumSize = new System.Drawing.Size(340, 424);
|
this.MinimumSize = new System.Drawing.Size(340, 424);
|
||||||
this.Name = "FormBrowser";
|
this.Name = "FormBrowser";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||||
|
@@ -13,6 +13,10 @@ using TweetDck.Updates;
|
|||||||
using TweetDck.Plugins;
|
using TweetDck.Plugins;
|
||||||
using TweetDck.Plugins.Enums;
|
using TweetDck.Plugins.Enums;
|
||||||
using TweetDck.Plugins.Events;
|
using TweetDck.Plugins.Events;
|
||||||
|
using System.Media;
|
||||||
|
using TweetDck.Core.Bridge;
|
||||||
|
using TweetDck.Core.Notification;
|
||||||
|
using TweetDck.Core.Notification.Screenshot;
|
||||||
|
|
||||||
namespace TweetDck.Core{
|
namespace TweetDck.Core{
|
||||||
sealed partial class FormBrowser : Form{
|
sealed partial class FormBrowser : Form{
|
||||||
@@ -27,6 +31,7 @@ namespace TweetDck.Core{
|
|||||||
private readonly ChromiumWebBrowser browser;
|
private readonly ChromiumWebBrowser browser;
|
||||||
private readonly PluginManager plugins;
|
private readonly PluginManager plugins;
|
||||||
private readonly UpdateHandler updates;
|
private readonly UpdateHandler updates;
|
||||||
|
private readonly FormNotification notification;
|
||||||
|
|
||||||
private FormSettings currentFormSettings;
|
private FormSettings currentFormSettings;
|
||||||
private FormAbout currentFormAbout;
|
private FormAbout currentFormAbout;
|
||||||
@@ -35,6 +40,9 @@ namespace TweetDck.Core{
|
|||||||
|
|
||||||
private FormWindowState prevState;
|
private FormWindowState prevState;
|
||||||
|
|
||||||
|
private TweetScreenshotManager notificationScreenshotManager;
|
||||||
|
private SoundPlayer notificationSound;
|
||||||
|
|
||||||
public FormBrowser(PluginManager pluginManager, UpdaterSettings updaterSettings){
|
public FormBrowser(PluginManager pluginManager, UpdaterSettings updaterSettings){
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
@@ -44,13 +52,14 @@ namespace TweetDck.Core{
|
|||||||
this.plugins.Reloaded += plugins_Reloaded;
|
this.plugins.Reloaded += plugins_Reloaded;
|
||||||
this.plugins.PluginChangedState += plugins_PluginChangedState;
|
this.plugins.PluginChangedState += plugins_PluginChangedState;
|
||||||
|
|
||||||
FormNotification notification = CreateNotificationForm(true);
|
this.notification = CreateNotificationForm(NotificationFlags.AutoHide | NotificationFlags.TopMost);
|
||||||
notification.CanMoveWindow = () => false;
|
this.notification.CanMoveWindow = () => false;
|
||||||
notification.Show();
|
this.notification.Show();
|
||||||
|
|
||||||
this.browser = new ChromiumWebBrowser("https://tweetdeck.twitter.com/"){
|
this.browser = new ChromiumWebBrowser("https://tweetdeck.twitter.com/"){
|
||||||
MenuHandler = new ContextMenuBrowser(this),
|
MenuHandler = new ContextMenuBrowser(this),
|
||||||
DialogHandler = new DialogHandlerBrowser(this),
|
DialogHandler = new FileDialogHandler(this),
|
||||||
|
JsDialogHandler = new JavaScriptDialogHandler(),
|
||||||
LifeSpanHandler = new LifeSpanHandler()
|
LifeSpanHandler = new LifeSpanHandler()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -65,7 +74,17 @@ namespace TweetDck.Core{
|
|||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
|
|
||||||
Disposed += (sender, args) => browser.Dispose();
|
Disposed += (sender, args) => {
|
||||||
|
browser.Dispose();
|
||||||
|
|
||||||
|
if (notificationScreenshotManager != null){
|
||||||
|
notificationScreenshotManager.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notificationSound != null){
|
||||||
|
notificationSound.Dispose();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.trayIcon.ClickRestore += trayIcon_ClickRestore;
|
this.trayIcon.ClickRestore += trayIcon_ClickRestore;
|
||||||
this.trayIcon.ClickClose += trayIcon_ClickClose;
|
this.trayIcon.ClickClose += trayIcon_ClickClose;
|
||||||
@@ -87,10 +106,6 @@ namespace TweetDck.Core{
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FormNotification CreateNotificationForm(bool autoHide){
|
|
||||||
return new FormNotification(this, plugins, autoHide);
|
|
||||||
}
|
|
||||||
|
|
||||||
// window setup
|
// window setup
|
||||||
|
|
||||||
private void SetupWindow(){
|
private void SetupWindow(){
|
||||||
@@ -122,11 +137,17 @@ namespace TweetDck.Core{
|
|||||||
if (e.Frame.IsMain && BrowserUtils.IsTweetDeckWebsite(e.Frame)){
|
if (e.Frame.IsMain && BrowserUtils.IsTweetDeckWebsite(e.Frame)){
|
||||||
ScriptLoader.ExecuteFile(e.Frame, "code.js");
|
ScriptLoader.ExecuteFile(e.Frame, "code.js");
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
ScriptLoader.ExecuteFile(e.Frame, "debug.js");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (plugins.HasAnyPlugin(PluginEnvironment.Browser)){
|
if (plugins.HasAnyPlugin(PluginEnvironment.Browser)){
|
||||||
ScriptLoader.ExecuteFile(e.Frame, PluginManager.PluginBrowserScriptFile);
|
ScriptLoader.ExecuteFile(e.Frame, PluginManager.PluginBrowserScriptFile);
|
||||||
ScriptLoader.ExecuteFile(e.Frame, PluginManager.PluginGlobalScriptFile);
|
ScriptLoader.ExecuteFile(e.Frame, PluginManager.PluginGlobalScriptFile);
|
||||||
plugins.ExecutePlugins(e.Frame, PluginEnvironment.Browser, true);
|
plugins.ExecutePlugins(e.Frame, PluginEnvironment.Browser, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TweetDeckBridge.ResetStaticProperties();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +177,7 @@ namespace TweetDck.Core{
|
|||||||
private void FormBrowser_ResizeEnd(object sender, EventArgs e){ // also triggers when the window moves
|
private void FormBrowser_ResizeEnd(object sender, EventArgs e){ // also triggers when the window moves
|
||||||
if (!isLoaded)return;
|
if (!isLoaded)return;
|
||||||
|
|
||||||
if (Location.X != -32000){
|
if (Location != ControlExtensions.InvisibleLocation){
|
||||||
Config.BrowserWindow.Save(this);
|
Config.BrowserWindow.Save(this);
|
||||||
Config.Save();
|
Config.Save();
|
||||||
}
|
}
|
||||||
@@ -234,6 +255,20 @@ namespace TweetDck.Core{
|
|||||||
base.WndProc(ref m);
|
base.WndProc(ref m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// notification helpers
|
||||||
|
|
||||||
|
public FormNotification CreateNotificationForm(NotificationFlags flags){
|
||||||
|
return new FormNotification(this, plugins, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PauseNotification(){
|
||||||
|
notification.PauseNotification();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResumeNotification(){
|
||||||
|
notification.ResumeNotification();
|
||||||
|
}
|
||||||
|
|
||||||
// callback handlers
|
// callback handlers
|
||||||
|
|
||||||
public void OpenSettings(){
|
public void OpenSettings(){
|
||||||
@@ -285,12 +320,36 @@ namespace TweetDck.Core{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnTweetNotification(){
|
public void OnTweetNotification(){ // may be called multiple times, once for each type of notification
|
||||||
if (Config.EnableTrayHighlight && !ContainsFocus){
|
if (Config.EnableTrayHighlight && !ContainsFocus){
|
||||||
trayIcon.HasNotifications = true;
|
trayIcon.HasNotifications = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PlayNotificationSound(){
|
||||||
|
if (string.IsNullOrEmpty(Config.NotificationSoundPath)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notificationSound == null){
|
||||||
|
notificationSound = new SoundPlayer();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notificationSound.SoundLocation != Config.NotificationSoundPath){
|
||||||
|
notificationSound.SoundLocation = Config.NotificationSoundPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
notificationSound.Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnTweetScreenshotReady(string html, int width, int height){
|
||||||
|
if (notificationScreenshotManager == null){
|
||||||
|
notificationScreenshotManager = new TweetScreenshotManager(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
notificationScreenshotManager.Trigger(html, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
public void DisplayTooltip(string text){
|
public void DisplayTooltip(string text){
|
||||||
if (string.IsNullOrEmpty(text)){
|
if (string.IsNullOrEmpty(text)){
|
||||||
toolTip.Hide(this);
|
toolTip.Hide(this);
|
||||||
@@ -310,6 +369,10 @@ namespace TweetDck.Core{
|
|||||||
browser.ExecuteScriptAsync("TDGF_tryPasteImageFinish()");
|
browser.ExecuteScriptAsync("TDGF_tryPasteImageFinish()");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TriggerTweetScreenshot(){
|
||||||
|
browser.ExecuteScriptAsync("TDGF_triggerScreenshot()");
|
||||||
|
}
|
||||||
|
|
||||||
public void ReloadBrowser(){
|
public void ReloadBrowser(){
|
||||||
browser.ExecuteScriptAsync("window.location.reload()");
|
browser.ExecuteScriptAsync("window.location.reload()");
|
||||||
}
|
}
|
||||||
|
4
Core/FormNotification.Designer.cs
generated
4
Core/FormNotification.Designer.cs
generated
@@ -1,7 +1,7 @@
|
|||||||
using TweetDck.Core.Controls;
|
using TweetDck.Core.Controls;
|
||||||
|
|
||||||
namespace TweetDck.Core {
|
namespace TweetDck.Core {
|
||||||
sealed partial class FormNotification {
|
partial class FormNotification {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -70,7 +70,7 @@ namespace TweetDck.Core {
|
|||||||
this.Controls.Add(this.progressBarTimer);
|
this.Controls.Add(this.progressBarTimer);
|
||||||
this.Controls.Add(this.panelBrowser);
|
this.Controls.Add(this.panelBrowser);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||||
this.Location = new System.Drawing.Point(-32000, -32000);
|
this.Location = TweetDck.Core.Controls.ControlExtensions.InvisibleLocation;
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "FormNotification";
|
this.Name = "FormNotification";
|
||||||
|
@@ -5,14 +5,17 @@ using System.Windows.Forms;
|
|||||||
using CefSharp;
|
using CefSharp;
|
||||||
using CefSharp.WinForms;
|
using CefSharp.WinForms;
|
||||||
using TweetDck.Configuration;
|
using TweetDck.Configuration;
|
||||||
|
using TweetDck.Core.Bridge;
|
||||||
using TweetDck.Core.Handling;
|
using TweetDck.Core.Handling;
|
||||||
using TweetDck.Resources;
|
using TweetDck.Resources;
|
||||||
using TweetDck.Core.Utils;
|
using TweetDck.Core.Utils;
|
||||||
using TweetDck.Plugins;
|
using TweetDck.Plugins;
|
||||||
using TweetDck.Plugins.Enums;
|
using TweetDck.Plugins.Enums;
|
||||||
|
using TweetDck.Core.Controls;
|
||||||
|
using TweetDck.Core.Notification;
|
||||||
|
|
||||||
namespace TweetDck.Core{
|
namespace TweetDck.Core{
|
||||||
sealed partial class FormNotification : Form{
|
partial class FormNotification : Form{
|
||||||
private const string NotificationScriptFile = "notification.js";
|
private const string NotificationScriptFile = "notification.js";
|
||||||
|
|
||||||
private static readonly string NotificationScriptIdentifier = ScriptLoader.GetRootIdentifier(NotificationScriptFile);
|
private static readonly string NotificationScriptIdentifier = ScriptLoader.GetRootIdentifier(NotificationScriptFile);
|
||||||
@@ -20,12 +23,28 @@ namespace TweetDck.Core{
|
|||||||
|
|
||||||
public Func<bool> CanMoveWindow = () => true;
|
public Func<bool> CanMoveWindow = () => true;
|
||||||
|
|
||||||
private readonly Form owner;
|
public bool IsNotificationVisible{
|
||||||
|
get{
|
||||||
|
return Location != ControlExtensions.InvisibleLocation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public new Point Location{
|
||||||
|
get{
|
||||||
|
return base.Location;
|
||||||
|
}
|
||||||
|
|
||||||
|
set{
|
||||||
|
Visible = (base.Location = value) != ControlExtensions.InvisibleLocation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly Control owner;
|
||||||
private readonly PluginManager plugins;
|
private readonly PluginManager plugins;
|
||||||
private readonly ChromiumWebBrowser browser;
|
protected readonly NotificationFlags flags;
|
||||||
|
protected readonly ChromiumWebBrowser browser;
|
||||||
|
|
||||||
private readonly Queue<TweetNotification> tweetQueue = new Queue<TweetNotification>(4);
|
private readonly Queue<TweetNotification> tweetQueue = new Queue<TweetNotification>(4);
|
||||||
private readonly bool autoHide;
|
|
||||||
private int timeLeft, totalTime;
|
private int timeLeft, totalTime;
|
||||||
|
|
||||||
private readonly NativeMethods.HookProc mouseHookDelegate;
|
private readonly NativeMethods.HookProc mouseHookDelegate;
|
||||||
@@ -68,6 +87,15 @@ namespace TweetDck.Core{
|
|||||||
public EventHandler Initialized;
|
public EventHandler Initialized;
|
||||||
private bool isInitialized;
|
private bool isInitialized;
|
||||||
|
|
||||||
|
private int pauseCounter;
|
||||||
|
private bool pausedDuringNotification;
|
||||||
|
|
||||||
|
public bool IsPaused{
|
||||||
|
get{
|
||||||
|
return pauseCounter > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static int BaseClientWidth{
|
private static int BaseClientWidth{
|
||||||
get{
|
get{
|
||||||
int level = TweetNotification.FontSizeLevel;
|
int level = TweetNotification.FontSizeLevel;
|
||||||
@@ -82,22 +110,17 @@ namespace TweetDck.Core{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FormNotification(FormBrowser owner, PluginManager pluginManager, bool autoHide){
|
public FormNotification(FormBrowser owner, PluginManager pluginManager, NotificationFlags flags){
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
Text = Program.BrandName;
|
|
||||||
|
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
this.plugins = pluginManager;
|
this.plugins = pluginManager;
|
||||||
this.autoHide = autoHide;
|
this.flags = flags;
|
||||||
|
|
||||||
owner.FormClosed += (sender, args) => Close();
|
owner.FormClosed += (sender, args) => Close();
|
||||||
|
|
||||||
notificationJS = ScriptLoader.LoadResource(NotificationScriptFile);
|
|
||||||
pluginJS = ScriptLoader.LoadResource(PluginManager.PluginNotificationScriptFile);
|
|
||||||
|
|
||||||
browser = new ChromiumWebBrowser("about:blank"){
|
browser = new ChromiumWebBrowser("about:blank"){
|
||||||
MenuHandler = new ContextMenuNotification(this, autoHide),
|
MenuHandler = new ContextMenuNotification(this, !flags.HasFlag(NotificationFlags.DisableContextMenu)),
|
||||||
LifeSpanHandler = new LifeSpanHandler()
|
LifeSpanHandler = new LifeSpanHandler()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -107,14 +130,26 @@ namespace TweetDck.Core{
|
|||||||
|
|
||||||
browser.IsBrowserInitializedChanged += Browser_IsBrowserInitializedChanged;
|
browser.IsBrowserInitializedChanged += Browser_IsBrowserInitializedChanged;
|
||||||
browser.FrameLoadEnd += Browser_FrameLoadEnd;
|
browser.FrameLoadEnd += Browser_FrameLoadEnd;
|
||||||
|
|
||||||
|
if (!flags.HasFlag(NotificationFlags.DisableScripts)){
|
||||||
|
notificationJS = ScriptLoader.LoadResource(NotificationScriptFile);
|
||||||
browser.RegisterJsObject("$TD", new TweetDeckBridge(owner, this));
|
browser.RegisterJsObject("$TD", new TweetDeckBridge(owner, this));
|
||||||
|
|
||||||
|
if (plugins != null){
|
||||||
|
pluginJS = ScriptLoader.LoadResource(PluginManager.PluginNotificationScriptFile);
|
||||||
browser.RegisterAsyncJsObject("$TDP", plugins.Bridge);
|
browser.RegisterAsyncJsObject("$TDP", plugins.Bridge);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
panelBrowser.Controls.Add(browser);
|
panelBrowser.Controls.Add(browser);
|
||||||
|
|
||||||
if (autoHide){
|
if (flags.HasFlag(NotificationFlags.AutoHide)){
|
||||||
Program.UserConfig.MuteToggled += Config_MuteToggled;
|
Program.UserConfig.MuteToggled += Config_MuteToggled;
|
||||||
Disposed += (sender, args) => Program.UserConfig.MuteToggled -= Config_MuteToggled;
|
Disposed += (sender, args) => Program.UserConfig.MuteToggled -= Config_MuteToggled;
|
||||||
|
|
||||||
|
if (Program.UserConfig.MuteNotifications){
|
||||||
|
PauseNotification();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mouseHookDelegate = MouseHookProc;
|
mouseHookDelegate = MouseHookProc;
|
||||||
@@ -174,10 +209,10 @@ namespace TweetDck.Core{
|
|||||||
|
|
||||||
private void Config_MuteToggled(object sender, EventArgs e){
|
private void Config_MuteToggled(object sender, EventArgs e){
|
||||||
if (Program.UserConfig.MuteNotifications){
|
if (Program.UserConfig.MuteNotifications){
|
||||||
HideNotification(true);
|
PauseNotification();
|
||||||
}
|
}
|
||||||
else if (tweetQueue.Count > 0){
|
else{
|
||||||
LoadNextNotification();
|
ResumeNotification();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,10 +232,10 @@ namespace TweetDck.Core{
|
|||||||
Initialized(this, new EventArgs());
|
Initialized(this, new EventArgs());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (notificationJS != null && browser.Address != "about:blank"){
|
else if (notificationJS != null && browser.Address != "about:blank" && !flags.HasFlag(NotificationFlags.DisableScripts)){
|
||||||
ScriptLoader.ExecuteScript(e.Frame, notificationJS, NotificationScriptIdentifier);
|
ScriptLoader.ExecuteScript(e.Frame, notificationJS, NotificationScriptIdentifier);
|
||||||
|
|
||||||
if (plugins.HasAnyPlugin(PluginEnvironment.Notification)){
|
if (plugins != null && plugins.HasAnyPlugin(PluginEnvironment.Notification)){
|
||||||
ScriptLoader.ExecuteScript(e.Frame, pluginJS, PluginScriptIdentifier);
|
ScriptLoader.ExecuteScript(e.Frame, pluginJS, PluginScriptIdentifier);
|
||||||
ScriptLoader.ExecuteFile(e.Frame, PluginManager.PluginGlobalScriptFile);
|
ScriptLoader.ExecuteFile(e.Frame, PluginManager.PluginGlobalScriptFile);
|
||||||
plugins.ExecutePlugins(e.Frame, PluginEnvironment.Notification, false);
|
plugins.ExecutePlugins(e.Frame, PluginEnvironment.Notification, false);
|
||||||
@@ -224,7 +259,7 @@ namespace TweetDck.Core{
|
|||||||
// notification methods
|
// notification methods
|
||||||
|
|
||||||
public void ShowNotification(TweetNotification notification){
|
public void ShowNotification(TweetNotification notification){
|
||||||
if (Program.UserConfig.MuteNotifications){
|
if (IsPaused){
|
||||||
tweetQueue.Enqueue(notification);
|
tweetQueue.Enqueue(notification);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -242,7 +277,7 @@ namespace TweetDck.Core{
|
|||||||
LoadTweet(TweetNotification.ExampleTweet);
|
LoadTweet(TweetNotification.ExampleTweet);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
MoveToVisibleLocation();
|
PrepareAndDisplayWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +286,7 @@ namespace TweetDck.Core{
|
|||||||
browser.LoadHtml("", "about:blank");
|
browser.LoadHtml("", "about:blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
Location = new Point(-32000, -32000);
|
Location = ControlExtensions.InvisibleLocation;
|
||||||
progressBarTimer.Value = Program.UserConfig.NotificationTimerCountDown ? 1000 : 0;
|
progressBarTimer.Value = Program.UserConfig.NotificationTimerCountDown ? 1000 : 0;
|
||||||
timerProgress.Stop();
|
timerProgress.Stop();
|
||||||
totalTime = 0;
|
totalTime = 0;
|
||||||
@@ -261,7 +296,7 @@ namespace TweetDck.Core{
|
|||||||
|
|
||||||
public void OnNotificationReady(){
|
public void OnNotificationReady(){
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
MoveToVisibleLocation();
|
PrepareAndDisplayWindow();
|
||||||
timerProgress.Start();
|
timerProgress.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,7 +304,7 @@ namespace TweetDck.Core{
|
|||||||
if (tweetQueue.Count > 0){
|
if (tweetQueue.Count > 0){
|
||||||
LoadNextNotification();
|
LoadNextNotification();
|
||||||
}
|
}
|
||||||
else if (autoHide){
|
else if (flags.HasFlag(NotificationFlags.AutoHide)){
|
||||||
HideNotification(true);
|
HideNotification(true);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -277,6 +312,29 @@ namespace TweetDck.Core{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PauseNotification(){
|
||||||
|
if (pauseCounter++ == 0){
|
||||||
|
pausedDuringNotification = IsNotificationVisible;
|
||||||
|
|
||||||
|
if (IsNotificationVisible){
|
||||||
|
Location = ControlExtensions.InvisibleLocation;
|
||||||
|
timerProgress.Stop();
|
||||||
|
StopMouseHook();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResumeNotification(){
|
||||||
|
if (pauseCounter > 0 && --pauseCounter == 0){
|
||||||
|
if (pausedDuringNotification){
|
||||||
|
OnNotificationReady();
|
||||||
|
}
|
||||||
|
else if (tweetQueue.Count > 0){
|
||||||
|
LoadNextNotification();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void LoadNextNotification(){
|
private void LoadNextNotification(){
|
||||||
LoadTweet(tweetQueue.Dequeue());
|
LoadTweet(tweetQueue.Dequeue());
|
||||||
}
|
}
|
||||||
@@ -289,38 +347,48 @@ namespace TweetDck.Core{
|
|||||||
totalTime = timeLeft = tweet.GetDisplayDuration(Program.UserConfig.NotificationDurationValue);
|
totalTime = timeLeft = tweet.GetDisplayDuration(Program.UserConfig.NotificationDurationValue);
|
||||||
progressBarTimer.Value = Program.UserConfig.NotificationTimerCountDown ? 1000 : 0;
|
progressBarTimer.Value = Program.UserConfig.NotificationTimerCountDown ? 1000 : 0;
|
||||||
|
|
||||||
browser.LoadHtml(tweet.GenerateHtml(), "http://tweetdeck.twitter.com/?"+DateTime.Now.Ticks);
|
string bodyClasses = browser.Bounds.Contains(PointToClient(Cursor.Position)) ? "td-hover" : string.Empty;
|
||||||
|
|
||||||
|
browser.LoadHtml(tweet.GenerateHtml(bodyClasses), "http://tweetdeck.twitter.com/?"+DateTime.Now.Ticks);
|
||||||
|
|
||||||
if (Program.UserConfig.NotificationLegacyLoad){
|
if (Program.UserConfig.NotificationLegacyLoad){
|
||||||
OnNotificationReady();
|
OnNotificationReady();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveToVisibleLocation(){
|
private void PrepareAndDisplayWindow(){
|
||||||
UserConfig config = Program.UserConfig;
|
|
||||||
|
|
||||||
if (RequiresResize){
|
if (RequiresResize){
|
||||||
RequiresResize = false;
|
RequiresResize = false;
|
||||||
|
SetNotificationSize(BaseClientWidth, BaseClientHeight, Program.UserConfig.DisplayNotificationTimer);
|
||||||
|
}
|
||||||
|
|
||||||
if (config.DisplayNotificationTimer){
|
MoveToVisibleLocation();
|
||||||
ClientSize = new Size(BaseClientWidth, BaseClientHeight+4);
|
StartMouseHook();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void SetNotificationSize(int width, int height, bool displayTimer){
|
||||||
|
if (displayTimer){
|
||||||
|
ClientSize = new Size(width, height+4);
|
||||||
progressBarTimer.Visible = true;
|
progressBarTimer.Visible = true;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
ClientSize = new Size(BaseClientWidth, BaseClientHeight);
|
ClientSize = new Size(width, height);
|
||||||
progressBarTimer.Visible = false;
|
progressBarTimer.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
panelBrowser.Height = BaseClientHeight;
|
panelBrowser.Height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void MoveToVisibleLocation(){
|
||||||
|
UserConfig config = Program.UserConfig;
|
||||||
|
|
||||||
Screen screen = Screen.FromControl(owner);
|
Screen screen = Screen.FromControl(owner);
|
||||||
|
|
||||||
if (config.NotificationDisplay > 0 && config.NotificationDisplay <= Screen.AllScreens.Length){
|
if (config.NotificationDisplay > 0 && config.NotificationDisplay <= Screen.AllScreens.Length){
|
||||||
screen = Screen.AllScreens[config.NotificationDisplay-1];
|
screen = Screen.AllScreens[config.NotificationDisplay-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool needsReactivating = Location.X == -32000;
|
bool needsReactivating = Location == ControlExtensions.InvisibleLocation;
|
||||||
int edgeDist = config.NotificationEdgeDistance;
|
int edgeDist = config.NotificationEdgeDistance;
|
||||||
|
|
||||||
switch(config.NotificationPosition){
|
switch(config.NotificationPosition){
|
||||||
@@ -350,14 +418,12 @@ namespace TweetDck.Core{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needsReactivating){
|
if (needsReactivating && flags.HasFlag(NotificationFlags.TopMost)){
|
||||||
NativeMethods.SetFormPos(this, NativeMethods.HWND_TOPMOST, NativeMethods.SWP_NOACTIVATE);
|
NativeMethods.SetFormPos(this, NativeMethods.HWND_TOPMOST, NativeMethods.SWP_NOACTIVATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
StartMouseHook();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateTitle(){
|
protected void UpdateTitle(){
|
||||||
Text = tweetQueue.Count > 0 ? Program.BrandName+" ("+tweetQueue.Count+" more left)" : Program.BrandName;
|
Text = tweetQueue.Count > 0 ? Program.BrandName+" ("+tweetQueue.Count+" more left)" : Program.BrandName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using TweetDck.Core.Bridge;
|
||||||
using TweetDck.Core.Utils;
|
using TweetDck.Core.Utils;
|
||||||
|
|
||||||
namespace TweetDck.Core.Handling{
|
namespace TweetDck.Core.Handling{
|
||||||
@@ -12,6 +13,14 @@ namespace TweetDck.Core.Handling{
|
|||||||
private const int MenuSaveImage = 26503;
|
private const int MenuSaveImage = 26503;
|
||||||
private const int MenuCopyImageUrl = 26504;
|
private const int MenuCopyImageUrl = 26504;
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
private const int MenuOpenDevTools = 26599;
|
||||||
|
|
||||||
|
protected void AddDebugMenuItems(IMenuModel model){
|
||||||
|
model.AddItem((CefMenuCommand)MenuOpenDevTools, "Open dev tools");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
public virtual void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
|
public virtual void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
|
||||||
if (parameters.TypeFlags.HasFlag(ContextMenuType.Link) && !parameters.UnfilteredLinkUrl.EndsWith("tweetdeck.twitter.com/#", StringComparison.Ordinal)){
|
if (parameters.TypeFlags.HasFlag(ContextMenuType.Link) && !parameters.UnfilteredLinkUrl.EndsWith("tweetdeck.twitter.com/#", StringComparison.Ordinal)){
|
||||||
model.AddItem((CefMenuCommand)MenuOpenLinkUrl, "Open link in browser");
|
model.AddItem((CefMenuCommand)MenuOpenLinkUrl, "Open link in browser");
|
||||||
@@ -67,6 +76,12 @@ namespace TweetDck.Core.Handling{
|
|||||||
case MenuCopyImageUrl:
|
case MenuCopyImageUrl:
|
||||||
Clipboard.SetText(parameters.SourceUrl, TextDataFormat.UnicodeText);
|
Clipboard.SetText(parameters.SourceUrl, TextDataFormat.UnicodeText);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
case MenuOpenDevTools:
|
||||||
|
browserControl.ShowDevTools();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
using CefSharp;
|
using CefSharp;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using TweetDck.Core.Bridge;
|
||||||
using TweetDck.Core.Controls;
|
using TweetDck.Core.Controls;
|
||||||
using TweetDck.Core.Utils;
|
using TweetDck.Core.Utils;
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ namespace TweetDck.Core.Handling{
|
|||||||
private const int MenuCopyTweetUrl = 26611;
|
private const int MenuCopyTweetUrl = 26611;
|
||||||
private const int MenuOpenQuotedTweetUrl = 26612;
|
private const int MenuOpenQuotedTweetUrl = 26612;
|
||||||
private const int MenuCopyQuotedTweetUrl = 26613;
|
private const int MenuCopyQuotedTweetUrl = 26613;
|
||||||
|
private const int MenuScreenshotTweet = 26614;
|
||||||
|
|
||||||
private readonly FormBrowser form;
|
private readonly FormBrowser form;
|
||||||
|
|
||||||
@@ -37,7 +39,7 @@ namespace TweetDck.Core.Handling{
|
|||||||
lastHighlightedTweet = TweetDeckBridge.LastHighlightedTweet;
|
lastHighlightedTweet = TweetDeckBridge.LastHighlightedTweet;
|
||||||
lastHighlightedQuotedTweet = TweetDeckBridge.LastHighlightedQuotedTweet;
|
lastHighlightedQuotedTweet = TweetDeckBridge.LastHighlightedQuotedTweet;
|
||||||
|
|
||||||
if (!BrowserUtils.IsTweetDeckWebsite(frame)){
|
if (!BrowserUtils.IsTweetDeckWebsite(frame) || browser.IsLoading){
|
||||||
lastHighlightedTweet = string.Empty;
|
lastHighlightedTweet = string.Empty;
|
||||||
lastHighlightedQuotedTweet = string.Empty;
|
lastHighlightedQuotedTweet = string.Empty;
|
||||||
}
|
}
|
||||||
@@ -45,6 +47,7 @@ namespace TweetDck.Core.Handling{
|
|||||||
if (!string.IsNullOrEmpty(lastHighlightedTweet) && (parameters.TypeFlags & (ContextMenuType.Editable | ContextMenuType.Selection)) == 0){
|
if (!string.IsNullOrEmpty(lastHighlightedTweet) && (parameters.TypeFlags & (ContextMenuType.Editable | ContextMenuType.Selection)) == 0){
|
||||||
model.AddItem((CefMenuCommand)MenuOpenTweetUrl, "Open tweet in browser");
|
model.AddItem((CefMenuCommand)MenuOpenTweetUrl, "Open tweet in browser");
|
||||||
model.AddItem((CefMenuCommand)MenuCopyTweetUrl, "Copy tweet address");
|
model.AddItem((CefMenuCommand)MenuCopyTweetUrl, "Copy tweet address");
|
||||||
|
model.AddItem((CefMenuCommand)MenuScreenshotTweet, "Screenshot tweet to clipboard");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(lastHighlightedQuotedTweet)){
|
if (!string.IsNullOrEmpty(lastHighlightedQuotedTweet)){
|
||||||
model.AddSeparator();
|
model.AddSeparator();
|
||||||
@@ -68,6 +71,11 @@ namespace TweetDck.Core.Handling{
|
|||||||
globalMenu.AddItem((CefMenuCommand)MenuSettings, "Settings");
|
globalMenu.AddItem((CefMenuCommand)MenuSettings, "Settings");
|
||||||
globalMenu.AddItem((CefMenuCommand)MenuPlugins, "Plugins");
|
globalMenu.AddItem((CefMenuCommand)MenuPlugins, "Plugins");
|
||||||
globalMenu.AddItem((CefMenuCommand)MenuAbout, "About "+Program.BrandName);
|
globalMenu.AddItem((CefMenuCommand)MenuAbout, "About "+Program.BrandName);
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
globalMenu.AddSeparator();
|
||||||
|
AddDebugMenuItems(globalMenu);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,6 +117,10 @@ namespace TweetDck.Core.Handling{
|
|||||||
Clipboard.SetText(lastHighlightedTweet, TextDataFormat.UnicodeText);
|
Clipboard.SetText(lastHighlightedTweet, TextDataFormat.UnicodeText);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case MenuScreenshotTweet:
|
||||||
|
form.InvokeSafe(form.TriggerTweetScreenshot);
|
||||||
|
return true;
|
||||||
|
|
||||||
case MenuOpenQuotedTweetUrl:
|
case MenuOpenQuotedTweetUrl:
|
||||||
BrowserUtils.OpenExternalBrowser(lastHighlightedQuotedTweet);
|
BrowserUtils.OpenExternalBrowser(lastHighlightedQuotedTweet);
|
||||||
return true;
|
return true;
|
||||||
|
@@ -19,6 +19,7 @@ namespace TweetDck.Core.Handling{
|
|||||||
|
|
||||||
public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
|
public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
|
||||||
model.Clear();
|
model.Clear();
|
||||||
|
base.OnBeforeContextMenu(browserControl, browser, frame, parameters, model);
|
||||||
|
|
||||||
if (enableCustomMenu){
|
if (enableCustomMenu){
|
||||||
model.AddItem((CefMenuCommand)MenuSkipTweet, "Skip tweet");
|
model.AddItem((CefMenuCommand)MenuSkipTweet, "Skip tweet");
|
||||||
@@ -37,7 +38,10 @@ namespace TweetDck.Core.Handling{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base.OnBeforeContextMenu(browserControl, browser, frame, parameters, model);
|
#if DEBUG
|
||||||
|
AddDebugMenuItems(model);
|
||||||
|
#endif
|
||||||
|
|
||||||
RemoveSeparatorIfLast(model);
|
RemoveSeparatorIfLast(model);
|
||||||
|
|
||||||
form.InvokeSafe(() => form.ContextMenuOpen = true);
|
form.InvokeSafe(() => form.ContextMenuOpen = true);
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
using CefSharp;
|
using CefSharp;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using TweetDck.Core.Bridge;
|
||||||
using TweetDck.Core.Controls;
|
using TweetDck.Core.Controls;
|
||||||
|
|
||||||
namespace TweetDck.Core.Handling{
|
namespace TweetDck.Core.Handling{
|
||||||
class DialogHandlerBrowser : IDialogHandler{
|
class FileDialogHandler : IDialogHandler{
|
||||||
private readonly FormBrowser form;
|
private readonly FormBrowser form;
|
||||||
|
|
||||||
public DialogHandlerBrowser(FormBrowser form){
|
public FileDialogHandler(FormBrowser form){
|
||||||
this.form = form;
|
this.form = form;
|
||||||
}
|
}
|
||||||
|
|
49
Core/Handling/JavaScriptDialogHandler.cs
Normal file
49
Core/Handling/JavaScriptDialogHandler.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using CefSharp;
|
||||||
|
using CefSharp.WinForms;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using TweetDck.Core.Controls;
|
||||||
|
using TweetDck.Core.Other;
|
||||||
|
|
||||||
|
namespace TweetDck.Core.Handling {
|
||||||
|
class JavaScriptDialogHandler : IJsDialogHandler{
|
||||||
|
bool IJsDialogHandler.OnJSDialog(IWebBrowser browserControl, IBrowser browser, string originUrl, CefJsDialogType dialogType, string messageText, string defaultPromptText, IJsDialogCallback callback, ref bool suppressMessage){
|
||||||
|
if (dialogType != CefJsDialogType.Alert && dialogType != CefJsDialogType.Confirm){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
((ChromiumWebBrowser)browserControl).InvokeSafe(() => {
|
||||||
|
FormMessage form = new FormMessage(Program.BrandName, messageText, MessageBoxIcon.None);
|
||||||
|
Button btnConfirm;
|
||||||
|
|
||||||
|
if (dialogType == CefJsDialogType.Alert){
|
||||||
|
btnConfirm = form.AddButton("OK");
|
||||||
|
}
|
||||||
|
else if (dialogType == CefJsDialogType.Confirm){
|
||||||
|
form.AddButton("No");
|
||||||
|
btnConfirm = form.AddButton("Yes");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (form.ShowDialog() == DialogResult.OK && form.ClickedButton == btnConfirm){
|
||||||
|
callback.Continue(true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
callback.Continue(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
form.Dispose();
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IJsDialogHandler.OnJSBeforeUnload(IWebBrowser browserControl, IBrowser browser, string message, bool isReload, IJsDialogCallback callback){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IJsDialogHandler.OnResetDialogState(IWebBrowser browserControl, IBrowser browser){}
|
||||||
|
void IJsDialogHandler.OnDialogClosed(IWebBrowser browserControl, IBrowser browser){}
|
||||||
|
}
|
||||||
|
}
|
12
Core/Notification/NotificationFlags.cs
Normal file
12
Core/Notification/NotificationFlags.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace TweetDck.Core.Notification{
|
||||||
|
[Flags]
|
||||||
|
public enum NotificationFlags{
|
||||||
|
None = 0,
|
||||||
|
AutoHide = 1,
|
||||||
|
DisableScripts = 2,
|
||||||
|
DisableContextMenu = 4,
|
||||||
|
TopMost = 8
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,43 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using CefSharp;
|
||||||
|
using TweetDck.Core.Bridge;
|
||||||
|
using TweetDck.Core.Controls;
|
||||||
|
using TweetDck.Resources;
|
||||||
|
|
||||||
|
namespace TweetDck.Core.Notification.Screenshot{
|
||||||
|
sealed class FormNotificationScreenshotable : FormNotification{
|
||||||
|
public FormNotificationScreenshotable(FormBrowser owner, NotificationFlags flags) : base(owner, null, flags){
|
||||||
|
UpdateTitle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PrepareNotificationForScreenshot(Action callback){
|
||||||
|
browser.RegisterAsyncJsObject("$TD_NotificationScreenshot", new CallbackBridge(this, callback));
|
||||||
|
|
||||||
|
browser.FrameLoadEnd += (sender, args) => {
|
||||||
|
if (args.Frame.IsMain && browser.Address != "about:blank"){
|
||||||
|
ScriptLoader.ExecuteScript(args.Frame, "window.setTimeout(() => $TD_NotificationScreenshot.trigger(), 25)", "gen:screenshot");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadNotificationForScreenshot(TweetNotification tweet, int width, int height){
|
||||||
|
browser.LoadHtml(tweet.GenerateHtml(enableCustomCSS: false), "http://tweetdeck.twitter.com/?"+DateTime.Now.Ticks);
|
||||||
|
|
||||||
|
Location = ControlExtensions.InvisibleLocation;
|
||||||
|
SetNotificationSize(width, height, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TakeScreenshotAndHide(){
|
||||||
|
MoveToVisibleLocation();
|
||||||
|
Activate();
|
||||||
|
SendKeys.SendWait("%{PRTSC}");
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Reset(){
|
||||||
|
Location = ControlExtensions.InvisibleLocation;
|
||||||
|
browser.LoadHtml("", "about:blank");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
49
Core/Notification/Screenshot/TweetScreenshotManager.cs
Normal file
49
Core/Notification/Screenshot/TweetScreenshotManager.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using TweetDck.Core.Controls;
|
||||||
|
using TweetDck.Core.Utils;
|
||||||
|
|
||||||
|
namespace TweetDck.Core.Notification.Screenshot{
|
||||||
|
sealed class TweetScreenshotManager : IDisposable{
|
||||||
|
private readonly FormBrowser browser;
|
||||||
|
private readonly FormNotificationScreenshotable screenshot;
|
||||||
|
private readonly Timer timeout;
|
||||||
|
|
||||||
|
public TweetScreenshotManager(FormBrowser browser){
|
||||||
|
this.browser = browser;
|
||||||
|
|
||||||
|
this.screenshot = new FormNotificationScreenshotable(browser, NotificationFlags.DisableScripts | NotificationFlags.DisableContextMenu | NotificationFlags.TopMost){
|
||||||
|
CanMoveWindow = () => false
|
||||||
|
};
|
||||||
|
|
||||||
|
this.screenshot.PrepareNotificationForScreenshot(Callback);
|
||||||
|
|
||||||
|
this.timeout = WindowsUtils.CreateSingleTickTimer(10000);
|
||||||
|
this.timeout.Tick += (sender, args) => screenshot.Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Trigger(string html, int width, int height){
|
||||||
|
screenshot.LoadNotificationForScreenshot(new TweetNotification(html, string.Empty, 0), width, height);
|
||||||
|
screenshot.Show();
|
||||||
|
timeout.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Callback(){
|
||||||
|
if (!timeout.Enabled){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
timeout.Stop();
|
||||||
|
|
||||||
|
browser.PauseNotification();
|
||||||
|
screenshot.TakeScreenshotAndHide();
|
||||||
|
browser.ResumeNotification();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose(){
|
||||||
|
timeout.Dispose();
|
||||||
|
screenshot.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,28 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace TweetDck.Core.Handling{
|
namespace TweetDck.Core.Notification{
|
||||||
sealed class TweetNotification{
|
sealed class TweetNotification{
|
||||||
private static string FontSizeClass { get; set; }
|
private static string FontSizeClass { get; set; }
|
||||||
private static string HeadTag { get; set; }
|
private static string HeadTag { get; set; }
|
||||||
|
|
||||||
private static string DefaultFontSizeClass{
|
private const string DefaultFontSizeClass = "medium";
|
||||||
get{
|
private const string DefaultHeadTag = @"<meta charset='utf-8'><meta http-equiv='X-UA-Compatible' content='chrome=1'><link rel='stylesheet' href='https://ton.twimg.com/tweetdeck-web/web/css/font.5ef884f9f9.css'><link rel='stylesheet' href='https://ton.twimg.com/tweetdeck-web/web/css/app-dark.5631e0dd42.css'>";
|
||||||
return "medium";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string DefaultHeadTag{
|
private const string FixedCSS = @"a[data-full-url]{word-break:break-all}.txt-base-smallest .badge-verified:before{height:13px!important}";
|
||||||
get{
|
private const string CustomCSS = @".scroll-styled-v::-webkit-scrollbar{width:8px}.scroll-styled-v::-webkit-scrollbar-thumb{border-radius:0}#td-skip{opacity:0;cursor:pointer;transition:opacity 0.15s ease}.td-hover #td-skip{opacity:0.75}#td-skip:hover{opacity:1}";
|
||||||
return @"<meta charset='utf-8'><meta http-equiv='X-UA-Compatible' content='chrome=1'><link rel='stylesheet' href='https://ton.twimg.com/tweetdeck-web/web/css/font.5ef884f9f9.css'><link rel='stylesheet' href='https://ton.twimg.com/tweetdeck-web/web/css/app-dark.5631e0dd42.css'>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string CustomCSS{
|
|
||||||
get{
|
|
||||||
return @".scroll-styled-v::-webkit-scrollbar{width:8px}.scroll-styled-v::-webkit-scrollbar-thumb{border-radius:0}a[data-full-url]{word-break:break-all}#td-skip{opacity:0;cursor:pointer;transition:opacity 0.15s ease}.td-hover #td-skip{opacity:0.75}#td-skip:hover{opacity:1}";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int FontSizeLevel{
|
public static int FontSizeLevel{
|
||||||
get{
|
get{
|
||||||
@@ -99,18 +87,31 @@ namespace TweetDck.Core.Handling{
|
|||||||
return 2000+Math.Max(1000, value*characters);
|
return 2000+Math.Max(1000, value*characters);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GenerateHtml(){
|
public string GenerateHtml(string bodyClasses = null, bool enableCustomCSS = true){
|
||||||
StringBuilder build = new StringBuilder();
|
StringBuilder build = new StringBuilder();
|
||||||
build.Append("<!DOCTYPE html>");
|
build.Append("<!DOCTYPE html>");
|
||||||
build.Append("<html class='os-windows txt-base-").Append(FontSizeClass ?? DefaultFontSizeClass).Append("'>");
|
build.Append("<html class='os-windows txt-base-").Append(FontSizeClass ?? DefaultFontSizeClass).Append("'>");
|
||||||
build.Append("<head>").Append(HeadTag ?? DefaultHeadTag).Append("<style type='text/css'>").Append(CustomCSS).Append("</style>");
|
build.Append("<head>").Append(HeadTag ?? DefaultHeadTag);
|
||||||
|
|
||||||
|
if (enableCustomCSS){
|
||||||
|
build.Append("<style type='text/css'>").Append(FixedCSS).Append(CustomCSS).Append("</style>");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Program.UserConfig.CustomNotificationCSS)){
|
if (!string.IsNullOrEmpty(Program.UserConfig.CustomNotificationCSS)){
|
||||||
build.Append("<style type='text/css'>").Append(Program.UserConfig.CustomNotificationCSS).Append("</style>");
|
build.Append("<style type='text/css'>").Append(Program.UserConfig.CustomNotificationCSS).Append("</style>");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
build.Append("<style type='text/css'>").Append(FixedCSS).Append("</style>");
|
||||||
|
}
|
||||||
|
|
||||||
build.Append("</head>");
|
build.Append("</head>");
|
||||||
build.Append("<body class='hearty'").Append(isExample ? " td-example-notification" : "").Append("><div class='app-columns-container'><div class='column scroll-styled-v' style='width:100%;overflow-y:auto'>");
|
build.Append("<body class='hearty");
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(bodyClasses)){
|
||||||
|
build.Append(' ').Append(bodyClasses);
|
||||||
|
}
|
||||||
|
|
||||||
|
build.Append('\'').Append(isExample ? " td-example-notification" : "").Append("><div class='app-columns-container'><div class='column scroll-styled-v' style='width:100%;overflow-y:auto'>");
|
||||||
build.Append(html);
|
build.Append(html);
|
||||||
build.Append("</div></div></body>");
|
build.Append("</div></div></body>");
|
||||||
build.Append("</html>");
|
build.Append("</html>");
|
@@ -40,7 +40,7 @@ namespace TweetDck.Core.Other{
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
icon = null;
|
icon = null;
|
||||||
labelMessage.Location = new Point(labelMessage.Location.X-32, labelMessage.Location.Y);
|
labelMessage.Location = new Point(labelMessage.Location.X-37, labelMessage.Location.Y);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,24 +2,29 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using TweetDck.Core.Notification;
|
||||||
using TweetDck.Core.Other.Settings;
|
using TweetDck.Core.Other.Settings;
|
||||||
using TweetDck.Plugins;
|
using TweetDck.Plugins;
|
||||||
using TweetDck.Updates;
|
using TweetDck.Updates;
|
||||||
|
|
||||||
namespace TweetDck.Core.Other{
|
namespace TweetDck.Core.Other{
|
||||||
sealed partial class FormSettings : Form{
|
sealed partial class FormSettings : Form{
|
||||||
|
private readonly FormBrowser browser;
|
||||||
private readonly Dictionary<Type, BaseTabSettings> tabs = new Dictionary<Type, BaseTabSettings>(4);
|
private readonly Dictionary<Type, BaseTabSettings> tabs = new Dictionary<Type, BaseTabSettings>(4);
|
||||||
|
|
||||||
public FormSettings(FormBrowser browserForm, PluginManager plugins, UpdateHandler updates){
|
public FormSettings(FormBrowser browser, PluginManager plugins, UpdateHandler updates){
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
Text = Program.BrandName+" Settings";
|
Text = Program.BrandName+" Settings";
|
||||||
|
|
||||||
|
this.browser = browser;
|
||||||
|
this.browser.PauseNotification();
|
||||||
|
|
||||||
this.tabPanel.SetupTabPanel(100);
|
this.tabPanel.SetupTabPanel(100);
|
||||||
this.tabPanel.AddButton("General", SelectTab<TabSettingsGeneral>);
|
this.tabPanel.AddButton("General", SelectTab<TabSettingsGeneral>);
|
||||||
this.tabPanel.AddButton("Notifications", () => SelectTab(() => new TabSettingsNotifications(browserForm.CreateNotificationForm(false))));
|
this.tabPanel.AddButton("Notifications", () => SelectTab(() => new TabSettingsNotifications(browser.CreateNotificationForm(NotificationFlags.DisableContextMenu))));
|
||||||
this.tabPanel.AddButton("Updates", () => SelectTab(() => new TabSettingsUpdates(updates)));
|
this.tabPanel.AddButton("Updates", () => SelectTab(() => new TabSettingsUpdates(updates)));
|
||||||
this.tabPanel.AddButton("Advanced", () => SelectTab(() => new TabSettingsAdvanced(browserForm.ReloadBrowser, plugins)));
|
this.tabPanel.AddButton("Advanced", () => SelectTab(() => new TabSettingsAdvanced(browser.ReloadBrowser, plugins)));
|
||||||
this.tabPanel.SelectTab(tabPanel.Buttons.First());
|
this.tabPanel.SelectTab(tabPanel.Buttons.First());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,11 +46,17 @@ namespace TweetDck.Core.Other{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void FormSettings_FormClosing(object sender, FormClosingEventArgs e){
|
private void FormSettings_FormClosing(object sender, FormClosingEventArgs e){
|
||||||
|
foreach(BaseTabSettings control in tabs.Values){
|
||||||
|
control.OnClosing();
|
||||||
|
}
|
||||||
|
|
||||||
Program.UserConfig.Save();
|
Program.UserConfig.Save();
|
||||||
|
|
||||||
foreach(BaseTabSettings control in tabs.Values){
|
foreach(BaseTabSettings control in tabs.Values){
|
||||||
control.Dispose();
|
control.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
browser.ResumeNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnClose_Click(object sender, EventArgs e){
|
private void btnClose_Click(object sender, EventArgs e){
|
||||||
|
@@ -15,6 +15,8 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
Padding = new Padding(6);
|
Padding = new Padding(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void OnClosing(){}
|
||||||
|
|
||||||
protected static void PromptRestart(){
|
protected static void PromptRestart(){
|
||||||
if (MessageBox.Show("The application must restart for the setting to take place. Do you want to restart now?", Program.BrandName+" Settings", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes){
|
if (MessageBox.Show("The application must restart for the setting to take place. Do you want to restart now?", Program.BrandName+" Settings", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes){
|
||||||
Program.Restart();
|
Program.Restart();
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
this.labelNotification = new System.Windows.Forms.Label();
|
this.labelNotification = new System.Windows.Forms.Label();
|
||||||
this.textBoxNotificationCSS = new System.Windows.Forms.TextBox();
|
this.textBoxNotificationCSS = new System.Windows.Forms.TextBox();
|
||||||
this.labelWarning = new System.Windows.Forms.Label();
|
this.labelWarning = new System.Windows.Forms.Label();
|
||||||
|
this.btnOpenWiki = new System.Windows.Forms.Button();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||||
this.splitContainer.Panel1.SuspendLayout();
|
this.splitContainer.Panel1.SuspendLayout();
|
||||||
this.splitContainer.Panel2.SuspendLayout();
|
this.splitContainer.Panel2.SuspendLayout();
|
||||||
@@ -131,7 +132,7 @@
|
|||||||
this.textBoxNotificationCSS.Multiline = true;
|
this.textBoxNotificationCSS.Multiline = true;
|
||||||
this.textBoxNotificationCSS.Name = "textBoxNotificationCSS";
|
this.textBoxNotificationCSS.Name = "textBoxNotificationCSS";
|
||||||
this.textBoxNotificationCSS.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
this.textBoxNotificationCSS.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||||
this.textBoxNotificationCSS.Size = new System.Drawing.Size(378, 253);
|
this.textBoxNotificationCSS.Size = new System.Drawing.Size(376, 253);
|
||||||
this.textBoxNotificationCSS.TabIndex = 1;
|
this.textBoxNotificationCSS.TabIndex = 1;
|
||||||
this.textBoxNotificationCSS.WordWrap = false;
|
this.textBoxNotificationCSS.WordWrap = false;
|
||||||
//
|
//
|
||||||
@@ -139,22 +140,36 @@
|
|||||||
//
|
//
|
||||||
this.labelWarning.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.labelWarning.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.labelWarning.AutoSize = true;
|
this.labelWarning.AutoSize = true;
|
||||||
this.labelWarning.Location = new System.Drawing.Point(9, 292);
|
this.labelWarning.Location = new System.Drawing.Point(91, 292);
|
||||||
this.labelWarning.Name = "labelWarning";
|
this.labelWarning.Name = "labelWarning";
|
||||||
this.labelWarning.Size = new System.Drawing.Size(341, 13);
|
this.labelWarning.Size = new System.Drawing.Size(341, 13);
|
||||||
this.labelWarning.TabIndex = 6;
|
this.labelWarning.TabIndex = 6;
|
||||||
this.labelWarning.Text = "The code is not validated, please make sure there are no syntax errors.";
|
this.labelWarning.Text = "The code is not validated, please make sure there are no syntax errors.";
|
||||||
//
|
//
|
||||||
|
// btnOpenWiki
|
||||||
|
//
|
||||||
|
this.btnOpenWiki.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.btnOpenWiki.AutoSize = true;
|
||||||
|
this.btnOpenWiki.Location = new System.Drawing.Point(12, 287);
|
||||||
|
this.btnOpenWiki.Name = "btnOpenWiki";
|
||||||
|
this.btnOpenWiki.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
|
this.btnOpenWiki.Size = new System.Drawing.Size(73, 23);
|
||||||
|
this.btnOpenWiki.TabIndex = 7;
|
||||||
|
this.btnOpenWiki.Text = "Open Wiki";
|
||||||
|
this.btnOpenWiki.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOpenWiki.Click += new System.EventHandler(this.btnOpenWiki_Click);
|
||||||
|
//
|
||||||
// DialogSettingsCSS
|
// DialogSettingsCSS
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(784, 322);
|
this.ClientSize = new System.Drawing.Size(784, 322);
|
||||||
|
this.Controls.Add(this.btnOpenWiki);
|
||||||
this.Controls.Add(this.labelWarning);
|
this.Controls.Add(this.labelWarning);
|
||||||
this.Controls.Add(this.splitContainer);
|
this.Controls.Add(this.splitContainer);
|
||||||
this.Controls.Add(this.btnApply);
|
this.Controls.Add(this.btnApply);
|
||||||
this.Controls.Add(this.btnCancel);
|
this.Controls.Add(this.btnCancel);
|
||||||
this.MinimumSize = new System.Drawing.Size(500, 160);
|
this.MinimumSize = new System.Drawing.Size(600, 160);
|
||||||
this.Name = "DialogSettingsCSS";
|
this.Name = "DialogSettingsCSS";
|
||||||
this.ShowIcon = false;
|
this.ShowIcon = false;
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
@@ -179,5 +194,6 @@
|
|||||||
private System.Windows.Forms.Label labelBrowser;
|
private System.Windows.Forms.Label labelBrowser;
|
||||||
private System.Windows.Forms.Label labelNotification;
|
private System.Windows.Forms.Label labelNotification;
|
||||||
private System.Windows.Forms.Label labelWarning;
|
private System.Windows.Forms.Label labelWarning;
|
||||||
|
private System.Windows.Forms.Button btnOpenWiki;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using TweetDck.Core.Controls;
|
using TweetDck.Core.Controls;
|
||||||
|
using TweetDck.Core.Utils;
|
||||||
|
|
||||||
namespace TweetDck.Core.Other.Settings.Dialogs{
|
namespace TweetDck.Core.Other.Settings.Dialogs{
|
||||||
sealed partial class DialogSettingsCSS : Form{
|
sealed partial class DialogSettingsCSS : Form{
|
||||||
@@ -28,6 +29,10 @@ namespace TweetDck.Core.Other.Settings.Dialogs{
|
|||||||
textBoxNotificationCSS.Text = Program.UserConfig.CustomNotificationCSS ?? "";
|
textBoxNotificationCSS.Text = Program.UserConfig.CustomNotificationCSS ?? "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnOpenWiki_Click(object sender, EventArgs e){
|
||||||
|
BrowserUtils.OpenExternalBrowser("https://github.com/chylex/TweetDuck/wiki");
|
||||||
|
}
|
||||||
|
|
||||||
private void btnApply_Click(object sender, EventArgs e){
|
private void btnApply_Click(object sender, EventArgs e){
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
|
125
Core/Other/Settings/Dialogs/DialogSettingsExport.Designer.cs
generated
Normal file
125
Core/Other/Settings/Dialogs/DialogSettingsExport.Designer.cs
generated
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
namespace TweetDck.Core.Other.Settings.Dialogs {
|
||||||
|
partial class DialogSettingsExport {
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing) {
|
||||||
|
if (disposing && (components != null)) {
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent() {
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
|
this.btnApply = new System.Windows.Forms.Button();
|
||||||
|
this.cbConfig = new System.Windows.Forms.CheckBox();
|
||||||
|
this.cbSession = new System.Windows.Forms.CheckBox();
|
||||||
|
this.cbPluginData = new System.Windows.Forms.CheckBox();
|
||||||
|
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// btnCancel
|
||||||
|
//
|
||||||
|
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.btnCancel.AutoSize = true;
|
||||||
|
this.btnCancel.Location = new System.Drawing.Point(176, 97);
|
||||||
|
this.btnCancel.Name = "btnCancel";
|
||||||
|
this.btnCancel.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
|
this.btnCancel.Size = new System.Drawing.Size(56, 23);
|
||||||
|
this.btnCancel.TabIndex = 0;
|
||||||
|
this.btnCancel.Text = "Cancel";
|
||||||
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||||
|
//
|
||||||
|
// btnApply
|
||||||
|
//
|
||||||
|
this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.btnApply.AutoSize = true;
|
||||||
|
this.btnApply.Location = new System.Drawing.Point(117, 97);
|
||||||
|
this.btnApply.Name = "btnApply";
|
||||||
|
this.btnApply.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
|
this.btnApply.Size = new System.Drawing.Size(53, 23);
|
||||||
|
this.btnApply.TabIndex = 1;
|
||||||
|
this.btnApply.UseVisualStyleBackColor = true;
|
||||||
|
this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
|
||||||
|
//
|
||||||
|
// cbConfig
|
||||||
|
//
|
||||||
|
this.cbConfig.AutoSize = true;
|
||||||
|
this.cbConfig.Location = new System.Drawing.Point(13, 13);
|
||||||
|
this.cbConfig.Name = "cbConfig";
|
||||||
|
this.cbConfig.Size = new System.Drawing.Size(106, 17);
|
||||||
|
this.cbConfig.TabIndex = 2;
|
||||||
|
this.cbConfig.Text = "Program Settings";
|
||||||
|
this.toolTip.SetToolTip(this.cbConfig, "Interface, notification, and update settings.\r\nIncludes a list of disabled plugin" +
|
||||||
|
"s.");
|
||||||
|
this.cbConfig.UseVisualStyleBackColor = true;
|
||||||
|
this.cbConfig.CheckedChanged += new System.EventHandler(this.cbConfig_CheckedChanged);
|
||||||
|
//
|
||||||
|
// cbSession
|
||||||
|
//
|
||||||
|
this.cbSession.AutoSize = true;
|
||||||
|
this.cbSession.Location = new System.Drawing.Point(13, 37);
|
||||||
|
this.cbSession.Name = "cbSession";
|
||||||
|
this.cbSession.Size = new System.Drawing.Size(92, 17);
|
||||||
|
this.cbSession.TabIndex = 3;
|
||||||
|
this.cbSession.Text = "Login Session";
|
||||||
|
this.toolTip.SetToolTip(this.cbSession, "A token that allows logging into the\r\ncurrent TweetDeck account.");
|
||||||
|
this.cbSession.UseVisualStyleBackColor = true;
|
||||||
|
this.cbSession.CheckedChanged += new System.EventHandler(this.cbSession_CheckedChanged);
|
||||||
|
//
|
||||||
|
// cbPluginData
|
||||||
|
//
|
||||||
|
this.cbPluginData.AutoSize = true;
|
||||||
|
this.cbPluginData.Location = new System.Drawing.Point(13, 61);
|
||||||
|
this.cbPluginData.Name = "cbPluginData";
|
||||||
|
this.cbPluginData.Size = new System.Drawing.Size(81, 17);
|
||||||
|
this.cbPluginData.TabIndex = 4;
|
||||||
|
this.cbPluginData.Text = "Plugin Data";
|
||||||
|
this.toolTip.SetToolTip(this.cbPluginData, "Data files generated by plugins.\r\nDoes not include the plugins themselves.");
|
||||||
|
this.cbPluginData.UseVisualStyleBackColor = true;
|
||||||
|
this.cbPluginData.CheckedChanged += new System.EventHandler(this.cbPluginData_CheckedChanged);
|
||||||
|
//
|
||||||
|
// DialogSettingsExport
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(244, 132);
|
||||||
|
this.Controls.Add(this.cbPluginData);
|
||||||
|
this.Controls.Add(this.cbSession);
|
||||||
|
this.Controls.Add(this.cbConfig);
|
||||||
|
this.Controls.Add(this.btnApply);
|
||||||
|
this.Controls.Add(this.btnCancel);
|
||||||
|
this.MinimumSize = new System.Drawing.Size(200, 170);
|
||||||
|
this.Name = "DialogSettingsExport";
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button btnCancel;
|
||||||
|
private System.Windows.Forms.Button btnApply;
|
||||||
|
private System.Windows.Forms.CheckBox cbConfig;
|
||||||
|
private System.Windows.Forms.CheckBox cbSession;
|
||||||
|
private System.Windows.Forms.CheckBox cbPluginData;
|
||||||
|
private System.Windows.Forms.ToolTip toolTip;
|
||||||
|
}
|
||||||
|
}
|
80
Core/Other/Settings/Dialogs/DialogSettingsExport.cs
Normal file
80
Core/Other/Settings/Dialogs/DialogSettingsExport.cs
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using TweetDck.Core.Other.Settings.Export;
|
||||||
|
|
||||||
|
namespace TweetDck.Core.Other.Settings.Dialogs{
|
||||||
|
sealed partial class DialogSettingsExport : Form{
|
||||||
|
public static DialogSettingsExport Import(ExportFileFlags flags){
|
||||||
|
return new DialogSettingsExport(flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DialogSettingsExport Export(){
|
||||||
|
return new DialogSettingsExport(ExportFileFlags.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExportFileFlags Flags{
|
||||||
|
get{
|
||||||
|
return selectedFlags;
|
||||||
|
}
|
||||||
|
|
||||||
|
set{
|
||||||
|
selectedFlags = value;
|
||||||
|
btnApply.Enabled = selectedFlags != ExportFileFlags.None;
|
||||||
|
|
||||||
|
cbConfig.Checked = selectedFlags.HasFlag(ExportFileFlags.Config);
|
||||||
|
cbSession.Checked = selectedFlags.HasFlag(ExportFileFlags.Session);
|
||||||
|
cbPluginData.Checked = selectedFlags.HasFlag(ExportFileFlags.PluginData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private ExportFileFlags selectedFlags = ExportFileFlags.None;
|
||||||
|
|
||||||
|
private DialogSettingsExport(ExportFileFlags importFlags){
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
bool isExporting = importFlags == ExportFileFlags.None;
|
||||||
|
|
||||||
|
if (isExporting){
|
||||||
|
Text = "Export Profile";
|
||||||
|
btnApply.Text = "Export";
|
||||||
|
Flags = ExportFileFlags.All & ~ExportFileFlags.Session;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Text = "Import Profile";
|
||||||
|
btnApply.Text = "Import";
|
||||||
|
Flags = importFlags;
|
||||||
|
|
||||||
|
cbConfig.Enabled = cbConfig.Checked;
|
||||||
|
cbSession.Enabled = cbSession.Checked;
|
||||||
|
cbPluginData.Enabled = cbPluginData.Checked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetFlag(ExportFileFlags flag, bool enable){
|
||||||
|
selectedFlags = enable ? selectedFlags | flag : selectedFlags & ~flag;
|
||||||
|
btnApply.Enabled = selectedFlags != ExportFileFlags.None;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cbConfig_CheckedChanged(object sender, EventArgs e){
|
||||||
|
SetFlag(ExportFileFlags.Config, cbConfig.Checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cbSession_CheckedChanged(object sender, EventArgs e){
|
||||||
|
SetFlag(ExportFileFlags.Session, cbSession.Checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cbPluginData_CheckedChanged(object sender, EventArgs e){
|
||||||
|
SetFlag(ExportFileFlags.PluginData, cbPluginData.Checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnApply_Click(object sender, EventArgs e){
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCancel_Click(object sender, EventArgs e){
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -63,6 +63,26 @@ namespace TweetDck.Core.Other.Settings.Export{
|
|||||||
return new Entry(Encoding.UTF8.GetString(name), contents);
|
return new Entry(Encoding.UTF8.GetString(name), contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string SkipFile(){
|
||||||
|
int nameLength = stream.ReadByte();
|
||||||
|
|
||||||
|
if (nameLength == -1){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
byte[] name = new byte[nameLength];
|
||||||
|
stream.Read(name, 0, nameLength);
|
||||||
|
|
||||||
|
byte[] contentLength = new byte[4];
|
||||||
|
stream.Read(contentLength, 0, 4);
|
||||||
|
|
||||||
|
stream.Position += BitConverter.ToInt32(contentLength, 0);
|
||||||
|
|
||||||
|
string keyName = Encoding.UTF8.GetString(name);
|
||||||
|
int separatorIndex = keyName.IndexOf(KeySeparator);
|
||||||
|
return separatorIndex == -1 ? keyName : keyName.Substring(0, separatorIndex);
|
||||||
|
}
|
||||||
|
|
||||||
public void Flush(){
|
public void Flush(){
|
||||||
stream.Flush();
|
stream.Flush();
|
||||||
}
|
}
|
||||||
|
12
Core/Other/Settings/Export/ExportFileFlags.cs
Normal file
12
Core/Other/Settings/Export/ExportFileFlags.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace TweetDck.Core.Other.Settings.Export{
|
||||||
|
[Flags]
|
||||||
|
enum ExportFileFlags{
|
||||||
|
None = 0,
|
||||||
|
Config = 1,
|
||||||
|
Session = 2,
|
||||||
|
PluginData = 4,
|
||||||
|
All = Config|Session|PluginData
|
||||||
|
}
|
||||||
|
}
|
@@ -22,11 +22,14 @@ namespace TweetDck.Core.Other.Settings.Export{
|
|||||||
this.plugins = plugins;
|
this.plugins = plugins;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Export(bool includeSession){
|
public bool Export(ExportFileFlags flags){
|
||||||
try{
|
try{
|
||||||
using(CombinedFileStream stream = new CombinedFileStream(new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None))){
|
using(CombinedFileStream stream = new CombinedFileStream(new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None))){
|
||||||
|
if (flags.HasFlag(ExportFileFlags.Config)){
|
||||||
stream.WriteFile("config", Program.ConfigFilePath);
|
stream.WriteFile("config", Program.ConfigFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flags.HasFlag(ExportFileFlags.PluginData)){
|
||||||
foreach(Plugin plugin in plugins.Plugins){
|
foreach(Plugin plugin in plugins.Plugins){
|
||||||
foreach(PathInfo path in EnumerateFilesRelative(plugin.GetPluginFolder(PluginFolder.Data))){
|
foreach(PathInfo path in EnumerateFilesRelative(plugin.GetPluginFolder(PluginFolder.Data))){
|
||||||
try{
|
try{
|
||||||
@@ -36,8 +39,9 @@ namespace TweetDck.Core.Other.Settings.Export{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (includeSession){
|
if (flags.HasFlag(ExportFileFlags.Session)){
|
||||||
stream.WriteFile("cookies", CookiesPath);
|
stream.WriteFile("cookies", CookiesPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +55,38 @@ namespace TweetDck.Core.Other.Settings.Export{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Import(){
|
public ExportFileFlags GetImportFlags(){
|
||||||
|
ExportFileFlags flags = ExportFileFlags.None;
|
||||||
|
|
||||||
|
try{
|
||||||
|
using(CombinedFileStream stream = new CombinedFileStream(new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.None))){
|
||||||
|
string key;
|
||||||
|
|
||||||
|
while((key = stream.SkipFile()) != null){
|
||||||
|
switch(key){
|
||||||
|
case "config":
|
||||||
|
flags |= ExportFileFlags.Config;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "plugin.data":
|
||||||
|
flags |= ExportFileFlags.PluginData;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "cookies":
|
||||||
|
flags |= ExportFileFlags.Session;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch(Exception e){
|
||||||
|
LastException = e;
|
||||||
|
flags = ExportFileFlags.None;
|
||||||
|
}
|
||||||
|
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Import(ExportFileFlags flags){
|
||||||
try{
|
try{
|
||||||
HashSet<string> missingPlugins = new HashSet<string>();
|
HashSet<string> missingPlugins = new HashSet<string>();
|
||||||
|
|
||||||
@@ -61,11 +96,15 @@ namespace TweetDck.Core.Other.Settings.Export{
|
|||||||
while((entry = stream.ReadFile()) != null){
|
while((entry = stream.ReadFile()) != null){
|
||||||
switch(entry.KeyName){
|
switch(entry.KeyName){
|
||||||
case "config":
|
case "config":
|
||||||
|
if (flags.HasFlag(ExportFileFlags.Config)){
|
||||||
entry.WriteToFile(Program.ConfigFilePath);
|
entry.WriteToFile(Program.ConfigFilePath);
|
||||||
Program.ReloadConfig();
|
Program.ReloadConfig();
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "plugin.data":
|
case "plugin.data":
|
||||||
|
if (flags.HasFlag(ExportFileFlags.PluginData)){
|
||||||
string[] value = entry.KeyValue;
|
string[] value = entry.KeyValue;
|
||||||
|
|
||||||
entry.WriteToFile(Path.Combine(Program.PluginDataPath, value[0], value[1]), true);
|
entry.WriteToFile(Path.Combine(Program.PluginDataPath, value[0], value[1]), true);
|
||||||
@@ -73,11 +112,12 @@ namespace TweetDck.Core.Other.Settings.Export{
|
|||||||
if (!plugins.IsPluginInstalled(value[0])){
|
if (!plugins.IsPluginInstalled(value[0])){
|
||||||
missingPlugins.Add(value[0]);
|
missingPlugins.Add(value[0]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "cookies":
|
case "cookies":
|
||||||
if (MessageBox.Show("Do you want to import the login session? This will restart "+Program.BrandName+".", "Importing "+Program.BrandName+" Profile", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes){
|
if (flags.HasFlag(ExportFileFlags.Session) && MessageBox.Show("Do you want to import the login session? This will restart "+Program.BrandName+".", "Importing "+Program.BrandName+" Profile", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes){
|
||||||
entry.WriteToFile(Path.Combine(Program.StoragePath, TempCookiesPath));
|
entry.WriteToFile(Path.Combine(Program.StoragePath, TempCookiesPath));
|
||||||
IsRestarting = true;
|
IsRestarting = true;
|
||||||
}
|
}
|
||||||
|
48
Core/Other/Settings/TabSettingsAdvanced.Designer.cs
generated
48
Core/Other/Settings/TabSettingsAdvanced.Designer.cs
generated
@@ -31,13 +31,14 @@
|
|||||||
this.btnEditCSS = new System.Windows.Forms.Button();
|
this.btnEditCSS = new System.Windows.Forms.Button();
|
||||||
this.btnRestartLog = new System.Windows.Forms.Button();
|
this.btnRestartLog = new System.Windows.Forms.Button();
|
||||||
this.btnRestart = new System.Windows.Forms.Button();
|
this.btnRestart = new System.Windows.Forms.Button();
|
||||||
|
this.btnOpenAppFolder = new System.Windows.Forms.Button();
|
||||||
|
this.btnOpenDataFolder = new System.Windows.Forms.Button();
|
||||||
this.btnReset = new System.Windows.Forms.Button();
|
this.btnReset = new System.Windows.Forms.Button();
|
||||||
this.btnImport = new System.Windows.Forms.Button();
|
this.btnImport = new System.Windows.Forms.Button();
|
||||||
this.btnExport = new System.Windows.Forms.Button();
|
this.btnExport = new System.Windows.Forms.Button();
|
||||||
this.groupPerformance = new System.Windows.Forms.GroupBox();
|
this.groupPerformance = new System.Windows.Forms.GroupBox();
|
||||||
this.groupConfiguration = new System.Windows.Forms.GroupBox();
|
this.groupConfiguration = new System.Windows.Forms.GroupBox();
|
||||||
this.groupApp = new System.Windows.Forms.GroupBox();
|
this.groupApp = new System.Windows.Forms.GroupBox();
|
||||||
this.btnOpenAppFolder = new System.Windows.Forms.Button();
|
|
||||||
this.groupPerformance.SuspendLayout();
|
this.groupPerformance.SuspendLayout();
|
||||||
this.groupConfiguration.SuspendLayout();
|
this.groupConfiguration.SuspendLayout();
|
||||||
this.groupApp.SuspendLayout();
|
this.groupApp.SuspendLayout();
|
||||||
@@ -93,19 +94,19 @@
|
|||||||
//
|
//
|
||||||
// btnRestartLog
|
// btnRestartLog
|
||||||
//
|
//
|
||||||
this.btnRestartLog.Location = new System.Drawing.Point(6, 77);
|
this.btnRestartLog.Location = new System.Drawing.Point(6, 106);
|
||||||
this.btnRestartLog.Name = "btnRestartLog";
|
this.btnRestartLog.Name = "btnRestartLog";
|
||||||
this.btnRestartLog.Size = new System.Drawing.Size(171, 23);
|
this.btnRestartLog.Size = new System.Drawing.Size(171, 23);
|
||||||
this.btnRestartLog.TabIndex = 18;
|
this.btnRestartLog.TabIndex = 18;
|
||||||
this.btnRestartLog.Text = "Restart with Logging";
|
this.btnRestartLog.Text = "Restart with Logging";
|
||||||
this.toolTip.SetToolTip(this.btnRestartLog, "Restarts the program and enables logging\r\ninto a debug.txt file in the installati" +
|
this.toolTip.SetToolTip(this.btnRestartLog, "Restarts the program and enables logging\r\ninto a debug.txt file in the data folde" +
|
||||||
"on folder.");
|
"r.");
|
||||||
this.btnRestartLog.UseVisualStyleBackColor = true;
|
this.btnRestartLog.UseVisualStyleBackColor = true;
|
||||||
this.btnRestartLog.Click += new System.EventHandler(this.btnRestartLog_Click);
|
this.btnRestartLog.Click += new System.EventHandler(this.btnRestartLog_Click);
|
||||||
//
|
//
|
||||||
// btnRestart
|
// btnRestart
|
||||||
//
|
//
|
||||||
this.btnRestart.Location = new System.Drawing.Point(6, 48);
|
this.btnRestart.Location = new System.Drawing.Point(6, 77);
|
||||||
this.btnRestart.Name = "btnRestart";
|
this.btnRestart.Name = "btnRestart";
|
||||||
this.btnRestart.Size = new System.Drawing.Size(171, 23);
|
this.btnRestart.Size = new System.Drawing.Size(171, 23);
|
||||||
this.btnRestart.TabIndex = 17;
|
this.btnRestart.TabIndex = 17;
|
||||||
@@ -115,6 +116,28 @@
|
|||||||
this.btnRestart.UseVisualStyleBackColor = true;
|
this.btnRestart.UseVisualStyleBackColor = true;
|
||||||
this.btnRestart.Click += new System.EventHandler(this.btnRestart_Click);
|
this.btnRestart.Click += new System.EventHandler(this.btnRestart_Click);
|
||||||
//
|
//
|
||||||
|
// btnOpenAppFolder
|
||||||
|
//
|
||||||
|
this.btnOpenAppFolder.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.btnOpenAppFolder.Name = "btnOpenAppFolder";
|
||||||
|
this.btnOpenAppFolder.Size = new System.Drawing.Size(171, 23);
|
||||||
|
this.btnOpenAppFolder.TabIndex = 16;
|
||||||
|
this.btnOpenAppFolder.Text = "Open Program Folder";
|
||||||
|
this.toolTip.SetToolTip(this.btnOpenAppFolder, "Opens the folder where the app is located.");
|
||||||
|
this.btnOpenAppFolder.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOpenAppFolder.Click += new System.EventHandler(this.btnOpenAppFolder_Click);
|
||||||
|
//
|
||||||
|
// btnOpenDataFolder
|
||||||
|
//
|
||||||
|
this.btnOpenDataFolder.Location = new System.Drawing.Point(6, 48);
|
||||||
|
this.btnOpenDataFolder.Name = "btnOpenDataFolder";
|
||||||
|
this.btnOpenDataFolder.Size = new System.Drawing.Size(171, 23);
|
||||||
|
this.btnOpenDataFolder.TabIndex = 19;
|
||||||
|
this.btnOpenDataFolder.Text = "Open Data Folder";
|
||||||
|
this.toolTip.SetToolTip(this.btnOpenDataFolder, "Opens the folder where your profile data is located.");
|
||||||
|
this.btnOpenDataFolder.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOpenDataFolder.Click += new System.EventHandler(this.btnOpenDataFolder_Click);
|
||||||
|
//
|
||||||
// btnReset
|
// btnReset
|
||||||
//
|
//
|
||||||
this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
@@ -179,27 +202,17 @@
|
|||||||
//
|
//
|
||||||
// groupApp
|
// groupApp
|
||||||
//
|
//
|
||||||
|
this.groupApp.Controls.Add(this.btnOpenDataFolder);
|
||||||
this.groupApp.Controls.Add(this.btnOpenAppFolder);
|
this.groupApp.Controls.Add(this.btnOpenAppFolder);
|
||||||
this.groupApp.Controls.Add(this.btnRestartLog);
|
this.groupApp.Controls.Add(this.btnRestartLog);
|
||||||
this.groupApp.Controls.Add(this.btnRestart);
|
this.groupApp.Controls.Add(this.btnRestart);
|
||||||
this.groupApp.Location = new System.Drawing.Point(198, 9);
|
this.groupApp.Location = new System.Drawing.Point(198, 9);
|
||||||
this.groupApp.Name = "groupApp";
|
this.groupApp.Name = "groupApp";
|
||||||
this.groupApp.Size = new System.Drawing.Size(183, 106);
|
this.groupApp.Size = new System.Drawing.Size(183, 135);
|
||||||
this.groupApp.TabIndex = 20;
|
this.groupApp.TabIndex = 20;
|
||||||
this.groupApp.TabStop = false;
|
this.groupApp.TabStop = false;
|
||||||
this.groupApp.Text = "App";
|
this.groupApp.Text = "App";
|
||||||
//
|
//
|
||||||
// btnOpenAppFolder
|
|
||||||
//
|
|
||||||
this.btnOpenAppFolder.Location = new System.Drawing.Point(6, 19);
|
|
||||||
this.btnOpenAppFolder.Name = "btnOpenAppFolder";
|
|
||||||
this.btnOpenAppFolder.Size = new System.Drawing.Size(171, 23);
|
|
||||||
this.btnOpenAppFolder.TabIndex = 16;
|
|
||||||
this.btnOpenAppFolder.Text = "Open Program Folder";
|
|
||||||
this.toolTip.SetToolTip(this.btnOpenAppFolder, "Opens the folder where the app is located.");
|
|
||||||
this.btnOpenAppFolder.UseVisualStyleBackColor = true;
|
|
||||||
this.btnOpenAppFolder.Click += new System.EventHandler(this.btnOpenAppFolder_Click);
|
|
||||||
//
|
|
||||||
// TabSettingsAdvanced
|
// TabSettingsAdvanced
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@@ -237,5 +250,6 @@
|
|||||||
private System.Windows.Forms.Button btnRestartLog;
|
private System.Windows.Forms.Button btnRestartLog;
|
||||||
private System.Windows.Forms.Button btnRestart;
|
private System.Windows.Forms.Button btnRestart;
|
||||||
private System.Windows.Forms.Button btnOpenAppFolder;
|
private System.Windows.Forms.Button btnOpenAppFolder;
|
||||||
|
private System.Windows.Forms.Button btnOpenDataFolder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -95,10 +95,16 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void btnExport_Click(object sender, EventArgs e){
|
private void btnExport_Click(object sender, EventArgs e){
|
||||||
DialogResult resultSaveCredentials = MessageBox.Show("Do you want to include your login session? This will not save your password into the file, but it will allow anyone with the file to login into TweetDeck as you.", "Export "+Program.BrandName+" Settings", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3);
|
ExportFileFlags flags;
|
||||||
if (resultSaveCredentials == DialogResult.Cancel)return;
|
|
||||||
|
using(DialogSettingsExport dialog = DialogSettingsExport.Export()){
|
||||||
|
if (dialog.ShowDialog() != DialogResult.OK){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
flags = dialog.Flags;
|
||||||
|
}
|
||||||
|
|
||||||
bool saveCredentials = resultSaveCredentials == DialogResult.Yes;
|
|
||||||
string file;
|
string file;
|
||||||
|
|
||||||
using(SaveFileDialog dialog = new SaveFileDialog{
|
using(SaveFileDialog dialog = new SaveFileDialog{
|
||||||
@@ -110,19 +116,21 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
Title = "Export "+Program.BrandName+" Settings",
|
Title = "Export "+Program.BrandName+" Settings",
|
||||||
Filter = Program.BrandName+" Settings (*.tdsettings)|*.tdsettings"
|
Filter = Program.BrandName+" Settings (*.tdsettings)|*.tdsettings"
|
||||||
}){
|
}){
|
||||||
file = dialog.ShowDialog() == DialogResult.OK ? dialog.FileName : null;
|
if (dialog.ShowDialog() != DialogResult.OK){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
file = dialog.FileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file != null){
|
|
||||||
Program.UserConfig.Save();
|
Program.UserConfig.Save();
|
||||||
|
|
||||||
ExportManager manager = new ExportManager(file, plugins);
|
ExportManager manager = new ExportManager(file, plugins);
|
||||||
|
|
||||||
if (!manager.Export(saveCredentials)){
|
if (!manager.Export(flags)){
|
||||||
Program.Reporter.HandleException("Profile Export Error", "An exception happened while exporting "+Program.BrandName+" settings.", true, manager.LastException);
|
Program.Reporter.HandleException("Profile Export Error", "An exception happened while exporting "+Program.BrandName+" settings.", true, manager.LastException);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void btnImport_Click(object sender, EventArgs e){
|
private void btnImport_Click(object sender, EventArgs e){
|
||||||
string file;
|
string file;
|
||||||
@@ -133,13 +141,25 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
Title = "Import "+Program.BrandName+" Settings",
|
Title = "Import "+Program.BrandName+" Settings",
|
||||||
Filter = Program.BrandName+" Settings (*.tdsettings)|*.tdsettings"
|
Filter = Program.BrandName+" Settings (*.tdsettings)|*.tdsettings"
|
||||||
}){
|
}){
|
||||||
file = dialog.ShowDialog() == DialogResult.OK ? dialog.FileName : null;
|
if (dialog.ShowDialog() != DialogResult.OK){
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file != null){
|
file = dialog.FileName;
|
||||||
ExportManager manager = new ExportManager(file, plugins);
|
}
|
||||||
|
|
||||||
if (manager.Import()){
|
ExportManager manager = new ExportManager(file, plugins);
|
||||||
|
ExportFileFlags flags;
|
||||||
|
|
||||||
|
using(DialogSettingsExport dialog = DialogSettingsExport.Import(manager.GetImportFlags())){
|
||||||
|
if (dialog.ShowDialog() != DialogResult.OK){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
flags = dialog.Flags;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (manager.Import(flags)){
|
||||||
if (!manager.IsRestarting){
|
if (!manager.IsRestarting){
|
||||||
((FormSettings)ParentForm).ReloadUI();
|
((FormSettings)ParentForm).ReloadUI();
|
||||||
}
|
}
|
||||||
@@ -148,7 +168,6 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
Program.Reporter.HandleException("Profile Import Error", "An exception happened while importing "+Program.BrandName+" settings.", true, manager.LastException);
|
Program.Reporter.HandleException("Profile Import Error", "An exception happened while importing "+Program.BrandName+" settings.", true, manager.LastException);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void btnReset_Click(object sender, EventArgs e){
|
private void btnReset_Click(object sender, EventArgs e){
|
||||||
if (MessageBox.Show("This will reset all of your settings, including disabled plugins. Do you want to proceed?", "Reset "+Program.BrandName+" Settings", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes){
|
if (MessageBox.Show("This will reset all of your settings, including disabled plugins. Do you want to proceed?", "Reset "+Program.BrandName+" Settings", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes){
|
||||||
@@ -161,6 +180,10 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
using(Process.Start("explorer.exe", "\""+Program.ProgramPath+"\"")){}
|
using(Process.Start("explorer.exe", "\""+Program.ProgramPath+"\"")){}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnOpenDataFolder_Click(object sender, EventArgs e){
|
||||||
|
using(Process.Start("explorer.exe", "\""+Program.StoragePath+"\"")){}
|
||||||
|
}
|
||||||
|
|
||||||
private void btnRestart_Click(object sender, EventArgs e){
|
private void btnRestart_Click(object sender, EventArgs e){
|
||||||
Program.Restart();
|
Program.Restart();
|
||||||
}
|
}
|
||||||
|
@@ -47,12 +47,17 @@
|
|||||||
this.checkLegacyLoad = new System.Windows.Forms.CheckBox();
|
this.checkLegacyLoad = new System.Windows.Forms.CheckBox();
|
||||||
this.checkNotificationTimer = new System.Windows.Forms.CheckBox();
|
this.checkNotificationTimer = new System.Windows.Forms.CheckBox();
|
||||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||||
|
this.groupCustomSound = new System.Windows.Forms.GroupBox();
|
||||||
|
this.tbCustomSound = new System.Windows.Forms.TextBox();
|
||||||
|
this.btnBrowseSound = new System.Windows.Forms.Button();
|
||||||
|
this.btnResetSound = new System.Windows.Forms.Button();
|
||||||
this.groupNotificationLocation.SuspendLayout();
|
this.groupNotificationLocation.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.trackBarEdgeDistance)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.trackBarEdgeDistance)).BeginInit();
|
||||||
this.groupNotificationDuration.SuspendLayout();
|
this.groupNotificationDuration.SuspendLayout();
|
||||||
this.tableLayoutDurationButtons.SuspendLayout();
|
this.tableLayoutDurationButtons.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.trackBarDuration)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.trackBarDuration)).BeginInit();
|
||||||
this.groupUserInterface.SuspendLayout();
|
this.groupUserInterface.SuspendLayout();
|
||||||
|
this.groupCustomSound.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// groupNotificationLocation
|
// groupNotificationLocation
|
||||||
@@ -349,10 +354,54 @@
|
|||||||
this.checkNotificationTimer.UseVisualStyleBackColor = true;
|
this.checkNotificationTimer.UseVisualStyleBackColor = true;
|
||||||
this.checkNotificationTimer.CheckedChanged += new System.EventHandler(this.checkNotificationTimer_CheckedChanged);
|
this.checkNotificationTimer.CheckedChanged += new System.EventHandler(this.checkNotificationTimer_CheckedChanged);
|
||||||
//
|
//
|
||||||
|
// groupCustomSound
|
||||||
|
//
|
||||||
|
this.groupCustomSound.Controls.Add(this.btnResetSound);
|
||||||
|
this.groupCustomSound.Controls.Add(this.btnBrowseSound);
|
||||||
|
this.groupCustomSound.Controls.Add(this.tbCustomSound);
|
||||||
|
this.groupCustomSound.Location = new System.Drawing.Point(9, 201);
|
||||||
|
this.groupCustomSound.Name = "groupCustomSound";
|
||||||
|
this.groupCustomSound.Size = new System.Drawing.Size(183, 72);
|
||||||
|
this.groupCustomSound.TabIndex = 11;
|
||||||
|
this.groupCustomSound.TabStop = false;
|
||||||
|
this.groupCustomSound.Text = "Custom Sound";
|
||||||
|
//
|
||||||
|
// tbCustomSound
|
||||||
|
//
|
||||||
|
this.tbCustomSound.Location = new System.Drawing.Point(6, 19);
|
||||||
|
this.tbCustomSound.Name = "tbCustomSound";
|
||||||
|
this.tbCustomSound.Size = new System.Drawing.Size(170, 20);
|
||||||
|
this.tbCustomSound.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// btnBrowseSound
|
||||||
|
//
|
||||||
|
this.btnBrowseSound.AutoSize = true;
|
||||||
|
this.btnBrowseSound.Location = new System.Drawing.Point(53, 43);
|
||||||
|
this.btnBrowseSound.Name = "btnBrowseSound";
|
||||||
|
this.btnBrowseSound.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
|
this.btnBrowseSound.Size = new System.Drawing.Size(67, 23);
|
||||||
|
this.btnBrowseSound.TabIndex = 1;
|
||||||
|
this.btnBrowseSound.Text = "Browse...";
|
||||||
|
this.btnBrowseSound.UseVisualStyleBackColor = true;
|
||||||
|
this.btnBrowseSound.Click += new System.EventHandler(this.btnBrowseSound_Click);
|
||||||
|
//
|
||||||
|
// btnResetSound
|
||||||
|
//
|
||||||
|
this.btnResetSound.AutoSize = true;
|
||||||
|
this.btnResetSound.Location = new System.Drawing.Point(126, 43);
|
||||||
|
this.btnResetSound.Name = "btnResetSound";
|
||||||
|
this.btnResetSound.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
|
||||||
|
this.btnResetSound.Size = new System.Drawing.Size(51, 23);
|
||||||
|
this.btnResetSound.TabIndex = 2;
|
||||||
|
this.btnResetSound.Text = "Reset";
|
||||||
|
this.btnResetSound.UseVisualStyleBackColor = true;
|
||||||
|
this.btnResetSound.Click += new System.EventHandler(this.btnResetSound_Click);
|
||||||
|
//
|
||||||
// TabSettingsNotifications
|
// TabSettingsNotifications
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.groupCustomSound);
|
||||||
this.Controls.Add(this.groupUserInterface);
|
this.Controls.Add(this.groupUserInterface);
|
||||||
this.Controls.Add(this.groupNotificationDuration);
|
this.Controls.Add(this.groupNotificationDuration);
|
||||||
this.Controls.Add(this.groupNotificationLocation);
|
this.Controls.Add(this.groupNotificationLocation);
|
||||||
@@ -368,6 +417,8 @@
|
|||||||
((System.ComponentModel.ISupportInitialize)(this.trackBarDuration)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.trackBarDuration)).EndInit();
|
||||||
this.groupUserInterface.ResumeLayout(false);
|
this.groupUserInterface.ResumeLayout(false);
|
||||||
this.groupUserInterface.PerformLayout();
|
this.groupUserInterface.PerformLayout();
|
||||||
|
this.groupCustomSound.ResumeLayout(false);
|
||||||
|
this.groupCustomSound.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -397,5 +448,9 @@
|
|||||||
private TweetDck.Core.Controls.FlatButton btnDurationMedium;
|
private TweetDck.Core.Controls.FlatButton btnDurationMedium;
|
||||||
private TweetDck.Core.Controls.FlatButton btnDurationLong;
|
private TweetDck.Core.Controls.FlatButton btnDurationLong;
|
||||||
private TweetDck.Core.Controls.FlatButton btnDurationShort;
|
private TweetDck.Core.Controls.FlatButton btnDurationShort;
|
||||||
|
private System.Windows.Forms.GroupBox groupCustomSound;
|
||||||
|
private System.Windows.Forms.Button btnResetSound;
|
||||||
|
private System.Windows.Forms.Button btnBrowseSound;
|
||||||
|
private System.Windows.Forms.TextBox tbCustomSound;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +1,15 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using TweetDck.Core.Handling;
|
|
||||||
using TweetDck.Core.Controls;
|
using TweetDck.Core.Controls;
|
||||||
|
using TweetDck.Core.Notification;
|
||||||
|
using TweetDck.Core.Utils;
|
||||||
|
|
||||||
namespace TweetDck.Core.Other.Settings{
|
namespace TweetDck.Core.Other.Settings{
|
||||||
partial class TabSettingsNotifications : BaseTabSettings{
|
partial class TabSettingsNotifications : BaseTabSettings{
|
||||||
private readonly FormNotification notification;
|
private readonly FormNotification notification;
|
||||||
|
private readonly Point initCursorPosition;
|
||||||
|
|
||||||
public TabSettingsNotifications(FormNotification notification){
|
public TabSettingsNotifications(FormNotification notification){
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -24,8 +27,11 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
this.InvokeSafe(() => this.notification.ShowNotificationForSettings(true));
|
this.InvokeSafe(() => this.notification.ShowNotificationForSettings(true));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.notification.Activated += notification_Activated;
|
||||||
this.notification.Show(this);
|
this.notification.Show(this);
|
||||||
|
|
||||||
|
initCursorPosition = Cursor.Position;
|
||||||
|
|
||||||
switch(Config.NotificationPosition){
|
switch(Config.NotificationPosition){
|
||||||
case TweetNotification.Position.TopLeft: radioLocTL.Checked = true; break;
|
case TweetNotification.Position.TopLeft: radioLocTL.Checked = true; break;
|
||||||
case TweetNotification.Position.TopRight: radioLocTR.Checked = true; break;
|
case TweetNotification.Position.TopRight: radioLocTR.Checked = true; break;
|
||||||
@@ -53,9 +59,15 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
trackBarEdgeDistance.SetValueSafe(Config.NotificationEdgeDistance);
|
trackBarEdgeDistance.SetValueSafe(Config.NotificationEdgeDistance);
|
||||||
labelEdgeDistanceValue.Text = trackBarEdgeDistance.Value.ToString(CultureInfo.InvariantCulture)+" px";
|
labelEdgeDistanceValue.Text = trackBarEdgeDistance.Value.ToString(CultureInfo.InvariantCulture)+" px";
|
||||||
|
|
||||||
|
tbCustomSound.Text = Config.NotificationSoundPath ?? string.Empty;
|
||||||
|
|
||||||
Disposed += (sender, args) => this.notification.Dispose();
|
Disposed += (sender, args) => this.notification.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnClosing(){
|
||||||
|
Config.NotificationSoundPath = tbCustomSound.Text;
|
||||||
|
}
|
||||||
|
|
||||||
private void TabSettingsNotifications_ParentChanged(object sender, EventArgs e){
|
private void TabSettingsNotifications_ParentChanged(object sender, EventArgs e){
|
||||||
if (Parent == null){
|
if (Parent == null){
|
||||||
notification.HideNotification(false);
|
notification.HideNotification(false);
|
||||||
@@ -65,6 +77,21 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void notification_Activated(object sender, EventArgs e){
|
||||||
|
if (Cursor.Position == initCursorPosition){
|
||||||
|
Timer delay = WindowsUtils.CreateSingleTickTimer(1);
|
||||||
|
|
||||||
|
delay.Tick += (sender2, args2) => { // here you can see a disgusting hack to force the freshly opened notification window out of focus
|
||||||
|
NativeMethods.SimulateMouseClick(NativeMethods.MouseButton.Left); // because for some reason, the stupid thing keeps stealing it
|
||||||
|
delay.Dispose(); // even after using ShowWithoutActivation, the CreateParams bullshit, and about a million different combinations
|
||||||
|
}; // of trying to force the original form back into focus in various events, so you will have to fucking deal with it, alright
|
||||||
|
|
||||||
|
delay.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
notification.Activated -= notification_Activated;
|
||||||
|
}
|
||||||
|
|
||||||
private void radioLoc_CheckedChanged(object sender, EventArgs e){
|
private void radioLoc_CheckedChanged(object sender, EventArgs e){
|
||||||
if (!Ready)return;
|
if (!Ready)return;
|
||||||
|
|
||||||
@@ -146,5 +173,22 @@ namespace TweetDck.Core.Other.Settings{
|
|||||||
Config.NotificationEdgeDistance = trackBarEdgeDistance.Value;
|
Config.NotificationEdgeDistance = trackBarEdgeDistance.Value;
|
||||||
notification.ShowNotificationForSettings(false);
|
notification.ShowNotificationForSettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnBrowseSound_Click(object sender, EventArgs e){
|
||||||
|
using(OpenFileDialog dialog = new OpenFileDialog{
|
||||||
|
AutoUpgradeEnabled = true,
|
||||||
|
DereferenceLinks = true,
|
||||||
|
Title = "Custom Notification Sound",
|
||||||
|
Filter = "Wave file (*.wav)|*.wav"
|
||||||
|
}){
|
||||||
|
if (dialog.ShowDialog() == DialogResult.OK){
|
||||||
|
tbCustomSound.Text = dialog.FileName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnResetSound_Click(object sender, EventArgs e){
|
||||||
|
tbCustomSound.Text = string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace TweetDck.Core.Utils{
|
namespace TweetDck.Core.Utils{
|
||||||
static class WindowsUtils{
|
static class WindowsUtils{
|
||||||
@@ -29,5 +30,14 @@ namespace TweetDck.Core.Utils{
|
|||||||
|
|
||||||
return Process.Start(processInfo);
|
return Process.Start(processInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Timer CreateSingleTickTimer(int timeout){
|
||||||
|
Timer timer = new Timer{
|
||||||
|
Interval = timeout
|
||||||
|
};
|
||||||
|
|
||||||
|
timer.Tick += (sender, args) => timer.Stop();
|
||||||
|
return timer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
The program was build using Visual Studio 2013. After opening the solution, make sure you have **CefSharp.WinForms** and **Microsoft.VC120.CRT.JetBrains** included - if not, download them using NuGet. For **CefSharp**, you will need version 53 or newer currently available as a pre-release.
|
The program was build using Visual Studio 2013. After opening the solution, make sure you have **CefSharp.WinForms** and **Microsoft.VC120.CRT.JetBrains** included - if not, download them using NuGet. For **CefSharp**, you will need version 53 or newer currently available as a pre-release.
|
||||||
```
|
```
|
||||||
PM> Install-Package CefSharp.WinForms -Pre -Version 53.0.0-pre01
|
PM> Install-Package CefSharp.WinForms -Version 53.0.1
|
||||||
PM> Install-Package Microsoft.VC120.CRT.JetBrains
|
PM> Install-Package Microsoft.VC120.CRT.JetBrains
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@ Clear columns
|
|||||||
chylex
|
chylex
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
1.1
|
1.1.1
|
||||||
|
|
||||||
[website]
|
[website]
|
||||||
https://tweetduck.chylex.com
|
https://tweetduck.chylex.com
|
||||||
|
@@ -116,9 +116,9 @@ ready(){
|
|||||||
|
|
||||||
// add clear all button
|
// add clear all button
|
||||||
$("nav.app-navigator").first().append([
|
$("nav.app-navigator").first().append([
|
||||||
'<a class="link-clean cf app-nav-link padding-hl" data-title="Clear all" data-action="td-clearcolumns-doall">',
|
'<a class="link-clean cf app-nav-link padding-h--10" data-title="Clear all" data-action="td-clearcolumns-doall">',
|
||||||
'<div class="obj-left"><i class="icon icon-large icon-clear-timeline"></i></div>',
|
'<div class="obj-left margin-l--2"><i class="icon icon-medium icon-clear-timeline"></i></div>',
|
||||||
'<div id="clear-columns-btn-all" class="nbfc padding-ts hide-condensed">Clear all</div>',
|
'<div id="clear-columns-btn-all" class="nbfc padding-ts hide-condensed txt-size--16">Clear all</div>',
|
||||||
'</a></nav>'
|
'</a></nav>'
|
||||||
].join(""));
|
].join(""));
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ enabled(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
// add poll rendering to tweets
|
// add poll rendering to tweets
|
||||||
injectLayout("status/tweet_single.mustache", "status/poll", "{{/quotedTweetMissing}} {{#translation}}", "{{/quotedTweetMissing}} <div class='timeline-poll-container'>{{>duck/tweet_single/poll}}</div> {{#translation}}");
|
injectLayout("status/tweet_single.mustache", "status/poll", "{{/quotedTweetMissing}} {{#translation}}", "{{/quotedTweetMissing}} <div class='timeline-poll-container'>{{#poll}}{{>duck/tweet_single/poll}}{{/poll}}</div> {{#translation}}");
|
||||||
TD.mustaches["duck/tweet_single/poll.mustache"] = '<div class="js-poll margin-tl"> {{#poll}} <ul class="margin-b--12"> {{#choices}} <li class="position-rel margin-b--8 height-3"> <div class="poll-bar pin-top height-p--100 br-1 {{#isWinner}}poll-bar--winner{{/isWinner}} {{#hasTimeLeft}}br-left{{/hasTimeLeft}} width-p--{{percentage}}"/> <div class="poll-label position-rel padding-a--4"> <span class="txt-bold txt-right inline-block width-5 padding-r--4">{{percentage}}%</span> {{{label}}} {{#isSelectedChoice}} <i class="icon icon-check txt-size-variable--11"></i> {{/isSelectedChoice}} </div> </li> {{/choices}} </ul> <span class="inline-block txt-small padding-ls txt-seamful-deep-gray"> {{{prettyCount}}} · {{#hasTimeLeft}} {{{prettyTimeLeft}}} {{/hasTimeLeft}} {{^hasTimeLeft}} {{_i}}Final results{{/i}} {{/hasTimeLeft}} </span> {{/poll}} </div>';
|
TD.mustaches["duck/tweet_single/poll.mustache"] = '<div class="js-poll margin-tl"> {{#poll}} <ul class="margin-b--12"> {{#choices}} <li class="position-rel margin-b--8 height-3"> <div class="poll-bar pin-top height-p--100 br-1 {{#isWinner}}poll-bar--winner{{/isWinner}} {{#hasTimeLeft}}br-left{{/hasTimeLeft}} width-p--{{percentage}}"/> <div class="poll-label position-rel padding-a--4"> <span class="txt-bold txt-right inline-block width-5 padding-r--4">{{percentage}}%</span> {{{label}}} {{#isSelectedChoice}} <i class="icon icon-check txt-size-variable--11"></i> {{/isSelectedChoice}} </div> </li> {{/choices}} </ul> <span class="inline-block txt-small padding-ls txt-seamful-deep-gray"> {{{prettyCount}}} · {{#hasTimeLeft}} {{{prettyTimeLeft}}} {{/hasTimeLeft}} {{^hasTimeLeft}} {{_i}}Final results{{/i}} {{/hasTimeLeft}} </span> {{/poll}} </div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -117,8 +117,9 @@
|
|||||||
|
|
||||||
$TD.onTweetPopup(html.html(), url, tweet.text.length); // TODO column
|
$TD.onTweetPopup(html.html(), url, tweet.text.length); // TODO column
|
||||||
}
|
}
|
||||||
else if (column.model.getHasSound()){
|
|
||||||
$TD.onTweetSound(); // TODO disable original
|
if (column.model.getHasSound()){
|
||||||
|
$TD.onTweetSound();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -255,14 +256,10 @@
|
|||||||
var soundEle = document.getElementById("update-sound");
|
var soundEle = document.getElementById("update-sound");
|
||||||
|
|
||||||
soundEle.play = prependToFunction(soundEle.play, function(){
|
soundEle.play = prependToFunction(soundEle.play, function(){
|
||||||
return $TD.muteNotifications;
|
return $TD.muteNotifications || $TD.hasCustomNotificationSound;
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
/* TODO document.getElementById("update-sound").play = function(){
|
|
||||||
$TD.onTweetSound();
|
|
||||||
};*/
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Update highlighted column.
|
// Block: Update highlighted column.
|
||||||
//
|
//
|
||||||
@@ -292,7 +289,7 @@
|
|||||||
if (e.type === "mouseenter"){
|
if (e.type === "mouseenter"){
|
||||||
highlightedTweetEle = $(this);
|
highlightedTweetEle = $(this);
|
||||||
|
|
||||||
var link = $(this).find("time").first().children("a").first();
|
var link = $(this).parent().hasClass("js-tweet-detail") ? $(this).find("a[rel='url']").first() : $(this).find("time").first().children("a").first();
|
||||||
var embedded = $(this).find(".quoted-tweet[data-tweet-id]").first();
|
var embedded = $(this).find(".quoted-tweet[data-tweet-id]").first();
|
||||||
|
|
||||||
updateHighlightedTweet(link.length > 0 ? link.attr("href") : "", embedded.length > 0 ? embedded.find(".account-link").first().attr("href")+"/status/"+embedded.attr("data-tweet-id") : "");
|
updateHighlightedTweet(link.length > 0 ? link.attr("href") : "", embedded.length > 0 ? embedded.find(".account-link").first().attr("href")+"/status/"+embedded.attr("data-tweet-id") : "");
|
||||||
@@ -304,6 +301,67 @@
|
|||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Block: Screenshot tweet to clipboard.
|
||||||
|
//
|
||||||
|
(function(){
|
||||||
|
var selectedTweet;
|
||||||
|
|
||||||
|
var setImportantProperty = function(obj, property, value){
|
||||||
|
if (obj.length === 1){
|
||||||
|
obj[0].style.setProperty(property, value, "important");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
app.delegate("article.js-stream-item", "contextmenu", function(){
|
||||||
|
selectedTweet = $(this);
|
||||||
|
});
|
||||||
|
|
||||||
|
window.TDGF_triggerScreenshot = function(){
|
||||||
|
if (selectedTweet){
|
||||||
|
var tweetWidth = selectedTweet.width();
|
||||||
|
var parent = selectedTweet.parent();
|
||||||
|
|
||||||
|
var isDetail = parent.hasClass("js-tweet-detail");
|
||||||
|
var isReply = !isDetail && (parent.hasClass("js-replies-to") || parent.hasClass("js-replies-before"));
|
||||||
|
|
||||||
|
selectedTweet = selectedTweet.clone();
|
||||||
|
selectedTweet.children().first().addClass($(document.documentElement).attr("class")).css("padding-bottom", "12px");
|
||||||
|
|
||||||
|
setImportantProperty(selectedTweet.find(".js-quote-detail"), "margin-bottom", "0");
|
||||||
|
setImportantProperty(selectedTweet.find(".js-media-preview-container"), "margin-bottom", "0");
|
||||||
|
|
||||||
|
if (isDetail){
|
||||||
|
setImportantProperty(selectedTweet.find(".js-tweet-media"), "margin-bottom", "0");
|
||||||
|
selectedTweet.find(".js-translate-call-to-action").first().remove();
|
||||||
|
selectedTweet.find(".js-cards-container").first().nextAll().remove();
|
||||||
|
selectedTweet.find(".js-detail-view-inline").first().remove();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
selectedTweet.find("footer").last().remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isReply){
|
||||||
|
selectedTweet.find(".is-conversation").removeClass("is-conversation");
|
||||||
|
selectedTweet.find(".timeline-poll-container").first().remove(); // fix for timeline polls plugin
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedTweet.find(".js-poll-link").remove();
|
||||||
|
|
||||||
|
var testTweet = selectedTweet.clone().css({
|
||||||
|
position: "absolute",
|
||||||
|
left: "-999px",
|
||||||
|
width: tweetWidth+"px"
|
||||||
|
}).appendTo(document.body);
|
||||||
|
|
||||||
|
var realHeight = testTweet.height();
|
||||||
|
testTweet.remove();
|
||||||
|
|
||||||
|
$TD.screenshotTweet(selectedTweet.html(), tweetWidth, realHeight);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Paste images when tweeting.
|
// Block: Paste images when tweeting.
|
||||||
//
|
//
|
||||||
@@ -402,7 +460,7 @@
|
|||||||
tryClickSelector(".js-inline-compose-close") ||
|
tryClickSelector(".js-inline-compose-close") ||
|
||||||
tryCloseHighlightedColumn() ||
|
tryCloseHighlightedColumn() ||
|
||||||
tryClickSelector(".js-app-content.is-open .js-drawer-close:visible") ||
|
tryClickSelector(".js-app-content.is-open .js-drawer-close:visible") ||
|
||||||
tryClickSelector(".is-shifted-2 .js-tweet-social-proof-back") ||
|
tryClickSelector(".is-shifted-2 .js-tweet-social-proof-back, .is-shifted-2 .js-dm-participants-back") ||
|
||||||
$(".js-column-back").click();
|
$(".js-column-back").click();
|
||||||
}
|
}
|
||||||
else if (button === 2){ // forward button
|
else if (button === 2){ // forward button
|
||||||
@@ -428,6 +486,44 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
// Block: Hold Shift to reset cleared column.
|
||||||
|
//
|
||||||
|
(function(){
|
||||||
|
var holdingShift = false;
|
||||||
|
|
||||||
|
var updateShiftState = (pressed) => {
|
||||||
|
if (pressed != holdingShift){
|
||||||
|
holdingShift = pressed;
|
||||||
|
$("button[data-action='clear']").children("span").text(holdingShift ? "Reset" : "Clear");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var resetActiveFocus = () => {
|
||||||
|
document.activeElement.blur();
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).keydown(function(e){
|
||||||
|
if (e.shiftKey && (document.activeElement === null || !("value" in document.activeElement))){
|
||||||
|
updateShiftState(true);
|
||||||
|
}
|
||||||
|
}).keyup(function(e){
|
||||||
|
if (!e.shiftKey){
|
||||||
|
updateShiftState(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
TD.vo.Column.prototype.clear = prependToFunction(TD.vo.Column.prototype.clear, function(){
|
||||||
|
window.setTimeout(resetActiveFocus, 0); // unfocuses the Clear button, otherwise it steals keyboard input
|
||||||
|
|
||||||
|
if (holdingShift){
|
||||||
|
this.model.setClearedTimestamp(0);
|
||||||
|
this.reloadTweets();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Inject custom CSS and layout into the page.
|
// Block: Inject custom CSS and layout into the page.
|
||||||
//
|
//
|
||||||
@@ -445,5 +541,7 @@
|
|||||||
styleCustom.innerHTML = $TD.customBrowserCSS;
|
styleCustom.innerHTML = $TD.customBrowserCSS;
|
||||||
document.head.appendChild(styleCustom);
|
document.head.appendChild(styleCustom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TD.services.TwitterActionRetweetedRetweet.prototype.iconClass = "icon-retweet icon-retweet-color txt-base-medium"; // fix retweet icon mismatch
|
||||||
})();
|
})();
|
||||||
})($, $TD, TD);
|
})($, $TD, TD);
|
||||||
|
19
Resources/Scripts/debug.js
Normal file
19
Resources/Scripts/debug.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(function($, $TD, TD){
|
||||||
|
$(document).keydown(function(e){
|
||||||
|
|
||||||
|
// ==============================
|
||||||
|
// F4 key - simulate notification
|
||||||
|
// ==============================
|
||||||
|
|
||||||
|
if (e.keyCode === 115){
|
||||||
|
var col = TD.controller.columnManager.getAllOrdered()[0];
|
||||||
|
|
||||||
|
$.publish("/notifications/new",[{
|
||||||
|
column: col,
|
||||||
|
items: [
|
||||||
|
col.updateArray[Math.floor(Math.random()*col.updateArray.length)]
|
||||||
|
]
|
||||||
|
}]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})($, $TD, TD);
|
@@ -1,9 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="packages\CefSharp.WinForms.53.0.0-pre01\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.53.0.0-pre01\build\CefSharp.WinForms.props')" />
|
<Import Project="packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.props')" />
|
||||||
<Import Project="packages\CefSharp.Common.53.0.0-pre01\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.53.0.0-pre01\build\CefSharp.Common.props')" />
|
<Import Project="packages\CefSharp.Common.53.0.1\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.53.0.1\build\CefSharp.Common.props')" />
|
||||||
<Import Project="packages\CefSharp.WinForms.49.0.0-pre02\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.49.0.0-pre02\build\CefSharp.WinForms.props')" />
|
|
||||||
<Import Project="packages\CefSharp.Common.49.0.0-pre02\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.49.0.0-pre02\build\CefSharp.Common.props')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
@@ -16,7 +14,7 @@
|
|||||||
<AssemblyName Condition=" '$(Configuration)' == 'Release' ">TweetDuck</AssemblyName>
|
<AssemblyName Condition=" '$(Configuration)' == 'Release' ">TweetDuck</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<NuGetPackageImportStamp>e83161d1</NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>783c0e30</NuGetPackageImportStamp>
|
||||||
<TargetFrameworkProfile>
|
<TargetFrameworkProfile>
|
||||||
</TargetFrameworkProfile>
|
</TargetFrameworkProfile>
|
||||||
<PublishUrl>publish\</PublishUrl>
|
<PublishUrl>publish\</PublishUrl>
|
||||||
@@ -111,9 +109,10 @@
|
|||||||
<DependentUpon>FormNotification.cs</DependentUpon>
|
<DependentUpon>FormNotification.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Core\Handling\ContextMenuNotification.cs" />
|
<Compile Include="Core\Handling\ContextMenuNotification.cs" />
|
||||||
<Compile Include="Core\Handling\DialogHandlerBrowser.cs" />
|
<Compile Include="Core\Handling\FileDialogHandler.cs" />
|
||||||
|
<Compile Include="Core\Handling\JavaScriptDialogHandler.cs" />
|
||||||
<Compile Include="Core\Handling\LifeSpanHandler.cs" />
|
<Compile Include="Core\Handling\LifeSpanHandler.cs" />
|
||||||
<Compile Include="Core\Handling\TweetNotification.cs" />
|
<Compile Include="Core\Notification\TweetNotification.cs" />
|
||||||
<Compile Include="Core\Other\FormAbout.cs">
|
<Compile Include="Core\Other\FormAbout.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -144,7 +143,14 @@
|
|||||||
<Compile Include="Core\Other\Settings\Dialogs\DialogSettingsCefArgs.Designer.cs">
|
<Compile Include="Core\Other\Settings\Dialogs\DialogSettingsCefArgs.Designer.cs">
|
||||||
<DependentUpon>DialogSettingsCefArgs.cs</DependentUpon>
|
<DependentUpon>DialogSettingsCefArgs.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Core\Other\Settings\Dialogs\DialogSettingsExport.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Core\Other\Settings\Dialogs\DialogSettingsExport.Designer.cs">
|
||||||
|
<DependentUpon>DialogSettingsExport.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Core\Other\Settings\Export\CombinedFileStream.cs" />
|
<Compile Include="Core\Other\Settings\Export\CombinedFileStream.cs" />
|
||||||
|
<Compile Include="Core\Other\Settings\Export\ExportFileFlags.cs" />
|
||||||
<Compile Include="Core\Other\Settings\Export\ExportManager.cs" />
|
<Compile Include="Core\Other\Settings\Export\ExportManager.cs" />
|
||||||
<Compile Include="Core\Other\Settings\TabSettingsAdvanced.cs">
|
<Compile Include="Core\Other\Settings\TabSettingsAdvanced.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
@@ -176,11 +182,17 @@
|
|||||||
<Compile Include="Core\Other\Settings\TabSettingsUpdates.Designer.cs">
|
<Compile Include="Core\Other\Settings\TabSettingsUpdates.Designer.cs">
|
||||||
<DependentUpon>TabSettingsUpdates.cs</DependentUpon>
|
<DependentUpon>TabSettingsUpdates.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Core\Bridge\CallbackBridge.cs" />
|
||||||
<Compile Include="Core\Utils\CommandLineArgs.cs" />
|
<Compile Include="Core\Utils\CommandLineArgs.cs" />
|
||||||
<Compile Include="Core\Utils\CommandLineArgsParser.cs" />
|
<Compile Include="Core\Utils\CommandLineArgsParser.cs" />
|
||||||
|
<Compile Include="Core\Notification\Screenshot\FormNotificationScreenshotable.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Core\Notification\NotificationFlags.cs" />
|
||||||
|
<Compile Include="Core\Notification\Screenshot\TweetScreenshotManager.cs" />
|
||||||
<Compile Include="Core\Utils\WindowState.cs" />
|
<Compile Include="Core\Utils\WindowState.cs" />
|
||||||
<Compile Include="Core\Utils\WindowsUtils.cs" />
|
<Compile Include="Core\Utils\WindowsUtils.cs" />
|
||||||
<Compile Include="Core\Handling\TweetDeckBridge.cs" />
|
<Compile Include="Core\Bridge\TweetDeckBridge.cs" />
|
||||||
<Compile Include="Core\Other\FormSettings.cs">
|
<Compile Include="Core\Other\FormSettings.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -298,19 +310,27 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Resources\Plugins\" />
|
<Folder Include="Resources\Plugins\" />
|
||||||
<Folder Include="Resources\Scripts\" />
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Resources\Scripts\code.js" />
|
||||||
|
<Content Include="Resources\Scripts\debug.js" />
|
||||||
|
<Content Include="Resources\Scripts\notification.js" />
|
||||||
|
<Content Include="Resources\Scripts\plugins.browser.js" />
|
||||||
|
<Content Include="Resources\Scripts\plugins.js" />
|
||||||
|
<Content Include="Resources\Scripts\plugins.notification.js" />
|
||||||
|
<Content Include="Resources\Scripts\update.js" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('packages\cef.redist.x86.3.2785.1478\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.2785.1478\build\cef.redist.x86.targets'))" />
|
<Error Condition="!Exists('packages\cef.redist.x86.3.2785.1486\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.2785.1486\build\cef.redist.x86.targets'))" />
|
||||||
<Error Condition="!Exists('packages\cef.redist.x64.3.2785.1478\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.2785.1478\build\cef.redist.x64.targets'))" />
|
<Error Condition="!Exists('packages\cef.redist.x64.3.2785.1486\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.2785.1486\build\cef.redist.x64.targets'))" />
|
||||||
<Error Condition="!Exists('packages\CefSharp.Common.53.0.0-pre01\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.53.0.0-pre01\build\CefSharp.Common.props'))" />
|
<Error Condition="!Exists('packages\CefSharp.Common.53.0.1\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.53.0.1\build\CefSharp.Common.props'))" />
|
||||||
<Error Condition="!Exists('packages\CefSharp.Common.53.0.0-pre01\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.53.0.0-pre01\build\CefSharp.Common.targets'))" />
|
<Error Condition="!Exists('packages\CefSharp.Common.53.0.1\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.53.0.1\build\CefSharp.Common.targets'))" />
|
||||||
<Error Condition="!Exists('packages\CefSharp.WinForms.53.0.0-pre01\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.53.0.0-pre01\build\CefSharp.WinForms.props'))" />
|
<Error Condition="!Exists('packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.props'))" />
|
||||||
<Error Condition="!Exists('packages\CefSharp.WinForms.53.0.0-pre01\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.53.0.0-pre01\build\CefSharp.WinForms.targets'))" />
|
<Error Condition="!Exists('packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>del "$(TargetPath).config"
|
<PostBuildEvent>del "$(TargetPath).config"
|
||||||
@@ -331,10 +351,10 @@ xcopy "$(ProjectDir)Resources\Plugins\*" "$(TargetDir)plugins\official\" /E /Y
|
|||||||
rmdir "$(ProjectDir)\bin\Debug"
|
rmdir "$(ProjectDir)\bin\Debug"
|
||||||
rmdir "$(ProjectDir)\bin\Release"</PostBuildEvent>
|
rmdir "$(ProjectDir)\bin\Release"</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="packages\cef.redist.x86.3.2785.1478\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.2785.1478\build\cef.redist.x86.targets')" />
|
<Import Project="packages\cef.redist.x86.3.2785.1486\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.2785.1486\build\cef.redist.x86.targets')" />
|
||||||
<Import Project="packages\cef.redist.x64.3.2785.1478\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.2785.1478\build\cef.redist.x64.targets')" />
|
<Import Project="packages\cef.redist.x64.3.2785.1486\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.2785.1486\build\cef.redist.x64.targets')" />
|
||||||
<Import Project="packages\CefSharp.Common.53.0.0-pre01\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.53.0.0-pre01\build\CefSharp.Common.targets')" />
|
<Import Project="packages\CefSharp.Common.53.0.1\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.53.0.1\build\CefSharp.Common.targets')" />
|
||||||
<Import Project="packages\CefSharp.WinForms.53.0.0-pre01\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.53.0.0-pre01\build\CefSharp.WinForms.targets')" />
|
<Import Project="packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.targets')" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
del "bin\x86\Release\*.xml"
|
del "bin\x86\Release\*.xml"
|
||||||
del "bin\x86\Release\devtools_resources.pak"
|
del "bin\x86\Release\devtools_resources.pak"
|
||||||
del "bin\x86\Release\d3dcompiler_43.dll"
|
del "bin\x86\Release\d3dcompiler_43.dll"
|
||||||
|
del "bin\x86\Release\widevinecdmadapter.dll"
|
||||||
|
del "bin\x86\Release\Scripts\debug.js"
|
||||||
|
|
||||||
del "bin\x86\Release\TweetDuck.Browser.exe"
|
del "bin\x86\Release\TweetDuck.Browser.exe"
|
||||||
ren "bin\x86\Release\CefSharp.BrowserSubprocess.exe" "TweetDuck.Browser.exe"
|
ren "bin\x86\Release\CefSharp.BrowserSubprocess.exe" "TweetDuck.Browser.exe"
|
@@ -39,7 +39,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
|
|||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,devtools_resources.pak,d3dcompiler_43.dll"
|
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,devtools_resources.pak,d3dcompiler_43.dll,widevinecdmadapter.dll,debug.js"
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
||||||
|
@@ -36,7 +36,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
|||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,devtools_resources.pak,d3dcompiler_43.dll"
|
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,devtools_resources.pak,d3dcompiler_43.dll,widevinecdmadapter.dll,debug.js"
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall shellexec
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall shellexec
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#define MyAppID "8C25A716-7E11-4AAD-9992-8B5D0C78AE06"
|
#define MyAppID "8C25A716-7E11-4AAD-9992-8B5D0C78AE06"
|
||||||
#define MyAppVersion GetFileVersion("..\bin\x86\Release\TweetDuck.exe")
|
#define MyAppVersion GetFileVersion("..\bin\x86\Release\TweetDuck.exe")
|
||||||
#define CefVersion "3.2785.1478.0"
|
#define CefVersion "3.2785.1486.0"
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppId={{{#MyAppID}}
|
AppId={{{#MyAppID}}
|
||||||
@@ -41,7 +41,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
|||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.dll,*.pak,*.bin,*.dat"
|
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.dll,*.pak,*.bin,*.dat,debug.js"
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
||||||
@@ -53,6 +53,7 @@ Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChang
|
|||||||
Type: files; Name: "{app}\*.xml"
|
Type: files; Name: "{app}\*.xml"
|
||||||
Type: files; Name: "{app}\*.js"
|
Type: files; Name: "{app}\*.js"
|
||||||
Type: files; Name: "{app}\d3dcompiler_43.dll"
|
Type: files; Name: "{app}\d3dcompiler_43.dll"
|
||||||
|
Type: files; Name: "{app}\widevinecdmadapter.dll"
|
||||||
Type: files; Name: "{app}\devtools_resources.pak"
|
Type: files; Name: "{app}\devtools_resources.pak"
|
||||||
Type: files; Name: "{app}\CefSharp.BrowserSubprocess.exe"
|
Type: files; Name: "{app}\CefSharp.BrowserSubprocess.exe"
|
||||||
Type: files; Name: "{app}\td-log.txt"
|
Type: files; Name: "{app}\td-log.txt"
|
||||||
|
Reference in New Issue
Block a user