예제 #1
0
        protected override void OnStart(string[] args)
        {
            QiNiuWork.QiNiuWorkUtil qiNiuWork   = new QiNiuWork.QiNiuWorkUtil();
            QiNiuConfig             qiNiuConfig = new QiNiuConfig();

            qiNiuConfig.AK     = _configModel.QiNiuAccessKey;
            qiNiuConfig.SK     = _configModel.QiNiuSecretKey;
            qiNiuConfig.Bucket = _configModel.QiNiuSpace;
            //qiNiuConfig.LocalFile = @"C:\Users\z8489\Documents\GitHub\Bookmarks\QNBookmarkWpf\bin\Debug\config.json";
            qiNiuConfig.UploadH = UploadFileMessge;
            qiNiuWork.UploadFile(qiNiuConfig);
        }
예제 #2
0
 private void SysT_OnClick(object sender, RoutedEventArgs e)
 {
     if (QiNiuWorkUtil.HttpDownload(_configModel.DownloadUrl, "old_data.js"))
     {
         if (BookmarksData.ContrastBookmarks(_myBookmarkses))
         {
             QiNiuConfig qiNiuConfig = new QiNiuConfig();
             qiNiuConfig.AK = _configModel.QiNiuAccessKey;
             qiNiuConfig.SK = _configModel.QiNiuSecretKey;
             qiNiuConfig.Bucket = _configModel.QiNiuSpace;
             qiNiuConfig.UploadH = UploadFileMessge;
             QiNiuWork.QiNiuWorkUtil qiNiuWork = new QiNiuWork.QiNiuWorkUtil();
             qiNiuWork.Delete(qiNiuConfig);
             qiNiuWork.UploadFile(qiNiuConfig);
         }
     }
 }