コード例 #1
0
        private void SaveLayoutToStream(Stream stream)
        {
            object state = _form.BeginSavingLayout();

            try
            {
                Layout layout = _form.GetLayout();
                LayoutUtil.LayoutToStream(layout, stream);
            }
            finally
            {
                _form.EndSavingLayout(state);
            }
        }
コード例 #2
0
        private void LoadLayoutFromStream(Stream stream)
        {
            object state = _form.BeginLoadingLayout();

            try
            {
                _form.ApplyLayout(LayoutUtil.StreamToLayout(stream) ?? Layout.Default);
                _form.BeginSorting();
                SortBy();
            }
            finally
            {
                _form.EndLoadingLayout(state);
            }
        }