예제 #1
0
 private Settings()
 {
     _UsedStyle = null;
     _AutoReportCrash = true;
     _SearchUpdateOnStart = true;
     _IgnoreUpdate = Code.UpdateManager.Instance.AppVersion;
 }
예제 #2
0
 private Settings()
 {
     _UsedStyle           = null;
     _AutoReportCrash     = true;
     _SearchUpdateOnStart = true;
     _IgnoreUpdate        = Code.UpdateManager.Instance.AppVersion;
 }
예제 #3
0
        public void ReadXml(XmlReader reader)
        {
            preventSave = true;

            UsedStyle = null;
            do
            {
                reader.Read();
                switch (reader.Name.ToLower())
                {
                    case "used-style":
                        {
                            reader.Read();
                            var stylePath = reader.Value.ToUpper().Split('/');
                            if (stylePath.Count() <= 1)
                                break;
                            foreach (var addin in Code.AddInManager.Instance.AddIns)
                            {
                                if (addin.Info.Name.ToUpper() == stylePath[0])
                                {
                                    foreach (var style in addin.Styles)
                                    {
                                        if (style.Name.ToUpper() == stylePath[1])
                                        {
                                            UsedStyle.LoadStyle();
                                            break;
                                        }
                                    }
                                    break;
                                }
                            }
                        }
                        break;
                    case "auto-report-crash":
                        {
                            reader.Read();
                            this.AutoReportCrash = bool.Parse(reader.Value);
                        }
                        break;
                    case "search-update-on-start":
                        {
                            reader.Read();
                            this.SearchUpdateOnStart = bool.Parse(reader.Value);
                        }
                        break;
                    case "ignore-update":
                        {
                            reader.Read();
                            this.IgnoreUpdate = System.Version.Parse(reader.Value);
                        }
                        break;
                }
                reader.Read();
            } while (reader.Name.ToUpper() != "SETTINGS" && reader.Name != "");
            preventSave = false;
        }