예제 #1
0
        public static void ActivateLicense(Model.IMailGoPG v_mailgo, string v_license_id, out bool v_request, out bool v_activate, out Model.IEmail v_email)
        {
            v_request  = false;
            v_activate = false;
            v_email    = new Model.MEmail();

            v_mailgo.Track.Debug("Start showing activation license");

            ActivateLicenseWF t_form   = new ActivateLicenseWF(v_mailgo, v_license_id);
            DialogResult      t_result = t_form.ShowDialog();

            v_mailgo.Track.Debug("Dialog result : " + t_result.ToString());

            if (t_result == DialogResult.OK)
            {
                v_activate = true;
            }
            else if (t_result == DialogResult.Ignore)
            {
                v_request = true;
                v_email.TO.AddRange(sm_request_email.TO.ToArray());
                v_email.Subject = sm_request_email.Subject;
                v_email.Body    = sm_request_email.Body;
            }

            v_mailgo.Track.Debug("Finish showing activation license");
        }
예제 #2
0
        private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {
            log4net.Config.XmlConfigurator.Configure();
            System.Threading.Thread.CurrentThread.CurrentCulture   = new System.Globalization.CultureInfo("ja-JP");
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ja-JP");
            m_mailgo = new MailGoPG(Globals.ThisAddIn.Application);
            MailGoPG mailGO = (MailGoPG)m_mailgo;

            mailGO.cmdMailGO = this.cmdMailGO;
            mailGO.cmdOption = this.cmdOption;
            m_mailgo.Startup();

            this.cmdMailGO.Label     = "MailGO  -  オン";
            this.cmdMailGO.ScreenTip = "オフにする";
            this.cmdOption.Label     = "オプション";
            this.cmdOption.ScreenTip = "オプション";

            Globals.ThisAddIn.Application.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(app_ItemSend);

            try
            {
                //this.group1.Label = String.Format(
                //this.group1.Label, "IT");
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #3
0
        public ActivationPG(Model.IMailGoPG v_mailgo, OL.Application v_outlook, OT.Ribbon.RibbonButton cmdBtn, OT.Ribbon.RibbonButton optBtn) : base(v_mailgo)
        {
            this.m_mailgo.Track.Debug("ACTIVATION: Creating package ...");

            this.m_outlook = v_outlook;
            this.OnLoadOption();

            this.cmdMailGO = cmdBtn;
            this.cmdOption = optBtn;
            this.CreateToolbar();

            this.cmdMailGO.Enabled = true;
            this.cmdOption.Enabled = true;

            if (IsFirstUse())
            {
                string strLang = System.Threading.Thread.CurrentThread.CurrentCulture.EnglishName;
                if (strLang.IndexOf("Japanese") >= 0 || strLang.IndexOf("Japan") >= 0)
                {
                    SetLanguage("ja-JP");
                }
                else
                {
                    SetLanguage("en-US");
                }
                SetFirstUse();
                //Should set default language.
            }

            GetLanguage();
            if (m_language == "ja-JP")
            {
                System.Threading.Thread.CurrentThread.CurrentCulture   = new System.Globalization.CultureInfo("ja-JP");
                System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ja-JP");
            }
            else
            {
                System.Threading.Thread.CurrentThread.CurrentCulture   = new System.Globalization.CultureInfo("en-US");
                System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
            }

            m_startedTime = this.GetFirstUseTime();
            m_deadLine    = m_startedTime.AddDays(14);
            //check license
            this.GetActivated();

            m_bActivatedReally = m_bActivated;

            if (m_bActivated == false)
            {
                if (DateTime.Now < m_deadLine)
                {
                    m_bActivated = true;
                }
            }

            m_status = m_bActivated;
            refreshUIs();
        }
예제 #4
0
파일: Share.cs 프로젝트: ksy0625/MailGo
 public static Model.ILicensePG CreatePG(Model.IMailGoPG v_mailgo)
 {
     if (Ready)
     {
         return(new LicensePG(v_mailgo));
     }
     else
     {
         return(null);
     }
 }
예제 #5
0
 public static Model.IAddressPG CreatePG(Model.IMailGoPG v_mailgo)
 {
     if (Ready)
     {
         return(new AddressPG(v_mailgo));
     }
     else
     {
         return(null);
     }
 }
예제 #6
0
파일: Share.cs 프로젝트: ksy0625/MailGo
 public static Model.IActivationPG CreatePG(Model.IMailGoPG v_mailgo, OL.Application v_outlook, OT.Ribbon.RibbonButton cmdBtn, OT.Ribbon.RibbonButton optBtn)
 {
     if (Ready)
     {
         g_ActivationPG = new ActivationPG(v_mailgo, v_outlook, cmdBtn, optBtn);
         return(g_ActivationPG);
     }
     else
     {
         return(null);
     }
 }
예제 #7
0
        public ActivationPG(Model.IMailGoPG v_mailgo, OL.Application v_outlook, OT.Ribbon.RibbonButton cmdBtn, OT.Ribbon.RibbonButton optBtn) : base(v_mailgo)
        {
            this.m_mailgo.Track.Debug("ACTIVATION: Creating package ...");

            this.m_outlook = v_outlook;
            this.OnLoadOption();

            this.cmdMailGO = cmdBtn;
            this.cmdOption = optBtn;
            this.CreateToolbar();

            this.m_timer_load          = new System.Timers.Timer(10);
            this.m_timer_load.Elapsed += new System.Timers.ElapsedEventHandler(TimerLoad_Elapsed);
            this.m_timer_load.Start();
            this.m_mailgo.Track.Debug("ActivationPG: Start already.");
        }
예제 #8
0
        public OptionWF(Model.IMailGoPG v_mailgo)
        {
            this.m_mailgo = v_mailgo;
            InitializeComponent();

            cmbLanguage.Items.Add("English");
            cmbLanguage.Items.Add("日本語");

            if (m_mailgo.Activation.Language == "ja-JP")
            {
                cmbLanguage.SelectedIndex = 1;
            }
            else
            {
                cmbLanguage.SelectedIndex = 0;
            }
        }
예제 #9
0
        private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {
            log4net.Config.XmlConfigurator.Configure();
            m_mailgo = new MailGoPG(Globals.ThisAddIn.Application);
            MailGoPG mailGO = (MailGoPG)m_mailgo;

            mailGO.cmdMailGO = this.cmdMailGO;
            mailGO.cmdOption = this.cmdOption;
            m_mailgo.Startup();
            Globals.ThisAddIn.Application.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler(app_ItemSend);

            try
            {
                //this.group1.Label = String.Format(
                //this.group1.Label, "IT");
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #10
0
 public LicensePG(Model.IMailGoPG v_mailgo) : base(v_mailgo)
 {
 }
예제 #11
0
 public LicenseWF(Model.IMailGoPG v_mailgo)
 {
     this.m_mailgo             = v_mailgo;
     this.m_evaluation_license = this.m_mailgo.License.GenerateLicenseID(true, 30);
     InitializeComponent();
 }
예제 #12
0
 public ActivateLicenseWF(Model.IMailGoPG v_mailgo, string v_license_id)
 {
     this.m_mailgo     = v_mailgo;
     this.m_license_id = v_license_id;
     InitializeComponent();
 }
예제 #13
0
파일: Connect.cs 프로젝트: ksy0625/MailGo
 /// <summary>
 ///      Implements the OnStartupComplete method of the IDTExtensibility2 interface.
 ///      Receives notification that the host application has completed loading.
 /// </summary>
 /// <param term='custom'>
 ///      Array of parameters that are host application specific.
 /// </param>
 /// <seealso class='IDTExtensibility2' />
 public void OnStartupComplete(ref System.Array custom)
 {
     this.m_mailgo = new MailGoPG((OL.Application)applicationObject);
     this.m_mailgo.Startup();
 }
예제 #14
0
 public OptionWF(Model.IMailGoPG v_mailgo, DateTime?v_deadline)
 {
     this.m_mailgo   = v_mailgo;
     this.m_deadline = v_deadline;
     InitializeComponent();
 }
예제 #15
0
파일: Share.cs 프로젝트: faizalshaik/MailGo
 public static Model.IAddressPG CreatePG(Model.IMailGoPG v_mailgo)
 {
     return(new AddressPG(v_mailgo));
 }
예제 #16
0
파일: CheckerWF.cs 프로젝트: ksy0625/MailGo
 public CheckerWF(Model.IMailGoPG v_mailgo)
 {
     this.m_mailgo = v_mailgo;
     InitializeComponent();
 }
예제 #17
0
 public AddressPG(Model.IMailGoPG v_mailgo) : base(v_mailgo)
 {
 }
예제 #18
0
 public static Model.ILicensePG CreatePG(Model.IMailGoPG v_mailgo)
 {
     return(new LicensePG(v_mailgo));
 }
예제 #19
0
 public ActivateLicenseWF(Model.IMailGoPG v_mailgo)
 {
     this.m_mailgo = v_mailgo;
     InitializeComponent();
 }
예제 #20
0
 public InstallLicenseWF(Model.IMailGoPG v_mailgo)
 {
     this.m_mailgo = v_mailgo;
     InitializeComponent();
 }