public DropboxFilesForm(OAuth2Info oauth, string path, DropboxAccountInfo accountInfo)
        {
            InitializeComponent();
            Icon = Resources.Dropbox;

            dropbox = new Dropbox(oauth);
            dropboxAccountInfo = accountInfo;
            ilm = new ImageListManager(lvDropboxFiles);

            if (path != null)
            {
                Shown += (sender, e) => OpenDirectory(path);
            }
        }
        public void ImgurAuthOpen()
        {
            try
            {
                OAuth2Info oauth = new OAuth2Info(APIKeys.ImgurClientID, APIKeys.ImgurClientSecret);

                string url = new Imgur_v3(oauth).GetAuthorizationURL();

                if (!string.IsNullOrEmpty(url))
                {
                    Config.ImgurOAuth2Info = oauth;
                    Helpers.LoadBrowserAsync(url);
                    DebugHelper.WriteLine("ImgurAuthOpen - Authorization URL is opened: " + url);
                }
                else
                {
                    DebugHelper.WriteLine("ImgurAuthOpen - Authorization URL is empty.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #3
0
 public Gist(bool publishPublic, OAuth2Info oAuthInfos)
 {
     this.publishPublic = publishPublic;
     AuthInfo = oAuthInfos;
 }
Exemple #4
0
 public Gist(OAuth2Info oAuthInfos)
     : this(false, oAuthInfos)
 {
 }
        public void DropboxAuthOpen()
        {
            try
            {
                OAuth2Info oauth = new OAuth2Info(APIKeys.DropboxConsumerKey, APIKeys.DropboxConsumerSecret);

                string url = new Dropbox(oauth).GetAuthorizationURL();

                if (!string.IsNullOrEmpty(url))
                {
                    Config.DropboxOAuth2Info = oauth;
                    URLHelpers.OpenURL(url);
                    DebugHelper.WriteLine("DropboxAuthOpen - Authorization URL is opened: " + url);
                }
                else
                {
                    DebugHelper.WriteLine("DropboxAuthOpen - Authorization URL is empty.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #6
0
 public Box(OAuth2Info oauth)
 {
     AuthInfo = oauth;
     FolderID = "0";
     Share = true;
 }
Exemple #7
0
 public OneDrive(OAuth2Info authInfo)
 {
     AuthInfo = authInfo;
 }
        public void GoogleDriveAuthOpen()
        {
            try
            {
                OAuth2Info oauth = new OAuth2Info(APIKeys.GoogleClientID, APIKeys.GoogleClientSecret);

                string url = new GoogleDrive(oauth).GetAuthorizationURL();

                if (!string.IsNullOrEmpty(url))
                {
                    Config.GoogleDriveOAuth2Info = oauth;
                    Helpers.OpenURL(url);
                    DebugHelper.WriteLine("GoogleDriveAuthOpen - Authorization URL is opened: " + url);
                }
                else
                {
                    DebugHelper.WriteLine("GoogleDriveAuthOpen - Authorization URL is empty.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #9
0
 public Minus(MinusOptions config, OAuth2Info auth)
 {
     Config = config;
     AuthInfo = auth;
 }
Exemple #10
0
 public GoogleURLShortener(OAuth2Info oauth)
 {
     UploadMethod = AccountType.User;
     AuthInfo = oauth;
 }
Exemple #11
0
 public GoogleURLShortener(AccountType uploadMethod, string anonymousKey, OAuth2Info oauth)
 {
     UploadMethod = uploadMethod;
     AnonymousKey = anonymousKey;
     AuthInfo = oauth;
 }
Exemple #12
0
 public Dropbox(OAuth2Info oauth, DropboxAccountInfo accountInfo)
     : this(oauth)
 {
     AccountInfo = accountInfo;
 }
Exemple #13
0
 public Dropbox(OAuth2Info oauth)
 {
     AuthInfo = oauth;
 }
        public void BoxAuthOpen()
        {
            try
            {
                OAuth2Info oauth = new OAuth2Info(APIKeys.BoxClientID, APIKeys.BoxClientSecret);

                string url = new Box(oauth).GetAuthorizationURL();

                if (!string.IsNullOrEmpty(url))
                {
                    Config.BoxOAuth2Info = oauth;
                    //Helpers.LoadBrowserAsync(url);
                    DebugHelper.WriteLine("BoxAuthOpen - Authorization URL is opened: " + url);

                    // Workaround for authorization because we don't have callback url which starts with https://
                    using (OAuthWebForm oauthForm = new OAuthWebForm(url, "https://www.box.com/home/"))
                    {
                        if (oauthForm.ShowDialog() == DialogResult.OK)
                        {
                            BoxAuthComplete(oauthForm.Code);
                        }
                    }
                }
                else
                {
                    DebugHelper.WriteLine("BoxAuthOpen - Authorization URL is empty.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #15
0
 public Picasa(OAuth2Info oauth)
 {
     AuthInfo = oauth;
 }
        public void GistAuthOpen()
        {
            try
            {
                OAuth2Info oauth = new OAuth2Info(APIKeys.GitHubID, APIKeys.GitHubSecret);
                string url = new Gist(oauth).GetAuthorizationURL();

                if (!string.IsNullOrEmpty(url))
                {
                    Config.GistOAuth2Info = oauth;
                    Helpers.OpenURL(url);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #17
0
 public GoogleDrive(OAuth2Info oauth)
 {
     AuthInfo = oauth;
 }
 public Imgur_v3(OAuth2Info oauth)
 {
     AuthInfo = oauth;
 }
 public BitlyURLShortener(OAuth2Info oauth)
 {
     AuthInfo = oauth;
 }