コード例 #1
0
ファイル: Program.cs プロジェクト: ModernSteward/plugins
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            CustomPlugin cp = new CustomPlugin();
            cp.Initialize();

            GMailIntegration mail = new GMailIntegration(cp.GmailUsername, cp.GmailPassword);
            Console.WriteLine("New mails: {0}", mail.NewMessagesCount);

            for (int i = 0; i < mail.Entries.Count; ++i)
            {
                Console.WriteLine("{0} {1} {2}", mail.Entries[i].FromEmail, mail.Entries[i].Id, mail.Entries[i].Link);
            }

            try
            {
                ShowMessages showMessagesForm = new ShowMessages(mail.Entries);
                showMessagesForm.Show();
            }
            catch
            {
                ShowMessages showMessagesForm = new ShowMessages(false);
                showMessagesForm.Show();
            }

            Console.ReadLine();
        }
コード例 #2
0
        public override bool Initialize()
        {
            //Custom initialization for your plugin
            CredentialForm = new CredentialsAsk();
            CredentialForm.ShowDialog();
            this.GmailUsername = CredentialForm.GmailUsername;
            this.GmailPassword = CredentialForm.GmailPassword;

            mail = new GMailIntegration(GmailUsername, GmailPassword);
            return(mail.GetFeed());
        }
コード例 #3
0
ファイル: CustomPlugin.cs プロジェクト: ModernSteward/plugins
        public override bool Initialize()
        {
            //Custom initialization for your plugin
            CredentialForm = new CredentialsAsk();
            CredentialForm.ShowDialog();
            this.GmailUsername = CredentialForm.GmailUsername;
            this.GmailPassword = CredentialForm.GmailPassword;

            mail = new GMailIntegration(GmailUsername, GmailPassword);
            return mail.GetFeed();
        }