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


C# OAuth2Info类代码示例

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


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

示例1: CreateUploader

        public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
        {
            OAuth2Info oauth = new OAuth2Info(APIKeys.SlimgClientID, APIKeys.SlimgClientSecret);

            return new Slimg(oauth)
            {
                UploadMethod = AccountType.Anonymous
            };
        }
开发者ID:ElectronicWar,项目名称:ShareX,代码行数:9,代码来源:Slimg.cs

示例2: DropboxFilesForm

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

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

            if (path != null)
            {
                Shown += (sender, e) => OpenDirectory(path);
            }
        }
开发者ID:Xanaxiel,项目名称:ShareX,代码行数:14,代码来源:DropboxFilesForm.cs

示例3: ImgurAuthOpen

        private void ImgurAuthOpen()
        {
            try
            {
                OAuth2Info oauth = new OAuth2Info(APIKeys.ImgurClientID, APIKeys.ImgurClientSecret);

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

                if (!string.IsNullOrEmpty(url))
                {
                    Config.ImgurOAuth2Info = oauth;
                    URLHelpers.OpenURL(url);
                    DebugHelper.WriteLine("ImgurAuthOpen - Authorization URL is opened: " + url);
                }
                else
                {
                    DebugHelper.WriteLine("ImgurAuthOpen - Authorization URL is empty.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), Resources.UploadersConfigForm_Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
开发者ID:Maximus325,项目名称:ShareX,代码行数:24,代码来源:UploadersConfigFormHelper.cs

示例4: GoogleURLShortener

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

示例5: Dropbox

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

示例6: Imgur

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

示例7: GoogleDrive

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

示例8: Minus

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

示例9: 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(), Resources.UploadersConfigForm_Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
开发者ID:noscripter,项目名称:ShareX,代码行数:24,代码来源:UploadersConfigFormHelper.cs

示例10: Slimg

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

示例11: Box

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

示例12: BitlyURLShortener

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

示例13: OneDrive

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

示例14: Picasa

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

示例15: Dropbox

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


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