Zzz – Diff between revs 1 and 2

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 1 Rev 2
Line 52... Line 52...
52   52  
Line 53... Line 53...
53 private SettingsForm _settingsForm; 53 private SettingsForm _settingsForm;
Line 54... Line 54...
54   54  
55 private Idler _hibernateIdler; -  
56   -  
Line 57... Line 55...
57 private LogMemorySink _memorySink; 55 private Idler _hibernateIdler;
Line 58... Line 56...
58   56  
Line 71... Line 69...
71 #region Constructors, Destructors and Finalizers 69 #region Constructors, Destructors and Finalizers
Line 72... Line 70...
72   70  
73 public MainForm(Mutex mutex) : this() 71 public MainForm(Mutex mutex) : this()
74 { 72 {
75 InitializeComponent(); -  
76 _memorySink = new LogMemorySink(); -  
Line 77... Line -...
77 _memorySinkLock = new object(); -  
78   -  
79 lock (_memorySinkLock) 73 InitializeComponent();
80 { 74  
81 Log.Logger = new LoggerConfiguration() -  
82 .MinimumLevel.Debug() 75 Log.Logger = new LoggerConfiguration()
83 .WriteTo.Conditional(condition => MemorySinkEnabled, -  
84 configureSink => configureSink.Sink(_memorySink)) 76 .MinimumLevel.Debug()
85 .WriteTo.File( 77 .WriteTo.Conditional(condition => MemorySinkEnabled, configureSink => configureSink.Sink(_memorySink))
86 Path.Combine(Constants.UserApplicationDirectory, "Logs", $"{Constants.AssemblyName}.log"), 78 .WriteTo.File(Path.Combine(Constants.UserApplicationDirectory, "Logs", $"{Constants.AssemblyName}.log"),
87 rollingInterval: RollingInterval.Day) -  
Line 88... Line 79...
88 .CreateLogger(); 79 rollingInterval: RollingInterval.Day)
89 } 80 .CreateLogger();
90   81  
Line 98... Line 89...
98   89  
99 _sparkle = new SparkleUpdater("https://zzz.grimore.org/update/appcast.xml", 90 _sparkle = new SparkleUpdater("https://zzz.grimore.org/update/appcast.xml",
100 new Ed25519Checker(SecurityMode.Strict, "LonrgxVjSF0GnY4hzwlRJnLkaxnDn2ikdmOifILzLJY=")) 91 new Ed25519Checker(SecurityMode.Strict, "LonrgxVjSF0GnY4hzwlRJnLkaxnDn2ikdmOifILzLJY="))
101 { 92 {
102 UIFactory = new UIFactory(icon), 93 UIFactory = new UIFactory(icon),
103 RelaunchAfterUpdate = true, -  
104 SecurityProtocolType = SecurityProtocolType.Tls12 94 RelaunchAfterUpdate = true
105 }; 95 };
106 _sparkle.StartLoop(true, true); 96 _sparkle.StartLoop(true, true);
Line 107... Line 97...
107 } 97 }
Line 174... Line 164...
174 if (_logViewForm != null) 164 if (_logViewForm != null)
175 { 165 {
176 return; 166 return;
177 } 167 }
Line 178... Line -...
178   -  
179 lock (_memorySinkLock) -  
180 { 168  
181 _logViewForm = new LogViewForm(this, _memorySink, _memorySinkLock); 169 _logViewForm = new LogViewForm(this, _memorySink, _cancellationToken);
182 _logViewForm.Closing += LogViewFormClosing; 170 _logViewForm.Closing += LogViewFormClosing;
183 _logViewForm.Show(); -  
184 } 171 _logViewForm.Show();
Line 185... Line 172...
185 } 172 }
186   173  
187 private void LogViewFormClosing(object sender, CancelEventArgs e) 174 private void LogViewFormClosing(object sender, CancelEventArgs e)