Пример #1
0
        public IApplicationApi CreateApplicationApi(object application)
        {
            if (ApplicationApi == null)
            {
                ApplicationObject = application;

                if (application is Word.Application)
                {
                    ApplicationApi = new WordApi((Word.Application)application);
                }
                else if (application is Excel.Application)
                {
                    ApplicationApi = new ExcelApi((Excel.Application)application);
                }
                else if (application is PowerPoint.Application)
                {
                    ApplicationApi = new PowerPointApi((PowerPoint.Application)application);
                }
                else if (application is Outlook.Application)
                {
                    ApplicationApi = new OutlookApi((Outlook.Application)application);
                }
                else if (application is Access.Application)
                {
                    ApplicationApi = new AccessApi((Access.Application)application);
                }
            }

            return(ApplicationApi);
        }
Пример #2
0
        public void Initialize(CustomTaskPane ctp, IApplicationApi api)
        {
            _taskPane = ctp;

            _taskPaneView = new TaskPaneView();
            _taskPaneViewModel = new TaskPaneViewModel(api) { CloseAction = delegate { Visible = false; } };
            _taskPaneView.DataContext = _taskPaneViewModel;

            elementHost.Child = _taskPaneView;
        }
        public GetAndExistApplicationStory()
        {
            Console.WriteLine("=================Setup===================");

            base.GlobalSetup();

            createdApplicationIds = new List<Guid>();

            _applicationApi = SpringContext.Current.GetObject<IApplicationApi>();

            Console.WriteLine("============Ending Setup===================");
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="authenticationContext"></param>
        /// <param name="applicationApi"></param>
        public SaaSFramePageLayout(IAuthenticationContext authenticationContext, IApplicationApi applicationApi)
        {
            this.authenticationContext = authenticationContext;
            this.applicationApi = applicationApi;

            ApplicationObject application = this.applicationApi.Get(authenticationContext.ApplicationId);
            string framePageLayout = application["FramePageLayout"] as string;
            if (string.Equals(framePageLayout, "LeftNavigation", StringComparison.OrdinalIgnoreCase))
                this.compositeFramePageLayout = new LeftNavigationBarFramePageLayout();
            else if (string.Equals(framePageLayout, "TopNavigation", StringComparison.OrdinalIgnoreCase))
                this.compositeFramePageLayout = new TopNavigationMenuFramePageLayout();
            else
                this.compositeFramePageLayout = new LeftNavigationBarFramePageLayout();
        }
Пример #5
0
        public void Initialize(IApplicationApi api)
        {
            _api = api;
            var tab   = _api.MainRibbon.AddTabToRibbon("My Plugin", this);
            var group = new RibbonGroup {
                Header = "Document"
            };
            var button = new RibbonButton()
            {
                Label = "New Document"
            };

            button.SetBinding(RibbonButton.CommandProperty, new Binding("CreateDocument"));
            group.Items.Add(button);
            tab.Items.Add(group);


            var pane = new PluginPane();

            api.CreateToolPane(pane, new TestPluginPaneViewModel(api));
        }
        public void Setup()
        {
            base.GlobalSetup();

            createdApplicationIds = new List<Guid>();

            _applicationApi = SpringContext.Current.GetObject<IApplicationApi>();
        }
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="applicationApi"></param>
 /// <param name="applicationNameRouter"></param>
 public MockedAuthenticationContext(IApplicationApi applicationApi, IApplicationNameRouter applicationNameRouter)
 {
     this.applicationApi = applicationApi;
     this.applicationNameRouter = applicationNameRouter;
 }
Пример #8
0
 public TestPluginPaneViewModel(IApplicationApi api)
 {
     _api = api;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationInstaller"/> class.
 /// </summary>
 /// <param name="applicationApi">The application API.</param>
 /// <param name="applicationObjectTemplate">The application object template.</param>
 public ApplicationInstaller(IApplicationApi applicationApi, ApplicationObject applicationObjectTemplate)
 {
     this.applicationApi = applicationApi;
     this.applicationObjectTemplate = applicationObjectTemplate;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="applicationApi">Application API</param>
 public ApplicationInstaller(IApplicationApi applicationApi)
 {
     this.applicationApi = applicationApi;
     this.applicationObjectTemplate = new ApplicationObject();
 }
 /// <summary>
 /// Http authentication context instance
 /// </summary>
 /// <param name="applicationApi"></param>
 public HttpAuthenticationContext(IApplicationApi applicationApi)
 {
     this.applicationApi = applicationApi;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="xmlConfigDirectoryPath">The directory stores web resource xml configuration files.</param>
 /// <param name="authenticationContext">authentication context</param>
 /// <param name="applicationApi">application Api</param>
 public SaaSWebResourceManager(string xmlConfigDirectoryPath, IAuthenticationContext authenticationContext, IApplicationApi applicationApi)
     : base(xmlConfigDirectoryPath)
 {
     this.authenticationContext = authenticationContext;
     this.applicationApi = applicationApi;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="applicationApi"></param>
 /// <param name="platformConfiguration"></param>
 public CredentialInstaller(IApplicationApi applicationApi, IPlatformConfiguration platformConfiguration)
 {
     this.applicationApi = applicationApi;
     this.platformConfiguration = platformConfiguration;
 }
Пример #14
0
 public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
 {
     _applicationApi = Globals.Instance.CreateApplicationApi(application);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="authenticationContext"></param>
 /// <param name="applicationApi"></param>
 public SaaSClientTimeZoneLoader(IAuthenticationContext authenticationContext, IApplicationApi applicationApi)
 {
     this.authenticationContext = authenticationContext;
     this.applicationApi = applicationApi;
 }
 public SchedullerController(IApplicationApi service)
     : base()
 {
     this.service = service;
 }
Пример #17
0
 public TaskPaneViewModel(IApplicationApi api)
 {
     _applicationApi = api;
 }