Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public JiraConnection LoadSettings()
        {
            var result = new JiraConnection();

            try
            {
                var hashtable = PluginUtils.LoadSettings(typeof(JiraPlugin));

                if (null == hashtable)
                {
                    throw new NullReferenceException("No settings for JiraPlugin.");
                }
                result.ServerUrl = hashtable.GetValue("server", "");
                result.Username  = hashtable.GetValue("Username", "");
                result.Password  = hashtable.GetValue("Password", "");
            }
            catch
            {
                result.ServerUrl = "";
                result.Username  = "";
                result.Password  = "";
            }
            return(result);
        }
Exemplo n.º 2
0
        private void LoadSettings()
        {
            try
            {
                Hashtable hashtable = PluginUtils.LoadSettings(typeof(SourceForgePlugin));

                if (hashtable.ContainsKey("ProjectName"))
                {
                    _projectName = (String)hashtable["ProjectName"];
                }

                if (hashtable.ContainsKey("GroupId"))
                {
                    _groupId = (String)hashtable["GroupId"];
                }

                if (hashtable.ContainsKey("ShowDetails"))
                {
                    ShowDetails = (bool)hashtable["ShowDetails"];
                }

                if (hashtable.ContainsKey("ShowSummary"))
                {
                    ShowSummary = (bool)hashtable["ShowSummary"];
                }

                if (hashtable.ContainsKey("ShowLastComment"))
                {
                    ShowLastComment = (bool)hashtable["ShowLastComment"];
                }
            }
            catch (Exception)
            {
                _projectName = String.Empty;
            }
        }