private static void Button_Click(CommandBarButton Ctrl, ref bool CancelDefault) { Microsoft.Office.Interop.Excel.Range activeCell = ExcelApp.Application.ActiveCell; ExcelWvvm.Entities.GoogleHistory history = MainThreadLogic.EntityOperatior.GetHistoryByRange(activeCell); if (history != null) { MainThreadLogic.EntityOperatior.ShowRefreshingComment(history); history.OnRetrievedDataHandler = History_OnRetrievedData; history.ExecuteAsync(); } }
public static void SetContentMenu() { Microsoft.Office.Interop.Excel.Range activeCell = ExcelApp.Application.ActiveCell; bool isThereHistory = false; ExcelWvvm.Entities.GoogleHistory result = MainThreadLogic.EntityOperatior.GetHistoryByRange(activeCell); if (result != null) { isThereHistory = true; } setContentMenuStatus(isThereHistory); }
private static void History_OnRetrievedData(ExcelWvvm.Entities.GoogleHistory history, object[,] result) { NonMainThreadLogic.EntityManager.WriteToRange(result, history); }