mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 21:43:24 -07:00
Fixed exception due to wrong init.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1773 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
6dfc75a492
commit
d8ee90e5f1
3 changed files with 9 additions and 9 deletions
|
@ -27,9 +27,8 @@ namespace GreenshotJiraPlugin {
|
||||||
/// Description of PasswordRequestForm.
|
/// Description of PasswordRequestForm.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class SettingsForm : GreenshotPlugin.Controls.GreenshotForm {
|
public partial class SettingsForm : GreenshotPlugin.Controls.GreenshotForm {
|
||||||
private ILanguage lang = Language.GetInstance();
|
|
||||||
|
|
||||||
public SettingsForm(JiraConfiguration config) {
|
public SettingsForm(JiraConfiguration config) {
|
||||||
|
language = Language.GetInstance();
|
||||||
//
|
//
|
||||||
// The InitializeComponent() call is required for Windows Forms designer support.
|
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||||
//
|
//
|
||||||
|
|
|
@ -120,12 +120,13 @@ namespace GreenshotJiraPlugin {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void Configure() {
|
public virtual void Configure() {
|
||||||
string url = config.Url;
|
string url = config.Url;
|
||||||
config.ShowConfigDialog();
|
if (config.ShowConfigDialog()) {
|
||||||
// check for re-login
|
// check for re-login
|
||||||
if (jiraConnector.isLoggedIn && !string.IsNullOrEmpty(url)) {
|
if (jiraConnector != null && jiraConnector.isLoggedIn && !string.IsNullOrEmpty(url)) {
|
||||||
if (!url.Equals(config.Url)) {
|
if (!url.Equals(config.Url)) {
|
||||||
jiraConnector.logout();
|
jiraConnector.logout();
|
||||||
jiraConnector.login();
|
jiraConnector.login();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace GreenshotPlugin.Controls {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void ApplyLanguage() {
|
protected void ApplyLanguage() {
|
||||||
if (language == null) {
|
if (language == null) {
|
||||||
throw new ArgumentNullException("Language not set!!");
|
throw new ArgumentNullException("Language not set!! Please use 'language = Language.GetInstance()' in your form constructor!");
|
||||||
}
|
}
|
||||||
// Set title of the form
|
// Set title of the form
|
||||||
if (!string.IsNullOrEmpty(LanguageKey)) {
|
if (!string.IsNullOrEmpty(LanguageKey)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue