Beispiel #1
0
        /// <summary>
        /// Makes the login to the server, using the ConnectionSettingsForm
        /// or the last stored credentials.
        /// </summary>
        private void InitializeAddin()
        {
            //Set encoding to ISO-8859-1(Western)
            Application.Options.DefaultTextEncoding = Microsoft.Office.Core.MsoEncoding.msoEncodingWestern;
            this.SaveFormat         = Word.WdSaveFormat.wdFormatHTML;
            this.AddinStatus.Syntax = this.DefaultSyntax;

            timer = new System.Timers.Timer(TIMER_INTERVAL);
            //Repositories and temporary files settings
            if (XOfficeCommonSettingsHandler.HasSettings())
            {
                XOfficeCommonSettings addinSettings = XOfficeCommonSettingsHandler.GetSettings();
                this.DownloadedAttachmentsRepository = addinSettings.DownloadedAttachmentsRepository;
                this.PagesRepository = addinSettings.PagesRepository;
                this.clientType      = addinSettings.ClientType;
            }
            else
            {
                this.PagesRepository = Path.GetTempPath();
                this.DownloadedAttachmentsRepository = Path.GetTempPath();
                this.clientType = XWikiClientType.XML_RPC;
            }
            timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
            timer.Start();

            InitializeEventsHandlers();

            //Authentication settings
            if (!AutoLogin())
            {
                ShowConnectToServerUI();
            }
            addinActionsDispatcher = new AddinActionsDispatcher(this);
            Log.Success("XWord initialized!");
        }
Beispiel #2
0
        /// <summary>
        /// Makes the login to the server, using the ConnectionSettingsForm
        /// or the last stored credentials.
        /// </summary>
        private void InitializeAddin()
        {
            //Set encoding to ISO-8859-1(Western)
            Application.Options.DefaultTextEncoding = Microsoft.Office.Core.MsoEncoding.msoEncodingWestern;
            this.SaveFormat = Word.WdSaveFormat.wdFormatHTML;
            this.AddinStatus.Syntax = this.DefaultSyntax;

            timer = new System.Timers.Timer(TIMER_INTERVAL);
            //Repositories and temporary files settings
            if (XOfficeCommonSettingsHandler.HasSettings())
            {
                XOfficeCommonSettings addinSettings = XOfficeCommonSettingsHandler.GetSettings();
                this.DownloadedAttachmentsRepository = addinSettings.DownloadedAttachmentsRepository;
                this.PagesRepository = addinSettings.PagesRepository;
                this.clientType = addinSettings.ClientType;
            }
            else
            {
                this.PagesRepository = Path.GetTempPath();
                this.DownloadedAttachmentsRepository = Path.GetTempPath();
                this.clientType = XWikiClientType.XML_RPC;
            }
            timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
            timer.Start();

            InitializeEventsHandlers();

            //Authentication settings
            if (!AutoLogin())
            {
                ShowConnectToServerUI();
            }
            addinActionsDispatcher = new AddinActionsDispatcher(this);
            Log.Success("XWord initialized!");
        }
 public ViewPageAttachmentsFormManager(ref ViewPageAttachmentsForm viewPageAttachmentsForm)
 {
     this.viewPageAttachmentsForm = viewPageAttachmentsForm;
     this.addinActions = Globals.XWord2003AddIn.AddinActions;
     this.client = Globals.XWord2003AddIn.Client;
 }
Beispiel #4
0
 public ViewPageAttachmentsFormManager(ref ViewPageAttachmentsForm viewPageAttachmentsForm)
 {
     this.viewPageAttachmentsForm = viewPageAttachmentsForm;
     this.addinActions            = Globals.XWord2003AddIn.AddinActions;
     this.client = Globals.XWord2003AddIn.Client;
 }