当前位置: 首页>>代码示例>>C#>>正文


C# HelperClasses.OAuth2Info类代码示例

本文整理汇总了C#中UploadersLib.HelperClasses.OAuth2Info的典型用法代码示例。如果您正苦于以下问题:C# OAuth2Info类的具体用法?C# OAuth2Info怎么用?C# OAuth2Info使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OAuth2Info类属于UploadersLib.HelperClasses命名空间,在下文中一共展示了OAuth2Info类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DropboxFilesForm

        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);
            }
        }
开发者ID:Edison6351,项目名称:ShareX,代码行数:14,代码来源:DropboxFilesForm.cs

示例2: ImgurAuthOpen

        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);
            }
        }
开发者ID:Z1ni,项目名称:ShareX,代码行数:24,代码来源:UploadersConfigFormHelper.cs

示例3: Gist

 public Gist(bool publishPublic, OAuth2Info oAuthInfos)
 {
     this.publishPublic = publishPublic;
     AuthInfo = oAuthInfos;
 }
开发者ID:yoykiee,项目名称:ShareX,代码行数:5,代码来源:Gist.cs

示例4: DropboxAuthOpen

        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);
            }
        }
开发者ID:jakesyl,项目名称:ShareX,代码行数:24,代码来源:UploadersConfigFormHelper.cs

示例5: Box

 public Box(OAuth2Info oauth)
 {
     AuthInfo = oauth;
     FolderID = "0";
     Share = true;
 }
开发者ID:Edison6351,项目名称:ShareX,代码行数:6,代码来源:Box.cs

示例6: OneDrive

 public OneDrive(OAuth2Info authInfo)
 {
     AuthInfo = authInfo;
 }
开发者ID:Edison6351,项目名称:ShareX,代码行数:4,代码来源:OneDrive.cs

示例7: GoogleDriveAuthOpen

        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);
            }
        }
开发者ID:rushil33d,项目名称:ShareX,代码行数:24,代码来源:UploadersConfigFormHelper.cs

示例8: Minus

 public Minus(MinusOptions config, OAuth2Info auth)
 {
     Config = config;
     AuthInfo = auth;
 }
开发者ID:Edison6351,项目名称:ShareX,代码行数:5,代码来源:Minus.cs

示例9: GoogleURLShortener

 public GoogleURLShortener(OAuth2Info oauth)
 {
     UploadMethod = AccountType.User;
     AuthInfo = oauth;
 }
开发者ID:jakesyl,项目名称:ShareX,代码行数:5,代码来源:GoogleURLShortener.cs

示例10: Dropbox

 public Dropbox(OAuth2Info oauth, DropboxAccountInfo accountInfo)
     : this(oauth)
 {
     AccountInfo = accountInfo;
 }
开发者ID:barsv,项目名称:ShareX,代码行数:5,代码来源:Dropbox.cs

示例11: BoxAuthOpen

        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);
            }
        }
开发者ID:rushil33d,项目名称:ShareX,代码行数:33,代码来源:UploadersConfigFormHelper.cs

示例12: Picasa

 public Picasa(OAuth2Info oauth)
 {
     AuthInfo = oauth;
 }
开发者ID:TreeSeed,项目名称:ShareX,代码行数:4,代码来源:Picasa.cs

示例13: GistAuthOpen

        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);
            }
        }
开发者ID:rushil33d,项目名称:ShareX,代码行数:18,代码来源:UploadersConfigFormHelper.cs

示例14: GoogleDrive

 public GoogleDrive(OAuth2Info oauth)
 {
     AuthInfo = oauth;
 }
开发者ID:barsv,项目名称:ShareX,代码行数:4,代码来源:GoogleDrive.cs

示例15: Imgur_v3

 public Imgur_v3(OAuth2Info oauth)
 {
     AuthInfo = oauth;
 }
开发者ID:modulexcite,项目名称:ShareX_Google_Code,代码行数:4,代码来源:Imgur_v3.cs


注:本文中的UploadersLib.HelperClasses.OAuth2Info类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。