1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-09-14 19:32:10 +02:00

Compare commits

..

12 Commits

136 changed files with 885 additions and 804 deletions

View File

@@ -1,10 +1,10 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
using TweetLib.Core.Application; using TweetLib.Core.Application;
namespace TweetDuck.Impl{ namespace TweetDuck.Application{
class LockHandler : IAppLockHandler{ class LockHandler : IAppLockHandler{
private const int WaitRetryDelay = 250; private const int WaitRetryDelay = 250;
private const int RestoreFailTimeout = 2000; private const int RestoreFailTimeout = 2000;

View File

@@ -2,7 +2,7 @@
using System.IO; using System.IO;
using TweetLib.Core.Application; using TweetLib.Core.Application;
namespace TweetDuck.Impl{ namespace TweetDuck.Application{
class SystemHandler : IAppSystemHandler{ class SystemHandler : IAppSystemHandler{
void IAppSystemHandler.OpenFileExplorer(string path){ void IAppSystemHandler.OpenFileExplorer(string path){
if (File.Exists(path)){ if (File.Exists(path)){

View File

@@ -2,7 +2,7 @@
using CefSharp; using CefSharp;
using TweetLib.Core.Browser; using TweetLib.Core.Browser;
namespace TweetDuck.Core.Adapters{ namespace TweetDuck.Browser.Adapters{
sealed class CefScriptExecutor : IScriptExecutor{ sealed class CefScriptExecutor : IScriptExecutor{
private readonly IWebBrowser browser; private readonly IWebBrowser browser;

View File

@@ -3,7 +3,7 @@ using TweetDuck.Configuration;
using TweetLib.Core; using TweetLib.Core;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core.Bridge{ namespace TweetDuck.Browser.Bridge{
static class PropertyBridge{ static class PropertyBridge{
public enum Environment{ public enum Environment{
Browser, Notification Browser, Notification

View File

@@ -1,14 +1,18 @@
using System.Diagnostics.CodeAnalysis; using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Handling;
using TweetDuck.Core.Handling; using TweetDuck.Browser.Notification;
using TweetDuck.Core.Notification; using TweetDuck.Controls;
using TweetDuck.Core.Other; using TweetDuck.Dialogs;
using TweetDuck.Core.Utils; using TweetDuck.Management;
using TweetDuck.Utils;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
using TweetLib.Core.Utils;
namespace TweetDuck.Core.Bridge{ namespace TweetDuck.Browser.Bridge{
[SuppressMessage("ReSharper", "UnusedMember.Global")] [SuppressMessage("ReSharper", "UnusedMember.Global")]
class TweetDeckBridge{ class TweetDeckBridge{
public static void ResetStaticProperties(){ public static void ResetStaticProperties(){
@@ -38,9 +42,7 @@ namespace TweetDuck.Core.Bridge{
} }
public void OnIntroductionClosed(bool showGuide, bool allowDataCollection){ public void OnIntroductionClosed(bool showGuide, bool allowDataCollection){
form.InvokeAsyncSafe(() => { form.InvokeAsyncSafe(() => form.OnIntroductionClosed(showGuide, allowDataCollection));
form.OnIntroductionClosed(showGuide, allowDataCollection);
});
} }
public void LoadNotificationLayout(string fontSize, string headLayout){ public void LoadNotificationLayout(string fontSize, string headLayout){
@@ -110,13 +112,30 @@ namespace TweetDuck.Core.Bridge{
} }
public void FixClipboard(){ public void FixClipboard(){
form.InvokeAsyncSafe(WindowsUtils.ClipboardStripHtmlStyles); form.InvokeAsyncSafe(ClipboardManager.StripHtmlStyles);
} }
public void OpenBrowser(string url){ public void OpenBrowser(string url){
form.InvokeAsyncSafe(() => BrowserUtils.OpenExternalBrowser(url)); form.InvokeAsyncSafe(() => BrowserUtils.OpenExternalBrowser(url));
} }
public void MakeGetRequest(string url, IJavascriptCallback onSuccess, IJavascriptCallback onError){
Task.Run(async () => {
var client = WebUtils.NewClient(BrowserUtils.UserAgentVanilla);
try{
var result = await client.DownloadStringTaskAsync(url);
await onSuccess.ExecuteAsync(result);
}catch(Exception e){
await onError.ExecuteAsync(e.Message);
}finally{
onSuccess.Dispose();
onError.Dispose();
client.Dispose();
}
});
}
public int GetIdleSeconds(){ public int GetIdleSeconds(){
return NativeMethods.GetIdleSeconds(); return NativeMethods.GetIdleSeconds();
} }

View File

@@ -1,10 +1,10 @@
using System; using System;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetLib.Core.Features.Updates; using TweetLib.Core.Features.Updates;
namespace TweetDuck.Core.Bridge{ namespace TweetDuck.Browser.Bridge{
[SuppressMessage("ReSharper", "UnusedMember.Global")] [SuppressMessage("ReSharper", "UnusedMember.Global")]
class UpdateBridge{ class UpdateBridge{
private readonly UpdateHandler updates; private readonly UpdateHandler updates;

View File

@@ -2,7 +2,7 @@
using CefSharp; using CefSharp;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core.Management{ namespace TweetDuck.Browser.Data{
sealed class ContextInfo{ sealed class ContextInfo{
private LinkInfo link; private LinkInfo link;
private ChirpInfo? chirp; private ChirpInfo? chirp;

View File

@@ -1,6 +1,6 @@
using CefSharp; using CefSharp;
namespace TweetDuck.Data{ namespace TweetDuck.Browser.Data{
sealed class ResourceLink{ sealed class ResourceLink{
public string Url { get; } public string Url { get; }
public IResourceHandler Handler { get; } public IResourceHandler Handler { get; }

View File

@@ -1,10 +1,10 @@
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetLib.Core.Serialization.Converters; using TweetLib.Core.Serialization.Converters;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Data{ namespace TweetDuck.Browser.Data{
sealed class WindowState{ sealed class WindowState{
private Rectangle rect; private Rectangle rect;
private bool isMaximized; private bool isMaximized;

View File

@@ -1,21 +1,10 @@
namespace TweetDuck.Core { namespace TweetDuck.Browser {
sealed partial class FormBrowser { sealed partial class FormBrowser {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; 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 #region Windows Form Designer generated code
/// <summary> /// <summary>
@@ -24,7 +13,7 @@
/// </summary> /// </summary>
private void InitializeComponent() { private void InitializeComponent() {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.trayIcon = new TweetDuck.Core.Other.TrayIcon(this.components); this.trayIcon = new TrayIcon(this.components);
this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.timerResize = new System.Windows.Forms.Timer(this.components); this.timerResize = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout(); this.SuspendLayout();
@@ -38,10 +27,10 @@
// //
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.BackColor = TweetDuck.Core.Utils.TwitterUtils.BackgroundColor; this.BackColor = TweetDuck.Utils.TwitterUtils.BackgroundColor;
this.ClientSize = new System.Drawing.Size(1008, 730); this.ClientSize = new System.Drawing.Size(1008, 730);
this.Icon = Properties.Resources.icon; this.Icon = Properties.Resources.icon;
this.Location = TweetDuck.Core.Controls.ControlExtensions.InvisibleLocation; this.Location = TweetDuck.Controls.ControlExtensions.InvisibleLocation;
this.MinimumSize = new System.Drawing.Size(348, 424); this.MinimumSize = new System.Drawing.Size(348, 424);
this.Name = "FormBrowser"; this.Name = "FormBrowser";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
@@ -57,7 +46,7 @@
#endregion #endregion
private TweetDuck.Core.Other.TrayIcon trayIcon; private TrayIcon trayIcon;
private System.Windows.Forms.ToolTip toolTip; private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.Timer timerResize; private System.Windows.Forms.Timer timerResize;
} }

View File

@@ -5,24 +5,24 @@ using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using TweetDuck.Browser.Bridge;
using TweetDuck.Browser.Handling;
using TweetDuck.Browser.Handling.General;
using TweetDuck.Browser.Notification;
using TweetDuck.Browser.Notification.Screenshot;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetDuck.Core.Bridge; using TweetDuck.Controls;
using TweetDuck.Core.Controls; using TweetDuck.Dialogs;
using TweetDuck.Core.Handling; using TweetDuck.Dialogs.Settings;
using TweetDuck.Core.Handling.General; using TweetDuck.Management;
using TweetDuck.Core.Management; using TweetDuck.Management.Analytics;
using TweetDuck.Core.Notification;
using TweetDuck.Core.Notification.Screenshot;
using TweetDuck.Core.Other;
using TweetDuck.Core.Other.Analytics;
using TweetDuck.Core.Other.Settings.Dialogs;
using TweetDuck.Core.Utils;
using TweetDuck.Updates; using TweetDuck.Updates;
using TweetDuck.Utils;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Features.Plugins.Events; using TweetLib.Core.Features.Plugins.Events;
using TweetLib.Core.Features.Updates; using TweetLib.Core.Features.Updates;
namespace TweetDuck.Core{ namespace TweetDuck.Browser{
sealed partial class FormBrowser : Form, AnalyticsFile.IProvider{ sealed partial class FormBrowser : Form, AnalyticsFile.IProvider{
private static UserConfig Config => Program.Config.User; private static UserConfig Config => Program.Config.User;
@@ -90,14 +90,6 @@ namespace TweetDuck.Core{
Disposed += (sender, args) => { Disposed += (sender, args) => {
Config.MuteToggled -= Config_MuteToggled; Config.MuteToggled -= Config_MuteToggled;
Config.TrayBehaviorChanged -= Config_TrayBehaviorChanged; Config.TrayBehaviorChanged -= Config_TrayBehaviorChanged;
browser.Dispose();
updates.Dispose();
contextMenu.Dispose();
notificationScreenshotManager?.Dispose();
videoPlayer?.Dispose();
analytics?.Dispose();
}; };
Config.MuteToggled += Config_MuteToggled; Config.MuteToggled += Config_MuteToggled;
@@ -119,6 +111,23 @@ namespace TweetDuck.Core{
RestoreWindow(); RestoreWindow();
} }
protected override void Dispose(bool disposing){
if (disposing){
components?.Dispose();
browser.Dispose();
updates.Dispose();
notification.Dispose();
contextMenu.Dispose();
notificationScreenshotManager?.Dispose();
videoPlayer?.Dispose();
analytics?.Dispose();
}
base.Dispose(disposing);
}
private void ShowChildForm(Form form){ private void ShowChildForm(Form form){
form.VisibleChanged += (sender, args) => form.MoveToCenter(this); form.VisibleChanged += (sender, args) => form.MoveToCenter(this);
form.Show(this); form.Show(this);
@@ -152,7 +161,9 @@ namespace TweetDuck.Core{
} }
private void FormBrowser_Activated(object sender, EventArgs e){ private void FormBrowser_Activated(object sender, EventArgs e){
if (!isLoaded)return; if (!isLoaded){
return;
}
trayIcon.HasNotifications = false; trayIcon.HasNotifications = false;
@@ -162,14 +173,18 @@ namespace TweetDuck.Core{
} }
private void FormBrowser_LocationChanged(object sender, EventArgs e){ private void FormBrowser_LocationChanged(object sender, EventArgs e){
if (!isLoaded)return; if (!isLoaded){
return;
}
timerResize.Stop(); timerResize.Stop();
timerResize.Start(); timerResize.Start();
} }
private void FormBrowser_Resize(object sender, EventArgs e){ private void FormBrowser_Resize(object sender, EventArgs e){
if (!isLoaded)return; if (!isLoaded){
return;
}
if (WindowState != prevState){ if (WindowState != prevState){
prevState = WindowState; prevState = WindowState;
@@ -190,7 +205,9 @@ namespace TweetDuck.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;
}
timerResize.Stop(); timerResize.Stop();
@@ -201,7 +218,9 @@ namespace TweetDuck.Core{
} }
private void FormBrowser_FormClosing(object sender, FormClosingEventArgs e){ private void FormBrowser_FormClosing(object sender, FormClosingEventArgs e){
if (!isLoaded)return; if (!isLoaded){
return;
}
if (Config.TrayBehavior.ShouldHideOnClose() && trayIcon.Visible && e.CloseReason == CloseReason.UserClosing){ if (Config.TrayBehavior.ShouldHideOnClose() && trayIcon.Visible && e.CloseReason == CloseReason.UserClosing){
Hide(); // hides taskbar too?! welp that works I guess Hide(); // hides taskbar too?! welp that works I guess
@@ -491,14 +510,14 @@ namespace TweetDuck.Core{
public void OpenProfileImport(){ public void OpenProfileImport(){
FormManager.TryFind<FormSettings>()?.Close(); FormManager.TryFind<FormSettings>()?.Close();
using(DialogSettingsManage dialog = new DialogSettingsManage(plugins, true)){ using DialogSettingsManage dialog = new DialogSettingsManage(plugins, true);
if (!dialog.IsDisposed && dialog.ShowDialog() == DialogResult.OK && !dialog.IsRestarting){ // needs disposal check because the dialog may be closed in constructor if (!dialog.IsDisposed && dialog.ShowDialog() == DialogResult.OK && !dialog.IsRestarting){ // needs disposal check because the dialog may be closed in constructor
BrowserProcessHandler.UpdatePrefs(); BrowserProcessHandler.UpdatePrefs();
FormManager.TryFind<FormPlugins>()?.Close(); FormManager.TryFind<FormPlugins>()?.Close();
plugins.Reload(); // also reloads the browser plugins.Reload(); // also reloads the browser
} }
} }
}
public void OnTweetNotification(){ // may be called multiple times, once for each type of notification public void OnTweetNotification(){ // may be called multiple times, once for each type of notification
if (Config.EnableTrayHighlight && !ContainsFocus){ if (Config.EnableTrayHighlight && !ContainsFocus){
@@ -516,10 +535,7 @@ namespace TweetDuck.Core{
if (playerPath == null || !File.Exists(playerPath)){ if (playerPath == null || !File.Exists(playerPath)){
if (videoPlayer == null){ if (videoPlayer == null){
videoPlayer = new VideoPlayer(this); videoPlayer = new VideoPlayer(this);
videoPlayer.ProcessExited += (sender, args) => browser.HideVideoOverlay(true);
videoPlayer.ProcessExited += (sender, args) => {
browser.HideVideoOverlay(true);
};
} }
callShowOverlay.ExecuteAsync(); callShowOverlay.ExecuteAsync();

View File

@@ -1,20 +1,21 @@
using System; using System;
using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Adapters;
using TweetDuck.Core.Utils; using TweetDuck.Browser.Data;
using System.Linq; using TweetDuck.Browser.Notification;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetDuck.Core.Adapters; using TweetDuck.Controls;
using TweetDuck.Core.Management; using TweetDuck.Dialogs;
using TweetDuck.Core.Notification; using TweetDuck.Management;
using TweetDuck.Core.Other; using TweetDuck.Management.Analytics;
using TweetDuck.Core.Other.Analytics; using TweetDuck.Utils;
using TweetLib.Core.Features.Twitter; using TweetLib.Core.Features.Twitter;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
abstract class ContextMenuBase : IContextMenuHandler{ abstract class ContextMenuBase : IContextMenuHandler{
public static ContextInfo CurrentInfo { get; } = new ContextInfo(); public static ContextInfo CurrentInfo { get; } = new ContextInfo();
@@ -27,10 +28,11 @@ namespace TweetDuck.Core.Handling{
private const CefMenuCommand MenuViewImage = (CefMenuCommand)26503; private const CefMenuCommand MenuViewImage = (CefMenuCommand)26503;
private const CefMenuCommand MenuOpenMediaUrl = (CefMenuCommand)26504; private const CefMenuCommand MenuOpenMediaUrl = (CefMenuCommand)26504;
private const CefMenuCommand MenuCopyMediaUrl = (CefMenuCommand)26505; private const CefMenuCommand MenuCopyMediaUrl = (CefMenuCommand)26505;
private const CefMenuCommand MenuSaveMedia = (CefMenuCommand)26506; private const CefMenuCommand MenuCopyImage = (CefMenuCommand)26506;
private const CefMenuCommand MenuSaveTweetImages = (CefMenuCommand)26507; private const CefMenuCommand MenuSaveMedia = (CefMenuCommand)26507;
private const CefMenuCommand MenuSearchInBrowser = (CefMenuCommand)26508; private const CefMenuCommand MenuSaveTweetImages = (CefMenuCommand)26508;
private const CefMenuCommand MenuReadApplyROT13 = (CefMenuCommand)26509; private const CefMenuCommand MenuSearchInBrowser = (CefMenuCommand)26509;
private const CefMenuCommand MenuReadApplyROT13 = (CefMenuCommand)26510;
private const CefMenuCommand MenuOpenDevTools = (CefMenuCommand)26599; private const CefMenuCommand MenuOpenDevTools = (CefMenuCommand)26599;
protected ContextInfo.ContextData Context { get; private set; } protected ContextInfo.ContextData Context { get; private set; }
@@ -84,6 +86,7 @@ namespace TweetDuck.Core.Handling{
model.AddItem(MenuViewImage, "View image in photo viewer"); model.AddItem(MenuViewImage, "View image in photo viewer");
model.AddItem(MenuOpenMediaUrl, TextOpen("image")); model.AddItem(MenuOpenMediaUrl, TextOpen("image"));
model.AddItem(MenuCopyMediaUrl, TextCopy("image")); model.AddItem(MenuCopyMediaUrl, TextCopy("image"));
model.AddItem(MenuCopyImage, "Copy image");
model.AddItem(MenuSaveMedia, TextSave("image")); model.AddItem(MenuSaveMedia, TextSave("image"));
if (Context.Chirp.Images.Length > 1){ if (Context.Chirp.Images.Length > 1){
@@ -123,6 +126,16 @@ namespace TweetDuck.Core.Handling{
SetClipboardText(control, TwitterUrls.GetMediaLink(Context.MediaUrl, ImageQuality)); SetClipboardText(control, TwitterUrls.GetMediaLink(Context.MediaUrl, ImageQuality));
break; break;
case MenuCopyImage: {
string url = Context.MediaUrl;
control.InvokeAsyncSafe(() => {
TwitterUtils.CopyImage(url, ImageQuality);
});
break;
}
case MenuViewImage: { case MenuViewImage: {
string url = Context.MediaUrl; string url = Context.MediaUrl;
@@ -202,7 +215,7 @@ namespace TweetDuck.Core.Handling{
} }
protected static void SetClipboardText(Control control, string text){ protected static void SetClipboardText(Control control, string text){
control.InvokeAsyncSafe(() => WindowsUtils.SetClipboard(text, TextDataFormat.UnicodeText)); control.InvokeAsyncSafe(() => ClipboardManager.SetText(text, TextDataFormat.UnicodeText));
} }
protected static void InsertSelectionSearchItem(IMenuModel model, CefMenuCommand insertCommand, string insertLabel){ protected static void InsertSelectionSearchItem(IMenuModel model, CefMenuCommand insertCommand, string insertLabel){

View File

@@ -1,10 +1,10 @@
using CefSharp; using System.Windows.Forms;
using System.Windows.Forms; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Data;
using TweetDuck.Core.Management; using TweetDuck.Controls;
using TweetLib.Core.Features.Twitter; using TweetLib.Core.Features.Twitter;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
sealed class ContextMenuBrowser : ContextMenuBase{ sealed class ContextMenuBrowser : ContextMenuBase{
private const CefMenuCommand MenuGlobal = (CefMenuCommand)26600; private const CefMenuCommand MenuGlobal = (CefMenuCommand)26600;
private const CefMenuCommand MenuMute = (CefMenuCommand)26601; private const CefMenuCommand MenuMute = (CefMenuCommand)26601;

View File

@@ -1,7 +1,7 @@
using CefSharp; using CefSharp;
using TweetDuck.Core.Other.Analytics; using TweetDuck.Management.Analytics;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
sealed class ContextMenuGuide : ContextMenuBase{ sealed class ContextMenuGuide : ContextMenuBase{
public ContextMenuGuide(AnalyticsFile.IProvider analytics) : base(analytics){} public ContextMenuGuide(AnalyticsFile.IProvider analytics) : base(analytics){}

View File

@@ -1,8 +1,8 @@
using CefSharp; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Notification;
using TweetDuck.Core.Notification; using TweetDuck.Controls;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
sealed class ContextMenuNotification : ContextMenuBase{ sealed class ContextMenuNotification : ContextMenuBase{
private const CefMenuCommand MenuViewDetail = (CefMenuCommand)26600; private const CefMenuCommand MenuViewDetail = (CefMenuCommand)26600;
private const CefMenuCommand MenuSkipTweet = (CefMenuCommand)26601; private const CefMenuCommand MenuSkipTweet = (CefMenuCommand)26601;

View File

@@ -2,7 +2,7 @@
using CefSharp; using CefSharp;
using CefSharp.Enums; using CefSharp.Enums;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
sealed class DragHandlerBrowser : IDragHandler{ sealed class DragHandlerBrowser : IDragHandler{
private readonly RequestHandlerBrowser requestHandler; private readonly RequestHandlerBrowser requestHandler;

View File

@@ -3,7 +3,7 @@ using System.IO;
using System.Text; using System.Text;
using CefSharp; using CefSharp;
namespace TweetDuck.Core.Handling.Filters{ namespace TweetDuck.Browser.Handling.Filters{
abstract class ResponseFilterBase : IResponseFilter{ abstract class ResponseFilterBase : IResponseFilter{
private enum State{ private enum State{
Reading, Writing, Done Reading, Writing, Done

View File

@@ -1,7 +1,7 @@
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace TweetDuck.Core.Handling.Filters{ namespace TweetDuck.Browser.Handling.Filters{
sealed class ResponseFilterVendor : ResponseFilterBase{ sealed class ResponseFilterVendor : ResponseFilterBase{
private static readonly Regex RegexRestoreJQuery = new Regex(@"(\w+)\.fn=\1\.prototype", RegexOptions.Compiled); private static readonly Regex RegexRestoreJQuery = new Regex(@"(\w+)\.fn=\1\.prototype", RegexOptions.Compiled);

View File

@@ -3,7 +3,7 @@ using System.Threading.Tasks;
using CefSharp; using CefSharp;
using TweetDuck.Configuration; using TweetDuck.Configuration;
namespace TweetDuck.Core.Handling.General{ namespace TweetDuck.Browser.Handling.General{
sealed class BrowserProcessHandler : IBrowserProcessHandler{ sealed class BrowserProcessHandler : IBrowserProcessHandler{
public static Task UpdatePrefs(){ public static Task UpdatePrefs(){
return Cef.UIThreadTaskFactory.StartNew(UpdatePrefsInternal); return Cef.UIThreadTaskFactory.StartNew(UpdatePrefsInternal);

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
namespace TweetDuck.Core.Handling.General{ namespace TweetDuck.Browser.Handling.General{
sealed class FileDialogHandler : IDialogHandler{ sealed class FileDialogHandler : IDialogHandler{
public bool OnFileDialog(IWebBrowser browserControl, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback){ public bool OnFileDialog(IWebBrowser browserControl, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback){
if (mode == CefFileDialogMode.Open || mode == CefFileDialogMode.OpenMultiple){ if (mode == CefFileDialogMode.Open || mode == CefFileDialogMode.OpenMultiple){

View File

@@ -1,11 +1,11 @@
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Other; using TweetDuck.Dialogs;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
namespace TweetDuck.Core.Handling.General{ namespace TweetDuck.Browser.Handling.General{
sealed class JavaScriptDialogHandler : IJsDialogHandler{ sealed class JavaScriptDialogHandler : IJsDialogHandler{
private static FormMessage CreateMessageForm(string caption, string text){ private static FormMessage CreateMessageForm(string caption, string text){
MessageBoxIcon icon = MessageBoxIcon.None; MessageBoxIcon icon = MessageBoxIcon.None;

View File

@@ -1,8 +1,8 @@
using CefSharp; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
namespace TweetDuck.Core.Handling.General{ namespace TweetDuck.Browser.Handling.General{
sealed class LifeSpanHandler : ILifeSpanHandler{ sealed class LifeSpanHandler : ILifeSpanHandler{
private static bool IsPopupAllowed(string url){ private static bool IsPopupAllowed(string url){
return url.StartsWith("https://twitter.com/teams/authorize?"); return url.StartsWith("https://twitter.com/teams/authorize?");

View File

@@ -1,10 +1,10 @@
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Other; using TweetDuck.Dialogs;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
class KeyboardHandlerBase : IKeyboardHandler{ class KeyboardHandlerBase : IKeyboardHandler{
protected virtual bool HandleRawKey(IWebBrowser browserControl, IBrowser browser, Keys key, CefEventFlags modifiers){ protected virtual bool HandleRawKey(IWebBrowser browserControl, IBrowser browser, Keys key, CefEventFlags modifiers){
if (modifiers == (CefEventFlags.ControlDown | CefEventFlags.ShiftDown) && key == Keys.I){ if (modifiers == (CefEventFlags.ControlDown | CefEventFlags.ShiftDown) && key == Keys.I){

View File

@@ -1,7 +1,7 @@
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
sealed class KeyboardHandlerBrowser : KeyboardHandlerBase{ sealed class KeyboardHandlerBrowser : KeyboardHandlerBase{
private readonly FormBrowser form; private readonly FormBrowser form;

View File

@@ -1,9 +1,9 @@
using CefSharp; using System.Windows.Forms;
using System.Windows.Forms; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Notification;
using TweetDuck.Core.Notification; using TweetDuck.Controls;
namespace TweetDuck.Core.Handling { namespace TweetDuck.Browser.Handling{
sealed class KeyboardHandlerNotification : KeyboardHandlerBase{ sealed class KeyboardHandlerNotification : KeyboardHandlerBase{
private readonly FormNotificationBase notification; private readonly FormNotificationBase notification;

View File

@@ -5,11 +5,11 @@ using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using CefSharp; using CefSharp;
using CefSharp.Handler; using CefSharp.Handler;
using TweetDuck.Core.Handling.General; using TweetDuck.Browser.Handling.General;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
class RequestHandlerBase : DefaultRequestHandler{ class RequestHandlerBase : DefaultRequestHandler{
private static readonly Regex TweetDeckResourceUrl = new Regex(@"/dist/(.*?)\.(.*?)\.(css|js)$"); private static readonly Regex TweetDeckResourceUrl = new Regex(@"/dist/(.*?)\.(.*?)\.(css|js)$");
private static readonly SortedList<string, string> TweetDeckHashes = new SortedList<string, string>(4); private static readonly SortedList<string, string> TweetDeckHashes = new SortedList<string, string>(4);

View File

@@ -1,10 +1,10 @@
using System.Collections.Specialized; using System.Collections.Specialized;
using CefSharp; using CefSharp;
using TweetDuck.Core.Handling.Filters; using TweetDuck.Browser.Handling.Filters;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
using TweetLib.Core.Features.Twitter; using TweetLib.Core.Features.Twitter;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
sealed class RequestHandlerBrowser : RequestHandlerBase{ sealed class RequestHandlerBrowser : RequestHandlerBase{
private const string UrlVendorResource = "/dist/vendor"; private const string UrlVendorResource = "/dist/vendor";
private const string UrlLoadingSpinner = "/backgrounds/spinner_blue"; private const string UrlLoadingSpinner = "/backgrounds/spinner_blue";

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using CefSharp; using CefSharp;
using TweetDuck.Data; using TweetDuck.Browser.Data;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
sealed class ResourceHandlerFactory : IResourceHandlerFactory{ sealed class ResourceHandlerFactory : IResourceHandlerFactory{
public bool HasHandlers => !handlers.IsEmpty; public bool HasHandlers => !handlers.IsEmpty;

View File

@@ -1,9 +1,9 @@
using CefSharp; using System.Collections.Specialized;
using System.Collections.Specialized;
using System.IO; using System.IO;
using System.Text; using System.Text;
using CefSharp;
namespace TweetDuck.Core.Handling{ namespace TweetDuck.Browser.Handling{
sealed class ResourceHandlerNotification : IResourceHandler{ sealed class ResourceHandlerNotification : IResourceHandler{
private readonly NameValueCollection headers = new NameValueCollection(0); private readonly NameValueCollection headers = new NameValueCollection(0);
private MemoryStream dataIn; private MemoryStream dataIn;

View File

@@ -1,11 +1,11 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
namespace TweetDuck.Core.Notification.Example{ namespace TweetDuck.Browser.Notification.Example{
sealed class FormNotificationExample : FormNotificationMain{ sealed class FormNotificationExample : FormNotificationMain{
public override bool RequiresResize => true; public override bool RequiresResize => true;
protected override bool CanDragWindow => Config.NotificationPosition == DesktopNotification.Position.Custom; protected override bool CanDragWindow => Config.NotificationPosition == DesktopNotification.Position.Custom;

View File

@@ -1,21 +1,10 @@
namespace TweetDuck.Core.Notification { namespace TweetDuck.Browser.Notification {
partial class FormNotificationBase { partial class FormNotificationBase {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; 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 #region Windows Form Designer generated code
/// <summary> /// <summary>
@@ -34,7 +23,7 @@
this.BackColor = System.Drawing.SystemColors.Control; this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(284, 122); this.ClientSize = new System.Drawing.Size(284, 122);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Location = TweetDuck.Core.Controls.ControlExtensions.InvisibleLocation; this.Location = TweetDuck.Controls.ControlExtensions.InvisibleLocation;
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "FormNotification"; this.Name = "FormNotification";

View File

@@ -1,18 +1,18 @@
using CefSharp.WinForms; using System.Drawing;
using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using CefSharp.WinForms;
using TweetDuck.Browser.Data;
using TweetDuck.Browser.Handling;
using TweetDuck.Browser.Handling.General;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Handling; using TweetDuck.Management.Analytics;
using TweetDuck.Core.Handling.General; using TweetDuck.Utils;
using TweetDuck.Core.Other.Analytics;
using TweetDuck.Core.Utils;
using TweetDuck.Data;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
using TweetLib.Core.Features.Twitter; using TweetLib.Core.Features.Twitter;
namespace TweetDuck.Core.Notification{ namespace TweetDuck.Browser.Notification{
abstract partial class FormNotificationBase : Form, AnalyticsFile.IProvider{ abstract partial class FormNotificationBase : Form, AnalyticsFile.IProvider{
public static readonly ResourceLink AppLogo = new ResourceLink("https://ton.twimg.com/tduck/avatar", ResourceHandler.FromByteArray(Properties.Resources.avatar, "image/png")); public static readonly ResourceLink AppLogo = new ResourceLink("https://ton.twimg.com/tduck/avatar", ResourceHandler.FromByteArray(Properties.Resources.avatar, "image/png"));
@@ -144,11 +144,7 @@ namespace TweetDuck.Core.Notification{
this.browser.SetupZoomEvents(); this.browser.SetupZoomEvents();
Controls.Add(browser); Controls.Add(browser);
Disposed += (sender, args) => this.owner.FormClosed -= owner_FormClosed;
Disposed += (sender, args) => {
this.browser.Dispose();
this.owner.FormClosed -= owner_FormClosed;
};
DpiScale = this.GetDPIScale(); DpiScale = this.GetDPIScale();
@@ -156,6 +152,16 @@ namespace TweetDuck.Core.Notification{
UpdateTitle(); UpdateTitle();
} }
protected override void Dispose(bool disposing){
if (disposing){
components?.Dispose();
browser.Dispose();
resourceHandler.Dispose();
}
base.Dispose(disposing);
}
protected override void WndProc(ref Message m){ protected override void WndProc(ref Message m){
if (m.Msg == 0x0112 && (m.WParam.ToInt32() & 0xFFF0) == 0xF010 && !CanDragWindow){ // WM_SYSCOMMAND, SC_MOVE if (m.Msg == 0x0112 && (m.WParam.ToInt32() & 0xFFF0) == 0xF010 && !CanDragWindow){ // WM_SYSCOMMAND, SC_MOVE
return; return;

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Notification { namespace TweetDuck.Browser.Notification {
partial class FormNotificationMain { partial class FormNotificationMain {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
@@ -26,7 +26,7 @@
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.timerDisplayDelay = new System.Windows.Forms.Timer(this.components); this.timerDisplayDelay = new System.Windows.Forms.Timer(this.components);
this.timerProgress = new System.Windows.Forms.Timer(this.components); this.timerProgress = new System.Windows.Forms.Timer(this.components);
this.progressBarTimer = new TweetDuck.Core.Controls.FlatProgressBar(); this.progressBarTimer = new TweetDuck.Controls.FlatProgressBar();
this.SuspendLayout(); this.SuspendLayout();
// //
// timerDisplayDelay // timerDisplayDelay

View File

@@ -1,19 +1,19 @@
using CefSharp; using System;
using System;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Adapters; using CefSharp;
using TweetDuck.Core.Bridge; using TweetDuck.Browser.Adapters;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Bridge;
using TweetDuck.Core.Handling; using TweetDuck.Browser.Handling;
using TweetDuck.Core.Utils; using TweetDuck.Controls;
using TweetDuck.Plugins; using TweetDuck.Plugins;
using TweetDuck.Utils;
using TweetLib.Core.Data; using TweetLib.Core.Data;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Features.Plugins.Enums; using TweetLib.Core.Features.Plugins.Enums;
namespace TweetDuck.Core.Notification{ namespace TweetDuck.Browser.Notification{
abstract partial class FormNotificationMain : FormNotificationBase{ abstract partial class FormNotificationMain : FormNotificationBase{
private readonly PluginManager plugins; private readonly PluginManager plugins;
private readonly int timerBarHeight; private readonly int timerBarHeight;

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Notification { namespace TweetDuck.Browser.Notification {
partial class FormNotificationTweet { partial class FormNotificationTweet {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -2,11 +2,11 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
namespace TweetDuck.Core.Notification{ namespace TweetDuck.Browser.Notification{
sealed partial class FormNotificationTweet : FormNotificationMain{ sealed partial class FormNotificationTweet : FormNotificationMain{
private const int NonIntrusiveIdleLimit = 30; private const int NonIntrusiveIdleLimit = 30;
private const int TrimMinimum = 32; private const int TrimMinimum = 32;

View File

@@ -3,15 +3,15 @@ using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using TweetDuck.Core.Adapters; using TweetDuck.Browser.Adapters;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Other; using TweetDuck.Dialogs;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
using TweetLib.Core.Data; using TweetLib.Core.Data;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
namespace TweetDuck.Core.Notification.Screenshot{ namespace TweetDuck.Browser.Notification.Screenshot{
sealed class FormNotificationScreenshotable : FormNotificationBase{ sealed class FormNotificationScreenshotable : FormNotificationBase{
protected override bool CanDragWindow => false; protected override bool CanDragWindow => false;
@@ -82,7 +82,8 @@ namespace TweetDuck.Core.Notification.Screenshot{
return false; return false;
} }
else{ else{
using(Bitmap bmp = new Bitmap(ClientSize.Width, Math.Max(1, height), PixelFormat.Format32bppRgb)){ using Bitmap bmp = new Bitmap(ClientSize.Width, Math.Max(1, height), PixelFormat.Format32bppRgb);
try{ try{
NativeMethods.RenderSourceIntoBitmap(context, bmp); NativeMethods.RenderSourceIntoBitmap(context, bmp);
}finally{ }finally{
@@ -94,5 +95,4 @@ namespace TweetDuck.Core.Notification.Screenshot{
} }
} }
} }
}
} }

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
namespace TweetDuck.Core.Notification.Screenshot{ namespace TweetDuck.Browser.Notification.Screenshot{
[SuppressMessage("ReSharper", "UnusedMember.Global")] [SuppressMessage("ReSharper", "UnusedMember.Global")]
sealed class ScreenshotBridge{ sealed class ScreenshotBridge{
private readonly Control owner; private readonly Control owner;

View File

@@ -8,7 +8,7 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
#if GEN_SCREENSHOT_FRAMES #if GEN_SCREENSHOT_FRAMES
@@ -17,7 +17,7 @@ using System.IO;
using TweetDuck.Core.Utils; using TweetDuck.Core.Utils;
#endif #endif
namespace TweetDuck.Core.Notification.Screenshot{ namespace TweetDuck.Browser.Notification.Screenshot{
sealed class TweetScreenshotManager : IDisposable{ sealed class TweetScreenshotManager : IDisposable{
private readonly FormBrowser owner; private readonly FormBrowser owner;
private readonly PluginManager plugins; private readonly PluginManager plugins;

View File

@@ -2,11 +2,12 @@
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Other; using TweetDuck.Dialogs;
using TweetDuck.Core.Other.Settings; using TweetDuck.Dialogs.Settings;
using TweetDuck.Management;
namespace TweetDuck.Core.Notification{ namespace TweetDuck.Browser.Notification{
static class SoundNotification{ static class SoundNotification{
public const string SupportedFormats = "*.wav;*.ogg;*.mp3;*.flac;*.opus;*.weba;*.webm"; public const string SupportedFormats = "*.wav;*.ogg;*.mp3;*.flac;*.opus;*.weba;*.webm";
@@ -28,7 +29,7 @@ namespace TweetDuck.Core.Notification{
FormBrowser browser = FormManager.TryFind<FormBrowser>(); FormBrowser browser = FormManager.TryFind<FormBrowser>();
browser?.InvokeAsyncSafe(() => { browser?.InvokeAsyncSafe(() => {
using(FormMessage form = new FormMessage("Sound Notification Error", "Could not find custom notification sound file:\n" + path, MessageBoxIcon.Error)){ using FormMessage form = new FormMessage("Sound Notification Error", "Could not find custom notification sound file:\n" + path, MessageBoxIcon.Error);
form.AddButton(FormMessage.Ignore, ControlType.Cancel | ControlType.Focused); form.AddButton(FormMessage.Ignore, ControlType.Cancel | ControlType.Focused);
Button btnViewOptions = form.AddButton("View Options"); Button btnViewOptions = form.AddButton("View Options");
@@ -38,7 +39,6 @@ namespace TweetDuck.Core.Notification{
if (form.ShowDialog() == DialogResult.OK && form.ClickedButton == btnViewOptions){ if (form.ShowDialog() == DialogResult.OK && form.ClickedButton == btnViewOptions){
browser.OpenSettings(typeof(TabSettingsSounds)); browser.OpenSettings(typeof(TabSettingsSounds));
} }
}
}); });
return null; return null;

View File

@@ -1,21 +1,10 @@
namespace TweetDuck.Core.Other { namespace TweetDuck.Browser {
partial class TrayIcon { partial class TrayIcon {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; 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 Component Designer generated code #region Component Designer generated code
/// <summary> /// <summary>

View File

@@ -4,7 +4,7 @@ using System.Windows.Forms;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using Res = TweetDuck.Properties.Resources; using Res = TweetDuck.Properties.Resources;
namespace TweetDuck.Core.Other{ namespace TweetDuck.Browser{
sealed partial class TrayIcon : Component{ sealed partial class TrayIcon : Component{
public enum Behavior{ // keep order public enum Behavior{ // keep order
Disabled, DisplayOnly, MinimizeToTray, CloseToTray, Combined Disabled, DisplayOnly, MinimizeToTray, CloseToTray, Combined
@@ -63,6 +63,15 @@ namespace TweetDuck.Core.Other{
container.Add(this); container.Add(this);
} }
protected override void Dispose(bool disposing){
if (disposing){
components?.Dispose();
contextMenu.Dispose();
}
base.Dispose(disposing);
}
private void UpdateIcon(){ private void UpdateIcon(){
if (Visible){ if (Visible){
notifyIcon.Icon = hasNotifications ? Res.icon_tray_new : Config.MuteNotifications ? Res.icon_tray_muted : Res.icon_tray; notifyIcon.Icon = hasNotifications ? Res.icon_tray_new : Config.MuteNotifications ? Res.icon_tray_muted : Res.icon_tray;

View File

@@ -4,21 +4,21 @@ using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using CefSharp.WinForms; using CefSharp.WinForms;
using TweetDuck.Browser.Adapters;
using TweetDuck.Browser.Bridge;
using TweetDuck.Browser.Handling;
using TweetDuck.Browser.Handling.General;
using TweetDuck.Browser.Notification;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetDuck.Core.Adapters; using TweetDuck.Controls;
using TweetDuck.Core.Bridge;
using TweetDuck.Core.Controls;
using TweetDuck.Core.Handling;
using TweetDuck.Core.Handling.General;
using TweetDuck.Core.Notification;
using TweetDuck.Core.Utils;
using TweetDuck.Plugins; using TweetDuck.Plugins;
using TweetDuck.Utils;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Features.Plugins.Enums; using TweetLib.Core.Features.Plugins.Enums;
using TweetLib.Core.Features.Twitter; using TweetLib.Core.Features.Twitter;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core{ namespace TweetDuck.Browser{
sealed class TweetDeckBrowser : IDisposable{ sealed class TweetDeckBrowser : IDisposable{
private static UserConfig Config => Program.Config.User; private static UserConfig Config => Program.Config.User;

View File

@@ -1,6 +1,6 @@
using System; using System;
using System.Drawing; using System.Drawing;
using TweetDuck.Data; using TweetDuck.Browser.Data;
using TweetLib.Core.Features.Configuration; using TweetLib.Core.Features.Configuration;
using TweetLib.Core.Features.Plugins.Config; using TweetLib.Core.Features.Plugins.Config;
using TweetLib.Core.Serialization.Converters; using TweetLib.Core.Serialization.Converters;

View File

@@ -1,8 +1,8 @@
using System; using System;
using System.Drawing; using System.Drawing;
using TweetDuck.Core.Controls; using TweetDuck.Browser;
using TweetDuck.Core.Other; using TweetDuck.Browser.Data;
using TweetDuck.Data; using TweetDuck.Controls;
using TweetLib.Core.Features.Configuration; using TweetLib.Core.Features.Configuration;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
using TweetLib.Core.Features.Twitter; using TweetLib.Core.Features.Twitter;

View File

@@ -3,7 +3,7 @@ using System.Drawing;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
namespace TweetDuck.Core.Controls{ namespace TweetDuck.Controls{
static class ControlExtensions{ static class ControlExtensions{
public static readonly Point InvisibleLocation = new Point(-32000, -32000); public static readonly Point InvisibleLocation = new Point(-32000, -32000);

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
namespace TweetDuck.Core.Controls{ namespace TweetDuck.Controls{
sealed class FlatButton : Button{ sealed class FlatButton : Button{
protected override bool ShowFocusCues => false; protected override bool ShowFocusCues => false;

View File

@@ -2,7 +2,7 @@
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
namespace TweetDuck.Core.Controls{ namespace TweetDuck.Controls{
sealed class FlatProgressBar : ProgressBar{ sealed class FlatProgressBar : ProgressBar{
private readonly SolidBrush brush; private readonly SolidBrush brush;

View File

@@ -1,7 +1,7 @@
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
namespace TweetDuck.Core.Controls{ namespace TweetDuck.Controls{
sealed class FlowLayoutPanelNoHScroll : FlowLayoutPanel{ sealed class FlowLayoutPanelNoHScroll : FlowLayoutPanel{
protected override void WndProc(ref Message m){ protected override void WndProc(ref Message m){
if (m.Msg == 0x85){ // WM_NCPAINT if (m.Msg == 0x85){ // WM_NCPAINT

View File

@@ -2,7 +2,7 @@
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
namespace TweetDuck.Core.Controls{ namespace TweetDuck.Controls{
sealed class LabelVertical : Label{ sealed class LabelVertical : Label{
public int LineHeight { get; set; } public int LineHeight { get; set; }

View File

@@ -1,7 +1,7 @@
using System.ComponentModel; using System.ComponentModel;
using System.Windows.Forms; using System.Windows.Forms;
namespace TweetDuck.Core.Controls{ namespace TweetDuck.Controls{
sealed class NumericUpDownEx : NumericUpDown{ sealed class NumericUpDownEx : NumericUpDown{
public string TextSuffix { get; set ; } public string TextSuffix { get; set ; }

View File

@@ -1,36 +0,0 @@
using System.Collections.Generic;
using System.Windows.Forms;
using TweetDuck.Configuration;
namespace TweetDuck.Core.Other.Settings{
class BaseTabSettings : UserControl{
protected static UserConfig Config => Program.Config.User;
protected static SystemConfig SysConfig => Program.Config.System;
public IEnumerable<Control> InteractiveControls{
get{
static IEnumerable<Control> FindInteractiveControls(Control parent){
foreach(Control control in parent.Controls){
if (control is Panel subPanel){
foreach(Control subControl in FindInteractiveControls(subPanel)){
yield return subControl;
}
}
else{
yield return control;
}
}
}
return FindInteractiveControls(this);
}
}
protected BaseTabSettings(){
Padding = new Padding(6);
}
public virtual void OnReady(){}
public virtual void OnClosing(){}
}
}

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other { namespace TweetDuck.Dialogs {
sealed partial class FormAbout { sealed partial class FormAbout {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -2,9 +2,10 @@
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Utils; using TweetDuck.Management;
using TweetDuck.Utils;
namespace TweetDuck.Core.Other{ namespace TweetDuck.Dialogs{
sealed partial class FormAbout : Form, FormManager.IAppDialog{ sealed partial class FormAbout : Form, FormManager.IAppDialog{
private const string TipsLink = "https://github.com/chylex/TweetDuck/wiki"; private const string TipsLink = "https://github.com/chylex/TweetDuck/wiki";
private const string IssuesLink = "https://github.com/chylex/TweetDuck/issues"; private const string IssuesLink = "https://github.com/chylex/TweetDuck/issues";

View File

@@ -1,21 +1,10 @@
namespace TweetDuck.Core.Other { namespace TweetDuck.Dialogs {
partial class FormGuide { partial class FormGuide {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; 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 #region Windows Form Designer generated code
/// <summary> /// <summary>

View File

@@ -1,16 +1,18 @@
using System.Drawing; using System.Drawing;
using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using CefSharp; using CefSharp;
using CefSharp.WinForms; using CefSharp.WinForms;
using TweetDuck.Core.Controls; using TweetDuck.Browser;
using TweetDuck.Core.Handling; using TweetDuck.Browser.Adapters;
using TweetDuck.Core.Handling.General; using TweetDuck.Browser.Data;
using TweetDuck.Core.Utils; using TweetDuck.Browser.Handling;
using System.Text.RegularExpressions; using TweetDuck.Browser.Handling.General;
using TweetDuck.Core.Adapters; using TweetDuck.Controls;
using TweetDuck.Data; using TweetDuck.Management;
using TweetDuck.Utils;
namespace TweetDuck.Core.Other{ namespace TweetDuck.Dialogs{
sealed partial class FormGuide : Form, FormManager.IAppDialog{ sealed partial class FormGuide : Form, FormManager.IAppDialog{
private const string GuideUrl = "https://tweetduck.chylex.com/guide/v2/"; private const string GuideUrl = "https://tweetduck.chylex.com/guide/v2/";
private const string GuidePathRegex = @"^guide(?:/v\d+)?(?:/(#.*))?"; private const string GuidePathRegex = @"^guide(?:/v\d+)?(?:/(#.*))?";
@@ -85,10 +87,15 @@ namespace TweetDuck.Core.Other{
browser.SetupZoomEvents(); browser.SetupZoomEvents();
Controls.Add(browser); Controls.Add(browser);
}
Disposed += (sender, args) => { protected override void Dispose(bool disposing){
if (disposing){
components?.Dispose();
browser.Dispose(); browser.Dispose();
}; }
base.Dispose(disposing);
} }
private void Reload(string url){ private void Reload(string url){

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other { namespace TweetDuck.Dialogs {
partial class FormMessage { partial class FormMessage {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -1,10 +1,10 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
namespace TweetDuck.Core.Other{ namespace TweetDuck.Dialogs{
[Flags] [Flags]
enum ControlType{ enum ControlType{
None = 0, None = 0,
@@ -43,7 +43,8 @@ namespace TweetDuck.Core.Other{
} }
public static bool Show(string caption, string text, MessageBoxIcon icon, string buttonAccept, string buttonCancel){ public static bool Show(string caption, string text, MessageBoxIcon icon, string buttonAccept, string buttonCancel){
using(FormMessage message = new FormMessage(caption, text, icon)){ using FormMessage message = new FormMessage(caption, text, icon);
if (buttonCancel == null){ if (buttonCancel == null){
message.AddButton(buttonAccept, DialogResult.OK, ControlType.Cancel | ControlType.Focused); message.AddButton(buttonAccept, DialogResult.OK, ControlType.Cancel | ControlType.Focused);
} }
@@ -54,7 +55,6 @@ namespace TweetDuck.Core.Other{
return message.ShowDialog() == DialogResult.OK; return message.ShowDialog() == DialogResult.OK;
} }
}
// Instance // Instance

View File

@@ -1,6 +1,6 @@
using TweetDuck.Core.Controls; using TweetDuck.Controls;
namespace TweetDuck.Core.Other { namespace TweetDuck.Dialogs {
partial class FormPlugins { partial class FormPlugins {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -3,11 +3,12 @@ using System.Drawing;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetDuck.Management;
using TweetDuck.Plugins; using TweetDuck.Plugins;
using TweetLib.Core; using TweetLib.Core;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
namespace TweetDuck.Core.Other{ namespace TweetDuck.Dialogs{
sealed partial class FormPlugins : Form, FormManager.IAppDialog{ sealed partial class FormPlugins : Form, FormManager.IAppDialog{
private static UserConfig Config => Program.Config.User; private static UserConfig Config => Program.Config.User;

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other { namespace TweetDuck.Dialogs {
sealed partial class FormSettings { sealed partial class FormSettings {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -2,17 +2,19 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Browser;
using TweetDuck.Core.Handling.General; using TweetDuck.Browser.Handling.General;
using TweetDuck.Core.Notification.Example; using TweetDuck.Browser.Notification.Example;
using TweetDuck.Core.Other.Analytics; using TweetDuck.Configuration;
using TweetDuck.Core.Other.Settings; using TweetDuck.Controls;
using TweetDuck.Core.Other.Settings.Dialogs; using TweetDuck.Dialogs.Settings;
using TweetDuck.Core.Utils; using TweetDuck.Management;
using TweetDuck.Management.Analytics;
using TweetDuck.Utils;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Features.Updates; using TweetLib.Core.Features.Updates;
namespace TweetDuck.Core.Other{ namespace TweetDuck.Dialogs{
sealed partial class FormSettings : Form, FormManager.IAppDialog{ sealed partial class FormSettings : Form, FormManager.IAppDialog{
public bool ShouldReloadBrowser { get; private set; } public bool ShouldReloadBrowser { get; private set; }
@@ -80,7 +82,7 @@ namespace TweetDuck.Core.Other{
private void btnManageOptions_Click(object sender, EventArgs e){ private void btnManageOptions_Click(object sender, EventArgs e){
PrepareUnload(); PrepareUnload();
using(DialogSettingsManage dialog = new DialogSettingsManage(plugins)){ using DialogSettingsManage dialog = new DialogSettingsManage(plugins);
FormClosing -= FormSettings_FormClosing; FormClosing -= FormSettings_FormClosing;
if (dialog.ShowDialog() == DialogResult.OK){ if (dialog.ShowDialog() == DialogResult.OK){
@@ -100,13 +102,12 @@ namespace TweetDuck.Core.Other{
PrepareLoad(); PrepareLoad();
} }
} }
}
private void btnClose_Click(object sender, EventArgs e){ private void btnClose_Click(object sender, EventArgs e){
Close(); Close();
} }
private void AddButton<T>(string title, Func<T> constructor) where T : BaseTabSettings{ private void AddButton<T>(string title, Func<T> constructor) where T : BaseTab{
FlatButton btn = new FlatButton{ FlatButton btn = new FlatButton{
BackColor = SystemColors.Control, BackColor = SystemColors.Control,
FlatStyle = FlatStyle.Flat, FlatStyle = FlatStyle.Flat,
@@ -136,7 +137,7 @@ namespace TweetDuck.Core.Other{
btn.Click += (sender, args) => SelectTab<T>(); btn.Click += (sender, args) => SelectTab<T>();
} }
private void SelectTab<T>() where T : BaseTabSettings{ private void SelectTab<T>() where T : BaseTab{
SelectTab(tabs[typeof(T)]); SelectTab(tabs[typeof(T)]);
} }
@@ -196,16 +197,47 @@ namespace TweetDuck.Core.Other{
private sealed class SettingsTab{ private sealed class SettingsTab{
public Button Button { get; } public Button Button { get; }
public BaseTabSettings Control => control ??= constructor(); public BaseTab Control => control ??= constructor();
public bool IsInitialized => control != null; public bool IsInitialized => control != null;
private readonly Func<BaseTabSettings> constructor; private readonly Func<BaseTab> constructor;
private BaseTabSettings control; private BaseTab control;
public SettingsTab(Button button, Func<BaseTabSettings> constructor){ public SettingsTab(Button button, Func<BaseTab> constructor){
this.Button = button; this.Button = button;
this.constructor = constructor; this.constructor = constructor;
} }
} }
internal abstract class BaseTab : UserControl{
protected static UserConfig Config => Program.Config.User;
protected static SystemConfig SysConfig => Program.Config.System;
public IEnumerable<Control> InteractiveControls{
get{
static IEnumerable<Control> FindInteractiveControls(Control parent){
foreach(Control control in parent.Controls){
if (control is Panel subPanel){
foreach(Control subControl in FindInteractiveControls(subPanel)){
yield return subControl;
}
}
else{
yield return control;
}
}
}
return FindInteractiveControls(this);
}
}
protected BaseTab(){
Padding = new Padding(6);
}
public virtual void OnReady(){}
public virtual void OnClosing(){}
}
} }
} }

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings.Dialogs { namespace TweetDuck.Dialogs.Settings {
partial class DialogSettingsAnalytics { partial class DialogSettingsAnalytics {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Other.Analytics; using TweetDuck.Management.Analytics;
namespace TweetDuck.Core.Other.Settings.Dialogs{ namespace TweetDuck.Dialogs.Settings{
sealed partial class DialogSettingsAnalytics : Form{ sealed partial class DialogSettingsAnalytics : Form{
public DialogSettingsAnalytics(AnalyticsReport report){ public DialogSettingsAnalytics(AnalyticsReport report){
InitializeComponent(); InitializeComponent();

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings.Dialogs { namespace TweetDuck.Dialogs.Settings {
partial class DialogSettingsCSS { partial class DialogSettingsCSS {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -2,10 +2,10 @@
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
namespace TweetDuck.Core.Other.Settings.Dialogs{ namespace TweetDuck.Dialogs.Settings{
sealed partial class DialogSettingsCSS : Form{ sealed partial class DialogSettingsCSS : Form{
public string BrowserCSS => textBoxBrowserCSS.Text; public string BrowserCSS => textBoxBrowserCSS.Text;
public string NotificationCSS => textBoxNotificationCSS.Text; public string NotificationCSS => textBoxNotificationCSS.Text;

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings.Dialogs { namespace TweetDuck.Dialogs.Settings {
partial class DialogSettingsCefArgs { partial class DialogSettingsCefArgs {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -1,10 +1,10 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
using TweetLib.Core.Collections; using TweetLib.Core.Collections;
namespace TweetDuck.Core.Other.Settings.Dialogs{ namespace TweetDuck.Dialogs.Settings{
sealed partial class DialogSettingsCefArgs : Form{ sealed partial class DialogSettingsCefArgs : Form{
public string CefArgs => textBoxArgs.Text; public string CefArgs => textBoxArgs.Text;

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings.Dialogs { namespace TweetDuck.Dialogs.Settings {
partial class DialogSettingsExternalProgram { partial class DialogSettingsExternalProgram {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -3,7 +3,7 @@ using System.Windows.Forms;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
using IOPath = System.IO.Path; using IOPath = System.IO.Path;
namespace TweetDuck.Core.Other.Settings.Dialogs{ namespace TweetDuck.Dialogs.Settings{
sealed partial class DialogSettingsExternalProgram : Form{ sealed partial class DialogSettingsExternalProgram : Form{
public string Path{ public string Path{
get => StringUtils.NullIfEmpty(textBoxPath.Text); get => StringUtils.NullIfEmpty(textBoxPath.Text);

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings.Dialogs { namespace TweetDuck.Dialogs.Settings {
partial class DialogSettingsManage { partial class DialogSettingsManage {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetDuck.Core.Management; using TweetDuck.Management;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core.Other.Settings.Dialogs{ namespace TweetDuck.Dialogs.Settings{
sealed partial class DialogSettingsManage : Form{ sealed partial class DialogSettingsManage : Form{
private enum State{ private enum State{
Deciding, Reset, Import, Export Deciding, Reset, Import, Export

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings.Dialogs { namespace TweetDuck.Dialogs.Settings {
partial class DialogSettingsRestart { partial class DialogSettingsRestart {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -3,7 +3,7 @@ using System.Windows.Forms;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetLib.Core.Collections; using TweetLib.Core.Collections;
namespace TweetDuck.Core.Other.Settings.Dialogs{ namespace TweetDuck.Dialogs.Settings{
sealed partial class DialogSettingsRestart : Form{ sealed partial class DialogSettingsRestart : Form{
public CommandLineArgs Args { get; private set; } public CommandLineArgs Args { get; private set; }
@@ -38,7 +38,7 @@ namespace TweetDuck.Core.Other.Settings.Dialogs{
Args.SetValue(Arguments.ArgDataFolder, tbDataFolder.Text); Args.SetValue(Arguments.ArgDataFolder, tbDataFolder.Text);
} }
tbShortcutTarget.Text = $@"""{Application.ExecutablePath}""{(Args.Count > 0 ? " " : "")}{Args}"; tbShortcutTarget.Text = $@"""{Program.ExecutablePath}""{(Args.Count > 0 ? " " : "")}{Args}";
tbShortcutTarget.Select(tbShortcutTarget.Text.Length, 0); tbShortcutTarget.Select(tbShortcutTarget.Text.Length, 0);
} }

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings.Dialogs { namespace TweetDuck.Dialogs.Settings {
partial class DialogSettingsSearchEngine { partial class DialogSettingsSearchEngine {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
namespace TweetDuck.Core.Other.Settings.Dialogs{ namespace TweetDuck.Dialogs.Settings{
sealed partial class DialogSettingsSearchEngine : Form{ sealed partial class DialogSettingsSearchEngine : Form{
public string Url => textBoxUrl.Text; public string Url => textBoxUrl.Text;

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings { namespace TweetDuck.Dialogs.Settings {
partial class TabSettingsAdvanced { partial class TabSettingsAdvanced {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
@@ -32,7 +32,7 @@
this.btnRestart = new System.Windows.Forms.Button(); this.btnRestart = new System.Windows.Forms.Button();
this.btnOpenAppFolder = new System.Windows.Forms.Button(); this.btnOpenAppFolder = new System.Windows.Forms.Button();
this.btnOpenDataFolder = new System.Windows.Forms.Button(); this.btnOpenDataFolder = new System.Windows.Forms.Button();
this.numClearCacheThreshold = new TweetDuck.Core.Controls.NumericUpDownEx(); this.numClearCacheThreshold = new TweetDuck.Controls.NumericUpDownEx();
this.checkClearCacheAuto = new System.Windows.Forms.CheckBox(); this.checkClearCacheAuto = new System.Windows.Forms.CheckBox();
this.labelApp = new System.Windows.Forms.Label(); this.labelApp = new System.Windows.Forms.Label();
this.panelAppButtons = new System.Windows.Forms.Panel(); this.panelAppButtons = new System.Windows.Forms.Panel();

View File

@@ -2,14 +2,13 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Management; using TweetDuck.Management;
using TweetDuck.Core.Other.Settings.Dialogs; using TweetDuck.Utils;
using TweetDuck.Core.Utils;
using TweetLib.Core; using TweetLib.Core;
namespace TweetDuck.Core.Other.Settings{ namespace TweetDuck.Dialogs.Settings{
sealed partial class TabSettingsAdvanced : BaseTabSettings{ sealed partial class TabSettingsAdvanced : FormSettings.BaseTab{
private readonly Action<string> reinjectBrowserCSS; private readonly Action<string> reinjectBrowserCSS;
private readonly Action openDevTools; private readonly Action openDevTools;
@@ -91,12 +90,12 @@ namespace TweetDuck.Core.Other.Settings{
} }
private void btnRestartArgs_Click(object sender, EventArgs e){ private void btnRestartArgs_Click(object sender, EventArgs e){
using(DialogSettingsRestart dialog = new DialogSettingsRestart(Arguments.GetCurrentClean())){ using DialogSettingsRestart dialog = new DialogSettingsRestart(Arguments.GetCurrentClean());
if (dialog.ShowDialog() == DialogResult.OK){ if (dialog.ShowDialog() == DialogResult.OK){
Program.RestartWithArgs(dialog.Args); Program.RestartWithArgs(dialog.Args);
} }
} }
}
#endregion #endregion
#region Browser Cache #region Browser Cache

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings { namespace TweetDuck.Dialogs.Settings {
partial class TabSettingsFeedback { partial class TabSettingsFeedback {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -1,12 +1,11 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Other.Analytics; using TweetDuck.Management.Analytics;
using TweetDuck.Core.Other.Settings.Dialogs; using TweetDuck.Utils;
using TweetDuck.Core.Utils;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
namespace TweetDuck.Core.Other.Settings{ namespace TweetDuck.Dialogs.Settings{
sealed partial class TabSettingsFeedback : BaseTabSettings{ sealed partial class TabSettingsFeedback : FormSettings.BaseTab{
private readonly AnalyticsFile analyticsFile; private readonly AnalyticsFile analyticsFile;
private readonly AnalyticsReportGenerator.ExternalInfo analyticsInfo; private readonly AnalyticsReportGenerator.ExternalInfo analyticsInfo;
private readonly PluginManager plugins; private readonly PluginManager plugins;
@@ -50,10 +49,9 @@ namespace TweetDuck.Core.Other.Settings{
} }
private void btnViewReport_Click(object sender, EventArgs e){ private void btnViewReport_Click(object sender, EventArgs e){
using(DialogSettingsAnalytics dialog = new DialogSettingsAnalytics(AnalyticsReportGenerator.Create(analyticsFile, analyticsInfo, plugins))){ using DialogSettingsAnalytics dialog = new DialogSettingsAnalytics(AnalyticsReportGenerator.Create(analyticsFile, analyticsInfo, plugins));
dialog.ShowDialog(); dialog.ShowDialog();
} }
}
#endregion #endregion
} }

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings { namespace TweetDuck.Dialogs.Settings {
partial class TabSettingsGeneral { partial class TabSettingsGeneral {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -2,15 +2,14 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Handling.General;
using TweetDuck.Core.Handling.General; using TweetDuck.Controls;
using TweetDuck.Core.Other.Settings.Dialogs; using TweetDuck.Utils;
using TweetDuck.Core.Utils;
using TweetLib.Core.Features.Updates; using TweetLib.Core.Features.Updates;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core.Other.Settings{ namespace TweetDuck.Dialogs.Settings{
sealed partial class TabSettingsGeneral : BaseTabSettings{ sealed partial class TabSettingsGeneral : FormSettings.BaseTab{
private readonly Action reloadColumns; private readonly Action reloadColumns;
private readonly UpdateHandler updates; private readonly UpdateHandler updates;

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings { namespace TweetDuck.Dialogs.Settings {
partial class TabSettingsNotifications { partial class TabSettingsNotifications {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
@@ -35,9 +35,9 @@
this.radioLocTL = new System.Windows.Forms.RadioButton(); this.radioLocTL = new System.Windows.Forms.RadioButton();
this.trackBarEdgeDistance = new System.Windows.Forms.TrackBar(); this.trackBarEdgeDistance = new System.Windows.Forms.TrackBar();
this.tableLayoutDurationButtons = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutDurationButtons = new System.Windows.Forms.TableLayoutPanel();
this.btnDurationMedium = new TweetDuck.Core.Controls.FlatButton(); this.btnDurationMedium = new TweetDuck.Controls.FlatButton();
this.btnDurationLong = new TweetDuck.Core.Controls.FlatButton(); this.btnDurationLong = new TweetDuck.Controls.FlatButton();
this.btnDurationShort = new TweetDuck.Core.Controls.FlatButton(); this.btnDurationShort = new TweetDuck.Controls.FlatButton();
this.labelDurationValue = new System.Windows.Forms.Label(); this.labelDurationValue = new System.Windows.Forms.Label();
this.trackBarDuration = new System.Windows.Forms.TrackBar(); this.trackBarDuration = new System.Windows.Forms.TrackBar();
this.checkSkipOnLinkClick = new System.Windows.Forms.CheckBox(); this.checkSkipOnLinkClick = new System.Windows.Forms.CheckBox();
@@ -652,9 +652,9 @@
private System.Windows.Forms.Label labelDurationValue; private System.Windows.Forms.Label labelDurationValue;
private System.Windows.Forms.TrackBar trackBarDuration; private System.Windows.Forms.TrackBar trackBarDuration;
private System.Windows.Forms.TableLayoutPanel tableLayoutDurationButtons; private System.Windows.Forms.TableLayoutPanel tableLayoutDurationButtons;
private TweetDuck.Core.Controls.FlatButton btnDurationMedium; private TweetDuck.Controls.FlatButton btnDurationMedium;
private TweetDuck.Core.Controls.FlatButton btnDurationLong; private TweetDuck.Controls.FlatButton btnDurationLong;
private TweetDuck.Core.Controls.FlatButton btnDurationShort; private TweetDuck.Controls.FlatButton btnDurationShort;
private System.Windows.Forms.CheckBox checkNonIntrusive; private System.Windows.Forms.CheckBox checkNonIntrusive;
private System.Windows.Forms.Label labelIdlePause; private System.Windows.Forms.Label labelIdlePause;
private System.Windows.Forms.ComboBox comboBoxIdlePause; private System.Windows.Forms.ComboBox comboBoxIdlePause;

View File

@@ -1,11 +1,11 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Notification.Example;
using TweetDuck.Core.Notification.Example; using TweetDuck.Controls;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
namespace TweetDuck.Core.Other.Settings{ namespace TweetDuck.Dialogs.Settings{
sealed partial class TabSettingsNotifications : BaseTabSettings{ sealed partial class TabSettingsNotifications : FormSettings.BaseTab{
private static readonly int[] IdlePauseSeconds = { 0, 30, 60, 120, 300 }; private static readonly int[] IdlePauseSeconds = { 0, 30, 60, 120, 300 };
private readonly FormNotificationExample notification; private readonly FormNotificationExample notification;
@@ -219,10 +219,18 @@ namespace TweetDuck.Core.Other.Settings{
#region Location #region Location
private void radioLoc_CheckedChanged(object sender, EventArgs e){ private void radioLoc_CheckedChanged(object sender, EventArgs e){
if (radioLocTL.Checked)Config.NotificationPosition = DesktopNotification.Position.TopLeft; if (radioLocTL.Checked){
else if (radioLocTR.Checked)Config.NotificationPosition = DesktopNotification.Position.TopRight; Config.NotificationPosition = DesktopNotification.Position.TopLeft;
else if (radioLocBL.Checked)Config.NotificationPosition = DesktopNotification.Position.BottomLeft; }
else if (radioLocBR.Checked)Config.NotificationPosition = DesktopNotification.Position.BottomRight; else if (radioLocTR.Checked){
Config.NotificationPosition = DesktopNotification.Position.TopRight;
}
else if (radioLocBL.Checked){
Config.NotificationPosition = DesktopNotification.Position.BottomLeft;
}
else if (radioLocBR.Checked){
Config.NotificationPosition = DesktopNotification.Position.BottomRight;
}
comboBoxDisplay.Enabled = trackBarEdgeDistance.Enabled = true; comboBoxDisplay.Enabled = trackBarEdgeDistance.Enabled = true;
notification.ShowExampleNotification(false); notification.ShowExampleNotification(false);

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings { namespace TweetDuck.Dialogs.Settings {
partial class TabSettingsSounds { partial class TabSettingsSounds {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -2,12 +2,12 @@
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Browser.Notification;
using TweetDuck.Core.Notification; using TweetDuck.Controls;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
namespace TweetDuck.Core.Other.Settings{ namespace TweetDuck.Dialogs.Settings{
sealed partial class TabSettingsSounds : BaseTabSettings{ sealed partial class TabSettingsSounds : FormSettings.BaseTab{
private readonly Action playSoundNotification; private readonly Action playSoundNotification;
public TabSettingsSounds(Action playSoundNotification){ public TabSettingsSounds(Action playSoundNotification){
@@ -64,17 +64,17 @@ namespace TweetDuck.Core.Other.Settings{
} }
private void btnBrowseSound_Click(object sender, EventArgs e){ private void btnBrowseSound_Click(object sender, EventArgs e){
using(OpenFileDialog dialog = new OpenFileDialog{ using OpenFileDialog dialog = new OpenFileDialog{
AutoUpgradeEnabled = true, AutoUpgradeEnabled = true,
DereferenceLinks = true, DereferenceLinks = true,
Title = "Custom Notification Sound", Title = "Custom Notification Sound",
Filter = $"Sound file ({SoundNotification.SupportedFormats})|{SoundNotification.SupportedFormats}|All files (*.*)|*.*" Filter = $"Sound file ({SoundNotification.SupportedFormats})|{SoundNotification.SupportedFormats}|All files (*.*)|*.*"
}){ };
if (dialog.ShowDialog() == DialogResult.OK){ if (dialog.ShowDialog() == DialogResult.OK){
tbCustomSound.Text = dialog.FileName; tbCustomSound.Text = dialog.FileName;
} }
} }
}
private void btnResetSound_Click(object sender, EventArgs e){ private void btnResetSound_Click(object sender, EventArgs e){
tbCustomSound.Text = string.Empty; tbCustomSound.Text = string.Empty;

View File

@@ -1,4 +1,4 @@
namespace TweetDuck.Core.Other.Settings { namespace TweetDuck.Dialogs.Settings {
partial class TabSettingsTray { partial class TabSettingsTray {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.

View File

@@ -1,7 +1,8 @@
using System; using System;
using TweetDuck.Browser;
namespace TweetDuck.Core.Other.Settings{ namespace TweetDuck.Dialogs.Settings{
sealed partial class TabSettingsTray : BaseTabSettings{ sealed partial class TabSettingsTray : FormSettings.BaseTab{
public TabSettingsTray(){ public TabSettingsTray(){
InitializeComponent(); InitializeComponent();

View File

@@ -5,7 +5,7 @@ using System.Reflection;
using TweetLib.Core.Serialization; using TweetLib.Core.Serialization;
using TweetLib.Core.Serialization.Converters; using TweetLib.Core.Serialization.Converters;
namespace TweetDuck.Core.Other.Analytics{ namespace TweetDuck.Management.Analytics{
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Local")] [SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Local")]
sealed class AnalyticsFile{ sealed class AnalyticsFile{
private static readonly FileSerializer<AnalyticsFile> Serializer = new FileSerializer<AnalyticsFile>(); private static readonly FileSerializer<AnalyticsFile> Serializer = new FileSerializer<AnalyticsFile>();

View File

@@ -6,13 +6,14 @@ using System;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Timers; using System.Timers;
using TweetDuck.Core.Controls; using TweetDuck.Browser;
using TweetDuck.Core.Utils; using TweetDuck.Controls;
using TweetDuck.Utils;
using TweetLib.Core; using TweetLib.Core;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core.Other.Analytics{ namespace TweetDuck.Management.Analytics{
sealed class AnalyticsManager : IDisposable{ sealed class AnalyticsManager : IDisposable{
private static readonly TimeSpan CollectionInterval = TimeSpan.FromDays(14); private static readonly TimeSpan CollectionInterval = TimeSpan.FromDays(14);
@@ -138,8 +139,7 @@ namespace TweetDuck.Core.Other.Analytics{
break; break;
case WebExceptionStatus.ProtocolError: case WebExceptionStatus.ProtocolError:
HttpWebResponse response = e.Response as HttpWebResponse; message = "HTTP Error " + (e.Response is HttpWebResponse response ? $"{(int)response.StatusCode} ({response.StatusDescription})" : "(unknown code)");
message = "HTTP Error " + (response != null ? $"{(int)response.StatusCode} ({response.StatusDescription})" : "(unknown code)");
break; break;
} }

View File

@@ -2,7 +2,7 @@
using System.Collections.Specialized; using System.Collections.Specialized;
using System.Text; using System.Text;
namespace TweetDuck.Core.Other.Analytics{ namespace TweetDuck.Management.Analytics{
sealed class AnalyticsReport : IEnumerable{ sealed class AnalyticsReport : IEnumerable{
private OrderedDictionary data = new OrderedDictionary(32); private OrderedDictionary data = new OrderedDictionary(32);
private int separators; private int separators;

View File

@@ -2,20 +2,21 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Windows.Forms;
using Microsoft.Win32;
using TweetDuck.Configuration;
using System.Linq; using System.Linq;
using System.Management; using System.Management;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using TweetDuck.Core.Utils; using System.Windows.Forms;
using Microsoft.Win32;
using TweetDuck.Browser;
using TweetDuck.Configuration;
using TweetDuck.Utils;
using TweetLib.Core; using TweetLib.Core;
using TweetLib.Core.Features.Notifications; using TweetLib.Core.Features.Notifications;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Features.Plugins.Enums; using TweetLib.Core.Features.Plugins.Enums;
using TweetLib.Core.Utils; using TweetLib.Core.Utils;
namespace TweetDuck.Core.Other.Analytics{ namespace TweetDuck.Management.Analytics{
static class AnalyticsReportGenerator{ static class AnalyticsReportGenerator{
public static AnalyticsReport Create(AnalyticsFile file, ExternalInfo info, PluginManager plugins){ public static AnalyticsReport Create(AnalyticsFile file, ExternalInfo info, PluginManager plugins){
Dictionary<string, string> editLayoutDesign = EditLayoutDesignPluginData; Dictionary<string, string> editLayoutDesign = EditLayoutDesignPluginData;

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace TweetDuck.Core.Management{ namespace TweetDuck.Management{
static class BrowserCache{ static class BrowserCache{
public static string CacheFolder => Path.Combine(Program.StoragePath, "Cache"); public static string CacheFolder => Path.Combine(Program.StoragePath, "Cache");

View File

@@ -0,0 +1,55 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace TweetDuck.Management{
static class ClipboardManager{
private static readonly Lazy<Regex> RegexStripHtmlStyles = new Lazy<Regex>(() => new Regex(@"\s?(?:style|class)="".*?"""), false);
private static readonly Lazy<Regex> RegexOffsetClipboardHtml = new Lazy<Regex>(() => new Regex(@"(?<=EndHTML:|EndFragment:)(\d+)"), false);
public static void SetText(string text, TextDataFormat format){
if (string.IsNullOrEmpty(text)){
return;
}
DataObject obj = new DataObject();
obj.SetText(text, format);
SetClipboardData(obj);
}
public static void SetImage(Image image){
DataObject obj = new DataObject();
obj.SetImage(image);
SetClipboardData(obj);
}
private static void SetClipboardData(DataObject obj){
try{
Clipboard.SetDataObject(obj);
}catch(ExternalException e){
Program.Reporter.HandleException("Clipboard Error", "TweetDuck could not access the clipboard as it is currently used by another process.", true, e);
}
}
public static void StripHtmlStyles(){
if (!Clipboard.ContainsText(TextDataFormat.Html) || !Clipboard.ContainsText(TextDataFormat.UnicodeText)){
return;
}
string originalText = Clipboard.GetText(TextDataFormat.UnicodeText);
string originalHtml = Clipboard.GetText(TextDataFormat.Html);
string updatedHtml = RegexStripHtmlStyles.Value.Replace(originalHtml, string.Empty);
int removed = originalHtml.Length - updatedHtml.Length;
updatedHtml = RegexOffsetClipboardHtml.Value.Replace(updatedHtml, match => (int.Parse(match.Value) - removed).ToString().PadLeft(match.Value.Length, '0'));
DataObject obj = new DataObject();
obj.SetText(originalText, TextDataFormat.UnicodeText);
obj.SetText(updatedHtml, TextDataFormat.Html);
SetClipboardData(obj);
}
}
}

View File

@@ -1,10 +1,12 @@
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
namespace TweetDuck.Core{ namespace TweetDuck.Management{
static class FormManager{ static class FormManager{
private static FormCollection OpenForms => System.Windows.Forms.Application.OpenForms;
public static T TryFind<T>() where T : Form{ public static T TryFind<T>() where T : Form{
return Application.OpenForms.OfType<T>().FirstOrDefault(); return OpenForms.OfType<T>().FirstOrDefault();
} }
public static bool TryBringToFront<T>() where T : Form{ public static bool TryBringToFront<T>() where T : Form{
@@ -14,11 +16,13 @@ namespace TweetDuck.Core{
form.BringToFront(); form.BringToFront();
return true; return true;
} }
else return false; else{
return false;
}
} }
public static void CloseAllDialogs(){ public static void CloseAllDialogs(){
foreach(IAppDialog dialog in Application.OpenForms.OfType<IAppDialog>().Reverse()){ foreach(IAppDialog dialog in OpenForms.OfType<IAppDialog>().Reverse()){
((Form)dialog).Close(); ((Form)dialog).Close();
} }
} }

View File

@@ -2,12 +2,12 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using TweetDuck.Core.Other; using TweetDuck.Dialogs;
using TweetLib.Core.Data; using TweetLib.Core.Data;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Features.Plugins.Enums; using TweetLib.Core.Features.Plugins.Enums;
namespace TweetDuck.Core.Management{ namespace TweetDuck.Management{
sealed class ProfileManager{ sealed class ProfileManager{
private static readonly string CookiesPath = Path.Combine(Program.StoragePath, "Cookies"); private static readonly string CookiesPath = Path.Combine(Program.StoragePath, "Cookies");
private static readonly string TempCookiesPath = Path.Combine(Program.StoragePath, "CookiesTmp"); private static readonly string TempCookiesPath = Path.Combine(Program.StoragePath, "CookiesTmp");

View File

@@ -2,13 +2,14 @@
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Browser;
using TweetDuck.Configuration; using TweetDuck.Configuration;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Other; using TweetDuck.Dialogs;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
using TweetLib.Communication; using TweetLib.Communication;
namespace TweetDuck.Core.Management{ namespace TweetDuck.Management{
sealed class VideoPlayer : IDisposable{ sealed class VideoPlayer : IDisposable{
private static UserConfig Config => Program.Config.User; private static UserConfig Config => Program.Config.User;

View File

@@ -33,7 +33,7 @@
this.labelWebsite = new System.Windows.Forms.Label(); this.labelWebsite = new System.Windows.Forms.Label();
this.labelVersion = new System.Windows.Forms.Label(); this.labelVersion = new System.Windows.Forms.Label();
this.btnConfigure = new System.Windows.Forms.Button(); this.btnConfigure = new System.Windows.Forms.Button();
this.labelType = new TweetDuck.Core.Controls.LabelVertical(); this.labelType = new TweetDuck.Controls.LabelVertical();
this.timerLayout = new System.Windows.Forms.Timer(this.components); this.timerLayout = new System.Windows.Forms.Timer(this.components);
this.panelBorder = new System.Windows.Forms.Panel(); this.panelBorder = new System.Windows.Forms.Panel();
this.panelDescription.SuspendLayout(); this.panelDescription.SuspendLayout();
@@ -227,7 +227,7 @@
private System.Windows.Forms.Label labelWebsite; private System.Windows.Forms.Label labelWebsite;
private System.Windows.Forms.Label labelVersion; private System.Windows.Forms.Label labelVersion;
private System.Windows.Forms.Button btnConfigure; private System.Windows.Forms.Button btnConfigure;
private Core.Controls.LabelVertical labelType; private Controls.LabelVertical labelType;
private System.Windows.Forms.Timer timerLayout; private System.Windows.Forms.Timer timerLayout;
private System.Windows.Forms.Panel panelBorder; private System.Windows.Forms.Panel panelBorder;
} }

View File

@@ -1,8 +1,8 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Core.Controls; using TweetDuck.Controls;
using TweetDuck.Core.Utils; using TweetDuck.Utils;
using TweetLib.Core.Features.Plugins; using TweetLib.Core.Features.Plugins;
using TweetLib.Core.Features.Plugins.Enums; using TweetLib.Core.Features.Plugins.Enums;

Some files were not shown because too many files have changed in this diff Show More