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);
     }
 }
Ejemplo n.º 3
0
 public UserInfo FindSystemUser()
 {
     using (_svc = new SimpleClient<IAdministrationService>())
     {
         try
         {
             _svc.Open();
         }
         catch (Exception /*ex*/)
         {
             NoConnectionException error = new NoConnectionException();
             throw error;
         }
         return _svc.Channel.FindSystemUser();
     }
 }
Ejemplo n.º 4
0
        //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;
            }
        }
Ejemplo n.º 5
0
 public PresentationInfoExt[] LoadPresentationWithOneSlide()
 {
     using (_svc = new SimpleClient<IAdministrationService>())
     {
         try
         {
             _svc.Open();
         }
         catch (Exception /*ex*/)
         {
             NoConnectionException error = new NoConnectionException();
             throw error;
         }
         return _svc.Channel.LoadPresentationWithOneSlide();
     }
 
 }
Ejemplo n.º 6
0
        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);
                }

            }
        }
Ejemplo n.º 7
0
 public ISystemParameters LoadSystemParameters()
 {
     using (_svc = new SimpleClient<IAdministrationService>())
     {
         try
         {
             _svc.Open();
         }
         catch (Exception /*ex*/)
         {
             NoConnectionException error = new NoConnectionException();
             throw error;
         }
         return _svc.Channel.LoadSystemParameters();
     }
 }
Ejemplo n.º 8
0
 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;         
         }
     }
 }
Ejemplo n.º 9
0
 public Label[] GetLabelStorage()
 {
     using (_svc = new SimpleClient<IAdministrationService>())
     {
         try
         {
             _svc.Open();
         }
         catch (Exception /*ex*/)
         {
             NoConnectionException error = new NoConnectionException();
             throw error;
         }
         return _svc.Channel.GetLabelStorage();
     }
 }
Ejemplo n.º 10
0
 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);
     }
 }