예제 #1
0
        public static bool SwitchSheet(string title)
        {
            var tmpSheet = launchedSheets.Where(x => x.spreadSheetName.Contains(title)).FirstOrDefault();

            CurrentSheet = tmpSheet ?? CurrentSheet;
            return(tmpSheet != null);
        }
예제 #2
0
        public static bool SwitchSheet(int id)
        {
            var tmpSheet = launchedSheets.Where(x => x.Id == id).FirstOrDefault();

            CurrentSheet = tmpSheet ?? CurrentSheet;
            return(tmpSheet != null);
        }
예제 #3
0
        public static void Remove(SheetsWrapper wrapper)
        {
            var toRemove = launchedSheets.Where(x => x == wrapper).FirstOrDefault();

            if (toRemove != null)
            {
                Remove(toRemove.Id);
            }
        }
예제 #4
0
        public static SheetsWrapper AddSheet()
        {
            int           assignedId = GetNextId();
            SheetsWrapper wrapper    = new SheetsWrapper(assignedId);

            launchedSheets.Add(wrapper);
            CurrentSheet = wrapper;
            return(wrapper);
        }