sábado, 25 de julho de 2015

MT2 Add in

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Windows.Forms;
using System.Net;
using System.Threading;
using System.Drawing;
using PopupControl;
using MessageBoxExample;
using Microsoft.Win32;
using mshtml;





namespace MT_addin
{
    [ComVisible(true),
    ClassInterfaceAttribute(ClassInterfaceType.AutoDual),
    GuidAttribute(MT_addin.PLUGIN_GUID),
    ProgIdAttribute(MT_addin.PLUGIN_PROGID)]

    public class MT2_addinMT.Host
    {
        public static IE_addin HostInstance = null;
        public List<string> getPartenersList = new List<string>();
        public List<string> getNonPartenersList = new List<string>();
        public List<string> repeated = new List<string>();
        public System.Windows.Forms.WebBrowser webBrowser = null;
        public static IWebBrowser2 browser;
        Popup complex;
        public String urlForMain = string.Empty;
        public MT2_addin()

            : base()


.
.
.
.
.
Under Construction...


..
.
.
.
public static Control GetPostBackControl(Page page)
        {
            Control control = null;

            string ctrlname = page.Request.Params.Get("__EVENTTARGET");

            if (!string.IsNullOrEmpty(ctrlname))
            {
                control = page.FindControl(ctrlname);
            }
            else
            {
                foreach (string ctl in page.Request.Form)
                {
                    Control c = page.FindControl(ctl);
                    if (c is System.Web.UI.WebControls.Button)
                    {
                        control = c;
                        break;
                    }
                }
            }
            return control;
        }


Postar um comentário