mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-22 09:15:48 +02:00
Fix unsealed classes
This commit is contained in:
parent
868af5ac6a
commit
40ef9a42dd
Core
Controls
Handling
ContextMenuBrowser.csContextMenuNotification.cs
General
RequestHandlerBrowser.csResourceHandlerNotification.csOther
FormSettings.cs
TrayIcon.csSettings
Data
Plugins
Updates
subprocess
video
@ -2,7 +2,7 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TweetDuck.Core.Controls{
|
||||
class FlatButton : Button{
|
||||
sealed class FlatButton : Button{
|
||||
protected override bool ShowFocusCues => false;
|
||||
|
||||
public FlatButton(){
|
||||
|
@ -5,7 +5,7 @@
|
||||
using TweetDuck.Core.Utils;
|
||||
|
||||
namespace TweetDuck.Core.Handling{
|
||||
class ContextMenuBrowser : ContextMenuBase{
|
||||
sealed class ContextMenuBrowser : ContextMenuBase{
|
||||
private const CefMenuCommand MenuGlobal = (CefMenuCommand)26600;
|
||||
private const CefMenuCommand MenuMute = (CefMenuCommand)26601;
|
||||
private const CefMenuCommand MenuSettings = (CefMenuCommand)26602;
|
||||
|
@ -3,7 +3,7 @@
|
||||
using TweetDuck.Core.Notification;
|
||||
|
||||
namespace TweetDuck.Core.Handling{
|
||||
class ContextMenuNotification : ContextMenuBase{
|
||||
sealed class ContextMenuNotification : ContextMenuBase{
|
||||
private const CefMenuCommand MenuViewDetail = (CefMenuCommand)26600;
|
||||
private const CefMenuCommand MenuSkipTweet = (CefMenuCommand)26601;
|
||||
private const CefMenuCommand MenuFreeze = (CefMenuCommand)26602;
|
||||
|
@ -2,7 +2,7 @@
|
||||
using CefSharp;
|
||||
|
||||
namespace TweetDuck.Core.Handling.General{
|
||||
class BrowserProcessHandler : IBrowserProcessHandler{
|
||||
sealed class BrowserProcessHandler : IBrowserProcessHandler{
|
||||
void IBrowserProcessHandler.OnContextInitialized(){
|
||||
using(IRequestContext ctx = Cef.GetGlobalRequestContext()){
|
||||
ctx.SetPreference("browser.enable_spellchecking", Program.UserConfig.EnableSpellCheck, out string _);
|
||||
|
@ -7,7 +7,7 @@
|
||||
using TweetDuck.Core.Utils;
|
||||
|
||||
namespace TweetDuck.Core.Handling.General{
|
||||
class JavaScriptDialogHandler : IJsDialogHandler{
|
||||
sealed class JavaScriptDialogHandler : IJsDialogHandler{
|
||||
bool IJsDialogHandler.OnJSDialog(IWebBrowser browserControl, IBrowser browser, string originUrl, CefJsDialogType dialogType, string messageText, string defaultPromptText, IJsDialogCallback callback, ref bool suppressMessage){
|
||||
((ChromiumWebBrowser)browserControl).InvokeSafe(() => {
|
||||
FormMessage form;
|
||||
|
@ -2,7 +2,7 @@
|
||||
using TweetDuck.Core.Utils;
|
||||
|
||||
namespace TweetDuck.Core.Handling.General{
|
||||
class LifeSpanHandler : ILifeSpanHandler{
|
||||
sealed class LifeSpanHandler : ILifeSpanHandler{
|
||||
public bool OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser){
|
||||
newBrowser = null;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
using TweetDuck.Core.Handling.General;
|
||||
|
||||
namespace TweetDuck.Core.Handling{
|
||||
class RequestHandlerBrowser : RequestHandlerBase{
|
||||
sealed class RequestHandlerBrowser : RequestHandlerBase{
|
||||
public override void OnRenderProcessTerminated(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status){
|
||||
browser.Reload();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
using System.Text;
|
||||
|
||||
namespace TweetDuck.Core.Handling{
|
||||
class ResourceHandlerNotification : IResourceHandler{
|
||||
sealed class ResourceHandlerNotification : IResourceHandler{
|
||||
private readonly NameValueCollection headers = new NameValueCollection(0);
|
||||
private MemoryStream dataIn;
|
||||
|
||||
|
@ -139,7 +139,7 @@ private void control_MouseWheel(object sender, MouseEventArgs e){
|
||||
panelContents.Focus();
|
||||
}
|
||||
|
||||
private class SettingsTab{
|
||||
private sealed class SettingsTab{
|
||||
public Button Button { get; }
|
||||
|
||||
public BaseTabSettings Control{
|
||||
|
@ -176,7 +176,7 @@ private static IEnumerable<PathInfo> EnumerateFilesRelative(string root){
|
||||
}) : Enumerable.Empty<PathInfo>();
|
||||
}
|
||||
|
||||
private class PathInfo{
|
||||
private sealed class PathInfo{
|
||||
public string Full { get; set; }
|
||||
public string Relative { get; set; }
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
using TweetDuck.Core.Utils;
|
||||
|
||||
namespace TweetDuck.Core.Other.Settings{
|
||||
partial class TabSettingsAdvanced : BaseTabSettings{
|
||||
sealed partial class TabSettingsAdvanced : BaseTabSettings{
|
||||
private static SystemConfig SysConfig => Program.SystemConfig;
|
||||
|
||||
private readonly Action<string> reinjectBrowserCSS;
|
||||
|
@ -3,7 +3,7 @@
|
||||
using TweetDuck.Updates;
|
||||
|
||||
namespace TweetDuck.Core.Other.Settings{
|
||||
partial class TabSettingsGeneral : BaseTabSettings{
|
||||
sealed partial class TabSettingsGeneral : BaseTabSettings{
|
||||
private readonly UpdateHandler updates;
|
||||
private int updateCheckEventId = -1;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
using TweetDuck.Core.Notification;
|
||||
|
||||
namespace TweetDuck.Core.Other.Settings{
|
||||
partial class TabSettingsNotifications : BaseTabSettings{
|
||||
sealed partial class TabSettingsNotifications : BaseTabSettings{
|
||||
private static readonly int[] IdlePauseSeconds = { 0, 30, 60, 120, 300 };
|
||||
|
||||
private readonly FormNotificationMain notification;
|
||||
|
@ -7,7 +7,7 @@
|
||||
using TweetLib.Audio;
|
||||
|
||||
namespace TweetDuck.Core.Other.Settings{
|
||||
partial class TabSettingsSounds : BaseTabSettings{
|
||||
sealed partial class TabSettingsSounds : BaseTabSettings{
|
||||
private readonly SoundNotification soundNotification;
|
||||
private readonly bool supportsChangingVolume;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TweetDuck.Core{
|
||||
partial class TrayIcon : Component{
|
||||
sealed partial class TrayIcon : Component{
|
||||
public enum Behavior{ // keep order
|
||||
Disabled, DisplayOnly, MinimizeToTray, CloseToTray, Combined
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ void IDisposable.Dispose(){
|
||||
stream.Dispose();
|
||||
}
|
||||
|
||||
public class Entry{
|
||||
public sealed class Entry{
|
||||
public string Identifier { get; }
|
||||
|
||||
public string KeyName{
|
||||
|
@ -95,7 +95,7 @@ public void Read(string file, T obj){
|
||||
}
|
||||
}
|
||||
|
||||
private class BasicTypeConverter : ITypeConverter{
|
||||
private sealed class BasicTypeConverter : ITypeConverter{
|
||||
bool ITypeConverter.TryWriteType(Type type, object value, out string converted){
|
||||
switch(Type.GetTypeCode(type)){
|
||||
case TypeCode.Boolean:
|
||||
|
@ -8,7 +8,7 @@
|
||||
using TweetDuck.Plugins.Enums;
|
||||
|
||||
namespace TweetDuck.Plugins.Controls{
|
||||
partial class PluginControl : UserControl{
|
||||
sealed partial class PluginControl : UserControl{
|
||||
private readonly PluginManager pluginManager;
|
||||
private readonly Plugin plugin;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
|
||||
namespace TweetDuck.Plugins.Events{
|
||||
class PluginChangedStateEventArgs : EventArgs{
|
||||
sealed class PluginChangedStateEventArgs : EventArgs{
|
||||
public Plugin Plugin { get; }
|
||||
public bool IsEnabled { get; }
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TweetDuck.Plugins.Events{
|
||||
class PluginErrorEventArgs : EventArgs{
|
||||
sealed class PluginErrorEventArgs : EventArgs{
|
||||
public bool HasErrors => Errors.Count > 0;
|
||||
|
||||
public IList<string> Errors { get; }
|
||||
|
@ -93,7 +93,7 @@ private void TriggerCheckFinishedEvent(UpdateEventArgs args){
|
||||
CheckFinished?.Invoke(this, args);
|
||||
}
|
||||
|
||||
public class Bridge{
|
||||
public sealed class Bridge{
|
||||
private readonly UpdateHandler owner;
|
||||
|
||||
public Bridge(UpdateHandler owner){
|
||||
|
@ -20,7 +20,7 @@ private static int Main(string[] args){
|
||||
else return SubProcess.ExecuteProcess();
|
||||
}
|
||||
|
||||
private class RendererProcess : SubProcess{
|
||||
private sealed class RendererProcess : SubProcess{
|
||||
public RendererProcess(string[] args) : base(args){}
|
||||
|
||||
public override void OnBrowserCreated(CefBrowserWrapper wrapper){
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace TweetDuck.Video.Controls{
|
||||
[DesignTimeVisible(true)]
|
||||
[Clsid("{6bf52a52-394a-11d3-b153-00c04f79faa6}")]
|
||||
class ControlWMP : AxHost{
|
||||
sealed class ControlWMP : AxHost{
|
||||
public WindowsMediaPlayer Ocx { get; private set; }
|
||||
|
||||
public ControlWMP() : base("6bf52a52-394a-11d3-b153-00c04f79faa6"){}
|
||||
|
@ -8,7 +8,7 @@
|
||||
using WMPLib;
|
||||
|
||||
namespace TweetDuck.Video{
|
||||
partial class FormPlayer : Form{
|
||||
sealed partial class FormPlayer : Form{
|
||||
protected override bool ShowWithoutActivation => true;
|
||||
|
||||
private readonly IntPtr ownerHandle;
|
||||
@ -258,7 +258,7 @@ private void StopVideo(){
|
||||
Close();
|
||||
}
|
||||
|
||||
internal class MessageFilter : IMessageFilter{
|
||||
internal sealed class MessageFilter : IMessageFilter{
|
||||
private readonly FormPlayer form;
|
||||
|
||||
private bool IsCursorOverVideo{
|
||||
|
Loading…
Reference in New Issue
Block a user