mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-21 16:12:18 -05:00
fix crash due to fetching resource from wrong assembly
This commit is contained in:
1 parent
de3a1a6e72
commit
c6f9bedcd2
3 files changed
+5
-9
No files matched your search
@@ -18,8 +18,8 @@
|
||||
<PublisherName>Maassoft</PublisherName>
|
||||
<Company>Maassoft</Company>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>9.6.1.0</ApplicationVersion>
|
||||
<Version>9.6.1.0</Version>
|
||||
<ApplicationVersion>9.6.1.1</ApplicationVersion>
|
||||
<Version>9.6.1.1</Version>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>false</BootstrapperEnabled>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using nspector.Native.NvApi.DriverSettings;
|
||||
using nspector.Native.NvApi.DriverSettings;
|
||||
using nspector.Native.NVAPI2;
|
||||
using System.Reflection;
|
||||
|
||||
namespace nspector.Common.Meta
|
||||
{
|
||||
|
||||
@@ -609,7 +609,6 @@ The best and suggested method to provide this is via a Windows Service. Only whe
|
||||
|
||||
public static bool TaskExists(string taskName)
|
||||
{
|
||||
var file = Assembly.GetExecutingAssembly().Location;
|
||||
using (TaskService ts = new TaskService())
|
||||
{
|
||||
var task = ts.RootFolder.Tasks.FirstOrDefault(x => x.Name.Equals(taskName));
|
||||
@@ -837,7 +836,7 @@ The best and suggested method to provide this is via a Windows Service. Only whe
|
||||
{
|
||||
resourceName = "ColorControl.Resources." + resourceName;
|
||||
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var assembly = Assembly.GetEntryAssembly();
|
||||
|
||||
using (Stream stream = assembly.GetManifestResourceStream(resourceName))
|
||||
using (StreamReader reader = new StreamReader(stream))
|
||||
|
||||
Reference in new issue
Block a user