示例#1
0
        public WorkspaceService()
        {
            List <Workspace> workspaces = ServiceHolder.GetService <JSONUtilsService>().Deserialize <List <Workspace> >(Workspace.FILE_PATH) ?? new List <Workspace>();

            foreach (var ws in workspaces)
            {
                ws.OnSlavesChanged += Workspace_OnSlavesChanged;
                WorkspaceViewModel vm = new WorkspaceViewModel(ws);
                Workspaces.Add(ws, vm);
            }
        }
示例#2
0
 private void Workspace_OnSlavesChanged(object sender)
 {
     ServiceHolder.GetService <JSONUtilsService>().Serialize(Workspace.FILE_PATH, sender);
 }