mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-06 05:34:05 +02:00
Address static code analysis issues (disposing objects, neutral language and CLSCompliant attribute)
This commit is contained in:
parent
38539c4a9b
commit
39f554693d
2
Core/Controls/FlatProgressBar.Designer.cs
generated
2
Core/Controls/FlatProgressBar.Designer.cs
generated
@ -10,6 +10,8 @@ partial class FlatProgressBar {
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) {
|
||||
brush.Dispose();
|
||||
|
||||
if (disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
|
@ -38,6 +38,8 @@ public FormBrowser(){
|
||||
|
||||
Controls.Add(browser);
|
||||
|
||||
Disposed += (sender, args) => browser.Dispose();
|
||||
|
||||
notification = new FormNotification(this,bridge,true);
|
||||
notification.Show();
|
||||
}
|
||||
|
@ -39,6 +39,8 @@ public FormNotification(Form owner, TweetDeckBridge bridge, bool autoHide){
|
||||
}
|
||||
|
||||
panelBrowser.Controls.Add(browser);
|
||||
|
||||
Disposed += (sender, args) => browser.Dispose();
|
||||
}
|
||||
|
||||
public FormNotification(Form owner, bool autoHide) : this(owner,null,autoHide){}
|
||||
|
@ -14,8 +14,11 @@ static class MigrationManager{
|
||||
|
||||
public static void Run(){
|
||||
if (!Program.UserConfig.IgnoreMigration && Directory.Exists(TweetDeckPath)){
|
||||
FormMigrationQuestion formQuestion = new FormMigrationQuestion();
|
||||
MigrationDecision decision = formQuestion.ShowDialog() == DialogResult.OK ? formQuestion.Decision : MigrationDecision.AskLater;
|
||||
MigrationDecision decision;
|
||||
|
||||
using(FormMigrationQuestion formQuestion = new FormMigrationQuestion()){
|
||||
decision = formQuestion.ShowDialog() == DialogResult.OK ? formQuestion.Decision : MigrationDecision.AskLater;
|
||||
}
|
||||
|
||||
switch(decision){
|
||||
case MigrationDecision.MigratePurge:
|
||||
|
@ -8,6 +8,7 @@
|
||||
using TweetDick.Core;
|
||||
using TweetDick.Migration;
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
||||
namespace TweetDick{
|
||||
static class Program{
|
||||
#if DUCK
|
||||
@ -19,7 +20,7 @@ static class Program{
|
||||
#endif
|
||||
|
||||
public static readonly string StoragePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),BrandName);
|
||||
private static readonly LockManager LockManager;
|
||||
private static readonly LockManager LockManager = new LockManager(Path.Combine(StoragePath,".lock"));
|
||||
|
||||
public static UserConfig UserConfig { get; private set; }
|
||||
|
||||
@ -36,10 +37,6 @@ private static string HeaderAcceptLanguage{
|
||||
}
|
||||
}
|
||||
|
||||
static Program(){
|
||||
LockManager = new LockManager(Path.Combine(StoragePath,".lock"));
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern IntPtr LoadLibrary(string name);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using TweetDick;
|
||||
using System.Resources;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
@ -34,3 +35,5 @@
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.9.1.0")]
|
||||
[assembly: AssemblyFileVersion("0.9.1.0")]
|
||||
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
Loading…
Reference in New Issue
Block a user