Exemplo n.º 1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            FormSettings.LoadSettings(this);

            var dinf = new DirectoryInfo(workspaceDirectory);

            if (!dinf.Exists)
            {
                dinf.Create();
            }
            var files = dinf.GetFiles().Where(x => x.FullName.Contains("Workspace_")).OrderBy(c => c.CreationTime);

            foreach (var file in files)
            {
                try
                {
                    var deserialized = JsonConvert.DeserializeObject <Workspace>(File.ReadAllText(file.FullName));
                    addSendWorkspace(deserialized);
                }
                catch
                {
                    // invalid json
                }
            }

            if (tabSendWorkspaces.TabPages.Count < 1)
            {
                addSendWorkspace(null);
            }
        }
Exemplo n.º 2
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            FormSettings.LoadSettings(this);

            if (tabMain.TabPages.Count < 1)
            {
                addWorkspace(null);
            }
        }