public static DebuggerSettings LoadSettings()
        {
            string fileName = UserData.GetAppDataPath("DebuggerSettings.xml");

            try
            {
                if (File.Exists(fileName))
                {
                    System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(typeof(DebuggerSettings));

                    DebuggerSettings ud = new DebuggerSettings();
                    using (System.IO.FileStream file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))
                    {
                        ud = (DebuggerSettings)reader.Deserialize(file);
                        file.Close();
                    }
                    ud.doNotSave = false;
                    return(ud);
                }
                return(new DebuggerSettings());
            }
            catch (Exception ex)
            {
                ErrorHandler.inst().Error(ex);
                DebuggerSettings ret = new DebuggerSettings();
                ret.doNotSave = false;
                return(ret);
            }
            finally { }
        }
        public static DebuggerSettings LoadSettings()
        {
            string fileName = UserData.GetAppDataPath("DebuggerSettings.xml");
            try
            {
                if (File.Exists(fileName))
                {
                    System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(typeof(DebuggerSettings));

                    DebuggerSettings ud = new DebuggerSettings();
                    using (System.IO.FileStream file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read))
                    {
                        ud = (DebuggerSettings)reader.Deserialize(file);
                        file.Close();
                    }
                    ud.doNotSave = false;
                    return ud;
                }
                return new DebuggerSettings();
            }
            catch (Exception ex)
            {
                ErrorHandler.inst().Error(ex);
                DebuggerSettings ret = new DebuggerSettings();
                ret.doNotSave = false;
                return ret;
            }
            finally { }
        }
Beispiel #3
0
 public SessionData(string aCon)
 {
     inst_           = this;
     connection_     = aCon;
     isConnected_    = false;
     settings_       = DebuggerSettings.LoadSettings();
     callStack_      = new ObservableCollection <Callstack>();
     files_          = new ObservableCollection <FileData>();
     log_            = new ObservableCollection <LogMessage>();
     modules_        = new ObservableCollection <Module>();
     breakpoints_    = new ObservableCollection <Breakpoint>();
     watches_        = new ObservableCollection <WatchValue>();
     currentLine_    = -1;
     currentSection_ = -1;
     isDebugging_    = false;
 }
 public SessionData(string aCon)
 {
     inst_ = this;
     connection_ = aCon;
     isConnected_ = false;
     settings_ = DebuggerSettings.LoadSettings();
     callStack_ = new ObservableCollection<Callstack>();
     files_ = new ObservableCollection<FileData>();
     log_ = new ObservableCollection<LogMessage>();
     modules_ = new ObservableCollection<Module>();
     breakpoints_ = new ObservableCollection<Breakpoint>();
     watches_ = new ObservableCollection<WatchValue>();
     currentLine_ = -1;
     currentSection_ = -1;
     isDebugging_ = false;
 }