示例#1
0
 public void Execute(Arguments arguments)
 {
     try
     {
         ExcelManager.RemoveInstance();
     }
     catch (Exception ex)
     {
         throw new ApplicationException($"Error occured while closing current excel instance. Message: '{ex.Message}'", ex);
     }
 }
示例#2
0
 public void Execute(Arguments arguments)
 {
     try
     {
         ExcelManager.SwitchExcel(arguments.Id.Value);
     }
     catch (Exception ex)
     {
         throw new ApplicationException($"Problem occured while switching to another excel instance. Id: '{arguments.Id.Value}'. Message: '{ex.Message}'");
     }
 }
示例#3
0
 public void Execute(Arguments arguments)
 {
     try
     {
         ExcelWrapper excelWrapper = ExcelManager.CreateInstance();
         excelWrapper.Open(arguments.Path?.Value, arguments.Sheet?.Value, !arguments.InBackground.Value);
         Scripter.Variables.SetVariableValue(arguments.Result.Value, new Language.IntegerStructure(excelWrapper.Id));
     }
     catch (Exception ex)
     {
         throw new ApplicationException($"Problem occured while opening excel instance. Path: '{arguments.Path.Value}', Sheet: '{arguments.Sheet?.Value}', InBackground: '{arguments.InBackground.Value}'", ex);
     }
 }
示例#4
0
 private void WindowDeactivated(Workbook wb, Window wn)
 {
     ExcelManager.RemoveInstance(Id);
     Close();
 }