mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-24 05:34:06 +02:00
Add browser storage and update using directives in Program
This commit is contained in:
parent
8961421d92
commit
2c2eea05ad
17
Program.cs
17
Program.cs
@ -1,11 +1,18 @@
|
|||||||
using CefSharp;
|
using CefSharp;
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using TweetDick.Forms;
|
using TweetDick.Core;
|
||||||
|
|
||||||
namespace TweetDick{
|
namespace TweetDick{
|
||||||
static class Program{
|
static class Program{
|
||||||
|
public static string StoragePath{
|
||||||
|
get{
|
||||||
|
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),"TweetDick");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static string HeaderAcceptLanguage{
|
private static string HeaderAcceptLanguage{
|
||||||
get{
|
get{
|
||||||
string culture = CultureInfo.CurrentCulture.Name;
|
string culture = CultureInfo.CurrentCulture.Name;
|
||||||
@ -21,14 +28,16 @@ private static string HeaderAcceptLanguage{
|
|||||||
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
private static void Main(){
|
private static void Main(){
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
Cef.Initialize(new CefSettings{
|
Cef.Initialize(new CefSettings{
|
||||||
AcceptLanguageList = HeaderAcceptLanguage,
|
AcceptLanguageList = HeaderAcceptLanguage,
|
||||||
UserAgent = "TweetDick "+Application.ProductVersion,
|
UserAgent = "TweetDick "+Application.ProductVersion,
|
||||||
Locale = CultureInfo.CurrentCulture.TwoLetterISOLanguageName
|
Locale = CultureInfo.CurrentCulture.TwoLetterISOLanguageName,
|
||||||
|
CachePath = StoragePath
|
||||||
});
|
});
|
||||||
|
|
||||||
Application.EnableVisualStyles();
|
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
|
||||||
Application.Run(new FormBrowser());
|
Application.Run(new FormBrowser());
|
||||||
|
|
||||||
Application.ApplicationExit += (sender, args) => {
|
Application.ApplicationExit += (sender, args) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user