コード例 #1
0
 internal static SheetToken Sheet(Chart chart)
 {
     Requires.NotNull(chart, nameof(chart));
     return(new SheetToken(
                id: IdFactory.Sheet(chart),
                isActive: chart.IsActive(),
                isVisible: chart.IsVisible(),
                index: chart.Index,
                tabColor: chart.TabColor()));
 }
コード例 #2
0
 internal static SheetToken Sheet(Worksheet sheet)
 {
     Requires.NotNull(sheet, nameof(sheet));
     return(new SheetToken(
                id: IdFactory.Sheet(sheet),
                isActive: sheet.IsActive(),
                isVisible: sheet.IsVisible(),
                index: sheet.Index,
                tabColor: sheet.TabColor()));
 }
コード例 #3
0
        internal static WindowToken Window(Window win)
        {
            Requires.NotNull(win, nameof(win));

            object activeSheet = win.ActiveSheet;

            Debug.Assert(activeSheet != null);
            var activeSheetId = activeSheet != null?IdFactory.Sheet(activeSheet) : null;

            return(new WindowToken(
                       id: IdFactory.Window(win),
                       isActive: win.IsActive(),
                       isVisible: win.Visible,
                       state: ConvertState(win.WindowState),
                       activeSheetId: activeSheetId));
        }