Esempio n. 1
0
 internal void RaiseOnOnDocumentOpened(object sender, _DFramerCtlEvents_OnDocumentOpenedEvent e)
 {
     if ((this.OnDocumentOpened != null))
     {
         this.OnDocumentOpened(sender, e);
     }
 }
 private void DocumentOpened(object sender, _DFramerCtlEvents_OnDocumentOpenedEvent e)
 {
     System.Threading.ThreadPool.QueueUserWorkItem((state) =>
     {
         System.Threading.Thread.Sleep(500);
         this.Dispatcher.Invoke((Action)(() =>
         {
             masker.Height = 0;
             framer.Activate();
         }));
     });
 }
        private void DocumentOpened(object sender, _DFramerCtlEvents_OnDocumentOpenedEvent e)
        {
            // When a new document is opened, update the selection of the combobox
            // to match the document type. The following approach is not necessarily
            // accurate since it makes assumptions on the document type based on its
            // file extension. It also assumes that the office programs are listed
            // alphabetically in the OfficePrograms XmlDataProvider.  But its good
            // enough for demo purposes.
            switch (System.IO.Path.GetExtension(e.file).ToLower())
            {
            case ".xls":
            case ".xlsx":
            case ".xlsm":
            case ".xlsb":
            case ".csv":
                OfficeProgram.SelectedIndex = 0;
                break;

            case ".ppt":
            case ".pptx":
            case ".pptm":
                OfficeProgram.SelectedIndex = 1;
                break;

            case ".vsd":
            case ".vdx":
                OfficeProgram.SelectedIndex = 2;
                break;

            case ".doc":
            case ".docx":
            case ".docm":
            case ".rtf":
                OfficeProgram.SelectedIndex = 3;
                break;
            }
        }
Esempio n. 4
0
        public virtual void OnDocumentOpened(string file, object document)
        {
            _DFramerCtlEvents_OnDocumentOpenedEvent ondocumentopenedEvent = new _DFramerCtlEvents_OnDocumentOpenedEvent(file, document);

            this.parent.RaiseOnOnDocumentOpened(this.parent, ondocumentopenedEvent);
        }