예제 #1
0
        public CustomFormRegion1(Outlook.FormRegion formRegion) : base(formRegion)
        {
            MSForms.UserForm form = formRegion.Form as MSForms.UserForm;
            _textBox1       = form.Controls["TextBox1"].To <Outlook.OlkTextBox>();
            _commandButton1 = form.Controls["CommandButton1"].To <Outlook.OlkCommandButton>();

            if (null != _commandButton1)
            {
                _commandButton1.ClickEvent += CommandButton1_ClickEvent;
            }
        }
예제 #2
0
 public virtual void BeforeFormRegionShow(object formRegion)
 {
     try
     {
         FormRegion     form     = new Outlook.FormRegion(null, formRegion);
         OpenFormRegion openForm = OnCreateOpenFormRegion(form);
         if (null == openForm)
         {
             openForm = new OpenFormRegion(form);
         }
         openForm.Close += OpenForm_Close;
         OpenFormRegions.Add(openForm);
         OnFormRegionOpen(openForm);
     }
     catch (NetRuntimeSystem.Exception exception)
     {
         OnOutlookError(OutlookErrorMethodKind.BeforeFormRegionShow, exception);
     }
 }
예제 #3
0
        public void BeforeFormRegionShow(Outlook.FormRegion FormRegion)
        {
            this.FormRegion = FormRegion;
            this.UserForm = FormRegion.Form as UserForm;

            System.Diagnostics.Debug.Write("BeforeFormRegionShow");

            try
            {
                //System.Diagnostics.Debug.Write("BeforeFormRegionShow 1");
                CommandButton1 = UserForm.Controls.Item("CommandButton1") as Outlook.OlkCommandButton;
                //System.Diagnostics.Debug.Write("BeforeFormRegionShow 2");
                CommandButton1.Click += new Outlook.OlkCommandButtonEvents_ClickEventHandler(CommandButton1_Click);
                CommandButton2 = UserForm.Controls.Item("CommandButton2") as Outlook.OlkCommandButton;
                CommandButton2.Click += new Outlook.OlkCommandButtonEvents_ClickEventHandler(CommandButton2_Click);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #4
0
 public virtual void BeforeFormRegionShow(NetOffice.OutlookApi.FormRegion formRegion)
 {
     InvokerService.InvokeInternal.ExecuteMethod(this, "BeforeFormRegionShow", formRegion);
 }
예제 #5
0
 protected override OpenFormRegion OnCreateOpenFormRegion(Outlook.FormRegion form)
 {
     return(new CustomFormRegion1(form));
 }