Пример #1
0
        public static AppSettings GetSettings()
        {
            AppSettings result;

            try
            {
                throw new Exception("Use fake settings");
                string settings = FileTool.ReadFile(StorageDefs.AppSettings);
                result = JsonStorage.DeserializeWithType <AppSettings>(settings);
            }
            catch (Exception ex)
            {
                //throw;
                result = new AppSettings()
                {
                    WindowHeight = 500.0,
                    WindowWidth  = 650.0,
                    WinTop       = 200,
                    WinLeft      = 200,
                    WinState     = WindowState.Normal,
                    TreeWidth    = new GridLength(200.0),
                    Nodes        = new ObservableCollection <INode>(FakeTreeModel.GetNodes())
                };
            }
            return(result);
        }