public void Export(PresentationInfo[] presentationInfos) { ExportPresentation exportPresentation = new ExportPresentation( DesignerClient.Instance.ClientConfiguration, DesignerClient.Instance.PresentationWorker, DesignerClient.Instance.StandalonePresentationWorker, this); using (SimpleClient<IDesignerService> client = new SimpleClient<IDesignerService>()) { client.Open(); exportPresentation.Export(presentationInfos, client.Channel); } }
public void Export() { ExportConfiguration exportConfiguration = new ExportConfiguration( DesignerClient.Instance.ClientConfiguration, DesignerClient.Instance.StandalonePresentationWorker, DesignerClient.Instance.PresentationWorker, SuccessMessage, ErrorMessage, GetFileNameForConfiguration); using (SimpleClient<IDesignerService> client = new SimpleClient<IDesignerService>()) { client.Open(); exportConfiguration.Export(client.Channel); } }
public UserInfo FindSystemUser() { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { NoConnectionException error = new NoConnectionException(); throw error; } return _svc.Channel.FindSystemUser(); } }
//public IClientConfiguration ClientConfiguration //{ //get { return _configuration; } //} public bool Initialize(IClientConfiguration configuration) { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { return false; } _configuration = configuration; return true; } }
public PresentationInfoExt[] LoadPresentationWithOneSlide() { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { NoConnectionException error = new NoConnectionException(); throw error; } return _svc.Channel.LoadPresentationWithOneSlide(); } }
public void SaveSystemParameters(ISystemParameters systemParameters) { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { NoConnectionException error = new NoConnectionException(); throw error; } try { _svc.Channel.SaveSystemParameters(systemParameters); } catch (FaultException Ex) { throw new SystemParametersSaveException(Ex.Message); } } }
public ISystemParameters LoadSystemParameters() { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { NoConnectionException error = new NoConnectionException(); throw error; } return _svc.Channel.LoadSystemParameters(); } }
private LabelError LabelHandler(string proc, Label labelInfo) { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { NoConnectionException error = new NoConnectionException(); throw error; } Type channel = typeof(ILabelService); MethodInfo method = channel.GetMethod(proc, new Type[] { typeof(Label) }); object[] parameters = {labelInfo}; try { return (LabelError)method.Invoke(_svc.Channel, parameters); } catch (TargetInvocationException tiEx) { if (tiEx.InnerException is FaultException<LabelUsedInPresentationException>) { throw new LabelUsedInPresentationException(((FaultException<LabelUsedInPresentationException>)tiEx.InnerException).Detail.Message); } throw tiEx; } } }
public Label[] GetLabelStorage() { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { NoConnectionException error = new NoConnectionException(); throw error; } return _svc.Channel.GetLabelStorage(); } }
private UserError UserHandler(string proc, UserInfo userInfo) { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { NoConnectionException error = new NoConnectionException(); throw error; } Type channel = typeof(IUserService); MethodInfo method = channel.GetMethod(proc, new Type[] { typeof(UserInfo)}); object[] parameters ={userInfo}; return (UserError)method.Invoke(_svc.Channel, parameters); } }