mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Fixed path locating in DesignMode
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1786 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
75b0204c57
commit
2a07d84033
2 changed files with 19 additions and 13 deletions
|
@ -31,11 +31,12 @@ namespace GreenshotPlugin.Controls {
|
|||
ITypeResolutionService typeResService = GetService(typeof(ITypeResolutionService)) as ITypeResolutionService;
|
||||
Assembly currentAssembly = this.GetType().Assembly;
|
||||
string assemblyPath = typeResService.GetPathOfAssembly(currentAssembly.GetName());
|
||||
string designTimeLanguagePath = Path.Combine(Path.GetDirectoryName(assemblyPath), "../../../Greenshot/Languages/");
|
||||
string designTimePluginLanguagePath = Path.Combine(Path.GetDirectoryName(assemblyPath), "../../Languages/");
|
||||
//MessageBox.Show(designTimeLanguagePath);
|
||||
Language.AddLanguageFilePath(designTimeLanguagePath);
|
||||
Language.AddLanguageFilePath(designTimePluginLanguagePath);
|
||||
if (!Language.AddLanguageFilePath(Path.Combine(Path.GetDirectoryName(assemblyPath), @"..\..\Greenshot\Languages\"))) {
|
||||
Language.AddLanguageFilePath(Path.Combine(Path.GetDirectoryName(assemblyPath), @"..\..\..\Greenshot\Languages\"));
|
||||
}
|
||||
if (!Language.AddLanguageFilePath(Path.Combine(Path.GetDirectoryName(assemblyPath), @"..\..\Languages\"))) {
|
||||
Language.AddLanguageFilePath(Path.Combine(Path.GetDirectoryName(assemblyPath), @"..\..\..\Languages\"));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
|
@ -48,7 +49,6 @@ namespace GreenshotPlugin.Controls {
|
|||
/// <param name="e"></param>
|
||||
protected override void OnPaint(PaintEventArgs e) {
|
||||
if (this.DesignMode) {
|
||||
LOG.InfoFormat("OnPaint called from designer. Key={0}", LanguageKey);
|
||||
if (!isLanguageSet) {
|
||||
isLanguageSet = true;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue