mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Making the plugins behave more stable, fixing a part of Bug #3528518
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1899 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
2ae58d5c6c
commit
2d88d8e588
5 changed files with 98 additions and 47 deletions
|
@ -40,19 +40,28 @@ namespace GreenshotConfluencePlugin {
|
|||
private static ConfluenceConfiguration config = IniConfig.GetIniSection<ConfluenceConfiguration>();
|
||||
private static Image confluenceIcon = null;
|
||||
private Confluence.Page page;
|
||||
|
||||
public static bool IsInitialized {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
static ConfluenceDestination() {
|
||||
Uri confluenceIconUri = new Uri("/GreenshotConfluencePlugin;component/Images/Confluence.ico", UriKind.Relative);
|
||||
using (Stream iconStream = Application.GetResourceStream(confluenceIconUri).Stream) {
|
||||
using (Image tmpImage = Image.FromStream(iconStream)) {
|
||||
confluenceIcon = ImageHelper.Clone(tmpImage);
|
||||
IsInitialized = false;
|
||||
try {
|
||||
Uri confluenceIconUri = new Uri("/GreenshotConfluencePlugin;component/Images/Confluence.ico", UriKind.Relative);
|
||||
using (Stream iconStream = Application.GetResourceStream(confluenceIconUri).Stream) {
|
||||
using (Image tmpImage = Image.FromStream(iconStream)) {
|
||||
confluenceIcon = ImageHelper.Clone(tmpImage);
|
||||
}
|
||||
}
|
||||
IsInitialized = true;
|
||||
} catch (Exception ex) {
|
||||
LOG.ErrorFormat("Problem in the confluence static initializer: {0}", ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public ConfluenceDestination() {
|
||||
|
||||
}
|
||||
|
||||
public ConfluenceDestination(Confluence.Page page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue