|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Selen.WorkflowDesigner.Contracts;
using System.Diagnostics;
using RehostedDesigner.ToolboxModule.Contracts;
using Selen.WorkflowDesigner.Storage.Contracts;
namespace Selen.WorkflowTypeManagementModule.ViewModels
{
public class ReloadToolbox
{
private IToolboxViewModel toolboxViewModel;
private IMainViewModel mainViewModel;
public ReloadToolbox(IMainViewModel mainViewModel, IToolboxViewModel toolboxViewModel)
{
this.toolboxViewModel = toolboxViewModel;
this.mainViewModel = mainViewModel;
}
public bool LoadToolbox(IWorkflowType type)
{
try
{
this.toolboxViewModel.ReloadToolboxIcons(type.ToolboxCreatorService);
return true;
}
catch (ApplicationException apEx)
{
this.mainViewModel.On_DisplayErrors(new DesignerErrorDefinition[] { new DesignerErrorDefinition() { ErrorMessage = "Toolbox error: " + apEx.Message } });
Trace.TraceError(apEx.ToString());
return false;
}
catch (Exception ex)
{
this.mainViewModel.On_DisplayErrors(new DesignerErrorDefinition[] { new DesignerErrorDefinition() { ErrorMessage = "Toolbox error: internal error" } });
Trace.TraceError(ex.ToString());
return false;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.