private void InitializeControls()
 {
     this.ActionsPane = Globals.Factory.CreateActionsPane(null, null, "ActionsPane", "ActionsPane", this);
     this.plainTextContentControl1    = Globals.Factory.CreatePlainTextContentControl(null, null, "223962647", "plainTextContentControl1", this);
     this.datePickerContentControl1   = Globals.Factory.CreateDatePickerContentControl(null, null, "223962648", "datePickerContentControl1", this);
     this.dropDownListContentControl1 = Globals.Factory.CreateDropDownListContentControl(null, null, "5756239", "dropDownListContentControl1", this);
 }
Пример #2
0
 private void InitializeControls()
 {
     this.ActionsPane        = Globals.Factory.CreateActionsPane(null, null, "ActionsPane", "ActionsPane", this);
     this.nameTextControl    = Globals.Factory.CreatePlainTextContentControl(null, null, "1613397556", "nameTextControl", this);
     this.dropDownControl    = Globals.Factory.CreateDropDownListContentControl(null, null, "836037668", "dropDownControl", this);
     this.salariuTextControl = Globals.Factory.CreatePlainTextContentControl(null, null, "3703803574", "salariuTextControl", this);
     this.oreTextControl     = Globals.Factory.CreatePlainTextContentControl(null, null, "1163434007", "oreTextControl", this);
 }
 private void InitializeControls()
 {
     this.ActionsPane = Globals.Factory.CreateActionsPane(null, null, "ActionsPane", "ActionsPane", this);
     this.plainTextContentControl1    = Globals.Factory.CreatePlainTextContentControl(null, null, "3676458139", "plainTextContentControl1", this);
     this.datePickerContentControl1   = Globals.Factory.CreateDatePickerContentControl(null, null, "3676458140", "datePickerContentControl1", this);
     this.comboBoxContentControl1     = Globals.Factory.CreateComboBoxContentControl(null, null, "3676458141", "comboBoxContentControl1", this);
     this.pictureContentControl1      = Globals.Factory.CreatePictureContentControl(null, null, "3676458142", "pictureContentControl1", this);
     this.plainTextContentControl2    = Globals.Factory.CreatePlainTextContentControl(null, null, "3676458143", "plainTextContentControl2", this);
     this.dropDownListContentControl1 = Globals.Factory.CreateDropDownListContentControl(null, null, "3676458144", "dropDownListContentControl1", this);
     this.richTextContentControl1     = Globals.Factory.CreateRichTextContentControl(null, null, "3676458145", "richTextContentControl1", this);
 }
Пример #4
0
 private void InitializeControls()
 {
     this.ActionsPane              = Globals.Factory.CreateActionsPane(null, null, "ActionsPane", "ActionsPane", this);
     this.txtDescrizione           = Globals.Factory.CreateRichTextContentControl(null, null, "3964439384", "txtDescrizione", this);
     this.txtOggetto               = Globals.Factory.CreateRichTextContentControl(null, null, "3529901788", "txtOggetto", this);
     this.txtNote                  = Globals.Factory.CreateRichTextContentControl(null, null, "1717777112", "txtNote", this);
     this.lbIdRichiesta            = Globals.Factory.CreateRichTextContentControl(null, null, "296500560", "lbIdRichiesta", this);
     this.lbDataInvio              = Globals.Factory.CreateRichTextContentControl(null, null, "2823222331", "lbDataInvio", this);
     this.lbIdTitolo               = Globals.Factory.CreateRichTextContentControl(null, null, "946891539", "lbIdTitolo", this);
     this.lbDataTitolo             = Globals.Factory.CreateRichTextContentControl(null, null, "2287615174", "lbDataTitolo", this);
     this.lbStrumentoTitolo        = Globals.Factory.CreateRichTextContentControl(null, null, "98222052", "lbStrumentoTitolo", this);
     this.lbOggetto                = Globals.Factory.CreateRichTextContentControl(null, null, "2932912823", "lbOggetto", this);
     this.lbDescrizione            = Globals.Factory.CreateRichTextContentControl(null, null, "2574693929", "lbDescrizione", this);
     this.lbNote                   = Globals.Factory.CreateRichTextContentControl(null, null, "3555103920", "lbNote", this);
     this.dropDownStrumenti        = Globals.Factory.CreateDropDownListContentControl(null, null, "117655195", "dropDownStrumenti", this);
     this.lbBozza                  = Globals.Factory.CreateRichTextContentControl(null, null, "3735105531", "lbBozza", this);
     this.plainTextContentControl1 = Globals.Factory.CreatePlainTextContentControl(null, null, "1951277223", "plainTextContentControl1", this);
     this.headerIdRichiesta        = Globals.Factory.CreatePlainTextContentControl(null, null, "4094021969", "headerIdRichiesta", this);
     this.plainTextContentControl3 = Globals.Factory.CreatePlainTextContentControl(null, null, "1736129785", "plainTextContentControl3", this);
     this.plainTextContentControl4 = Globals.Factory.CreatePlainTextContentControl(null, null, "2154937362", "plainTextContentControl4", this);
 }
Пример #5
0
        private void GetBetterImg()
        {
            Range rangeAll = Globals.ThisAddIn.Application.ActiveDocument.Range();

            //range.SetRange(0,0);

            //while(range.End<rangeAll.End)
            //{
            //    range.Start = range.Start + 100;
            //    range.End = range.End + 100;
            //    Globals.ThisAddIn.Application.ActiveWindow.ScrollIntoView(range);
            //}



            object filename = @"D:\BaoProject\高分宝三期\2014届高三数学理科模拟试题(定稿).doc";  //文件保存路径
            Object Nothing  = System.Reflection.Missing.Value;

            Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application();
            Microsoft.Office.Interop.Word.Document    WordDoc = WordApp.Documents.Add(ref filename, ref Nothing, ref Nothing, ref Nothing);


            Range range = WordDoc.Range(0, 500);



            range.Copy();



            rangeAll.Paste();

            rangeAll = Globals.ThisAddIn.Application.ActiveDocument.Range();

            rangeAll.SetRange(rangeAll.End, rangeAll.End);
            rangeAll.Select();

            System.Windows.Point pointend = CaretPos();

            rangeAll.SetRange(0, 0);
            rangeAll.Select();

            Microsoft.Office.Tools.Word.Document document = Globals.Factory.GetVstoObject(Globals.ThisAddIn.Application.ActiveDocument);
            Microsoft.Office.Tools.Word.DropDownListContentControl dropdown = document.Controls.AddDropDownListContentControl(rangeAll, "MyContentControl");
            dropdown.PlaceholderText = "My DropdownList Test";
            dropdown.DropDownListEntries.Add("Test01", "01", 1);
            dropdown.DropDownListEntries.Add("Test02", "02", 2);
            dropdown.DropDownListEntries.Add("Test03", "03", 3);

            rangeAll.SetRange(dropdown.Range.End + 1, dropdown.Range.End + 1);

            System.Drawing.Point o = new System.Drawing.Point(dropdown.Application.Left, dropdown.Application.Top);

            System.Drawing.Point o1 = this.PointToScreen(o);


            rangeAll.SetRange(0, 0);
            rangeAll.Select();

            System.Drawing.Point currentPos = GetPositionForShowing(Globals.ThisAddIn.Application.Selection);
            //Globals.ThisAddIn._FloatingPanel = new FloatingPanel(bookmark);



            rangeAll.Text = rangeAll.Text + "\n" + dropdown.Application.Top + "::::" + dropdown.Application.Left + "\n" + o1.X + "::::::" + o1.Y + "\n" + currentPos.X + "::::::" + currentPos.Y;


            Bitmap image = new Bitmap(currentPos.X, currentPos.Y);

            Graphics g = Graphics.FromImage(image);

            System.Drawing.Point FrmP = new System.Drawing.Point(currentPos.X, currentPos.Y);
            //ScreenP返回相对屏幕的坐标
            System.Drawing.Point ScreenP = this.PointToScreen(FrmP);

            g.CopyFromScreen(0, 0, 0, 0, image.Size);

            image.Save(@"C:\Users\Word\Desktop\3523433.png", System.Drawing.Imaging.ImageFormat.Png);

            int i = 0;
            //Image imgTemp = Metafile.FromStream(new MemoryStream(range.EnhMetaFileBits));

            //imgTemp.Save(@"C:\Users\Word\Desktop\1233.png", System.Drawing.Imaging.ImageFormat.Png);
        }
 private void InitializeControls() {
     this.ActionsPane = Globals.Factory.CreateActionsPane(null, null, "ActionsPane", "ActionsPane", this);
     this.ddlVotingMajority = Globals.Factory.CreateDropDownListContentControl(null, null, "2005466966", "ddlVotingMajority", this);
     this.dtDatePublished = Globals.Factory.CreateDatePickerContentControl(null, null, "588116001", "dtDatePublished", this);
     this.txtTitle = Globals.Factory.CreatePlainTextContentControl(null, null, "1835802928", "txtTitle", this);
 }