mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
Changes so the confluenceConnector is "lazy" loaded, this makes the startup a lot quicker.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@854 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
14b0863bcd
commit
d0c061e7f2
2 changed files with 4 additions and 3 deletions
|
@ -56,7 +56,7 @@ namespace Confluence {
|
||||||
private ConfluenceSoapServiceService confluence;
|
private ConfluenceSoapServiceService confluence;
|
||||||
private Dictionary<string, string> userMap = new Dictionary<string, string>();
|
private Dictionary<string, string> userMap = new Dictionary<string, string>();
|
||||||
|
|
||||||
public ConfluenceConnector(string configurationPath) {
|
public ConfluenceConnector() {
|
||||||
this.config = IniConfig.GetIniSection<ConfluenceConfiguration>();
|
this.config = IniConfig.GetIniSection<ConfluenceConfiguration>();
|
||||||
confluence = new ConfluenceSoapServiceService();
|
confluence = new ConfluenceSoapServiceService();
|
||||||
confluence.Url = config.Url;
|
confluence.Url = config.Url;
|
||||||
|
|
|
@ -58,8 +58,6 @@ namespace GreenshotConfluencePlugin {
|
||||||
this.captureHost = captureHost;
|
this.captureHost = captureHost;
|
||||||
this.myAttributes = myAttributes;
|
this.myAttributes = myAttributes;
|
||||||
host.OnImageEditorOpen += new OnImageEditorOpenHandler(ImageEditorOpened);
|
host.OnImageEditorOpen += new OnImageEditorOpenHandler(ImageEditorOpened);
|
||||||
|
|
||||||
this.confluenceConnector = new ConfluenceConnector(host.ConfigurationPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Shutdown() {
|
public virtual void Shutdown() {
|
||||||
|
@ -106,6 +104,9 @@ namespace GreenshotConfluencePlugin {
|
||||||
ToolStripMenuItem item = (ToolStripMenuItem)sender;
|
ToolStripMenuItem item = (ToolStripMenuItem)sender;
|
||||||
IImageEditor imageEditor = (IImageEditor)item.Tag;
|
IImageEditor imageEditor = (IImageEditor)item.Tag;
|
||||||
|
|
||||||
|
if (confluenceConnector == null) {
|
||||||
|
this.confluenceConnector = new ConfluenceConnector();
|
||||||
|
}
|
||||||
ConfluenceForm confluenceForm = new ConfluenceForm(confluenceConnector);
|
ConfluenceForm confluenceForm = new ConfluenceForm(confluenceConnector);
|
||||||
confluenceForm.setFilename(host.GetFilename(OutputFormat.Png, imageEditor.CaptureDetails));
|
confluenceForm.setFilename(host.GetFilename(OutputFormat.Png, imageEditor.CaptureDetails));
|
||||||
DialogResult result = confluenceForm.ShowDialog();
|
DialogResult result = confluenceForm.ShowDialog();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue