Exemplo n.º 1
0
        public FileControl()
        {
            InitializeComponent();

            try
            {
                btnUp.Click += new RoutedEventHandler(btnUp_Click);
                Client       = new SMT.Saas.Tools.NewFileUploadWS.UploadServiceClient();
                //Client.ListUpLoadFileCompleted += new EventHandler<SMT.Saas.Tools.NewFileUploadWS.ListUpLoadFileCompletedEventArgs>(Client_ListUpLoadFileCompleted);
                #region 获取文件列表 完成事件
                Client.GetFileListByApplicationIDCompleted     += new EventHandler <GetFileListByApplicationIDCompletedEventArgs>(Client_GetFileListByApplicationIDCompleted);
                Client.GetFileListByCompanyCodeCompleted       += new EventHandler <GetFileListByCompanyCodeCompletedEventArgs>(Client_GetFileListByCompanyCodeCompleted);
                Client.GetFileListByModelCodeCompleted         += new EventHandler <GetFileListByModelCodeCompletedEventArgs>(Client_GetFileListByModelCodeCompleted);
                Client.GetFileListBySystemCodeCompleted        += new EventHandler <GetFileListBySystemCodeCompletedEventArgs>(Client_GetFileListBySystemCodeCompleted);
                Client.GetFileListByOnlyApplicationIDCompleted += new EventHandler <GetFileListByOnlyApplicationIDCompletedEventArgs>(Client_GetFileListByOnlyApplicationIDCompleted);
                //Client.GetFileListByOnlyApplicationIDAsync("9847d30f-0272-4274-b1b7-b0b5ddb41349");
                #endregion
                #region 注册删除文件 完成事件
                Client.DeleteFileByUrlCompleted                      += new EventHandler <DeleteFileByUrlCompletedEventArgs>(Client_DeleteFileByUrlCompleted);
                Client.DeleteFileCompleted                           += new EventHandler <DeleteFileCompletedEventArgs>(Client_DeleteFileCompleted);
                Client.DeleteFileByApplicationIDCompleted            += new EventHandler <DeleteFileByApplicationIDCompletedEventArgs>(Client_DeleteFileByApplicationIDCompleted);
                Client.DeleteFileByOnlyApplicationIDCompleted        += new EventHandler <DeleteFileByOnlyApplicationIDCompletedEventArgs>(Client_DeleteFileByOnlyApplicationIDCompleted);
                Client.DeleteFileByCompanycodeCompleted              += new EventHandler <DeleteFileByCompanycodeCompletedEventArgs>(Client_DeleteFileByCompanycodeCompleted);
                Client.DeleteFileByModelCodeCompleted                += new EventHandler <DeleteFileByModelCodeCompletedEventArgs>(Client_DeleteFileByModelCodeCompleted);
                Client.DeleteFileBySystemCodeCompleted               += new EventHandler <DeleteFileBySystemCodeCompletedEventArgs>(Client_DeleteFileBySystemCodeCompleted);
                Client.DeleteFileByApplicationIDAndFileNameCompleted += new EventHandler <DeleteFileByApplicationIDAndFileNameCompletedEventArgs>(Client_DeleteFileByApplicationIDAndFileNameCompleted);
            }
            catch (Exception ex)
            {
                string a = ex.ToString();
            }
            #endregion
        }
Exemplo n.º 2
0
       public FileControl()
        {
            InitializeComponent();

            try
            {
                btnUp.Click += new RoutedEventHandler(btnUp_Click);
                Client = new SMT.Saas.Tools.NewFileUploadWS.UploadServiceClient();
                //Client.ListUpLoadFileCompleted += new EventHandler<SMT.Saas.Tools.NewFileUploadWS.ListUpLoadFileCompletedEventArgs>(Client_ListUpLoadFileCompleted);
                #region 获取文件列表 完成事件
                Client.GetFileListByApplicationIDCompleted += new EventHandler<GetFileListByApplicationIDCompletedEventArgs>(Client_GetFileListByApplicationIDCompleted);
                Client.GetFileListByCompanyCodeCompleted += new EventHandler<GetFileListByCompanyCodeCompletedEventArgs>(Client_GetFileListByCompanyCodeCompleted);
                Client.GetFileListByModelCodeCompleted += new EventHandler<GetFileListByModelCodeCompletedEventArgs>(Client_GetFileListByModelCodeCompleted);
                Client.GetFileListBySystemCodeCompleted += new EventHandler<GetFileListBySystemCodeCompletedEventArgs>(Client_GetFileListBySystemCodeCompleted);
                Client.GetFileListByOnlyApplicationIDCompleted += new EventHandler<GetFileListByOnlyApplicationIDCompletedEventArgs>(Client_GetFileListByOnlyApplicationIDCompleted);
                //Client.GetFileListByOnlyApplicationIDAsync("9847d30f-0272-4274-b1b7-b0b5ddb41349");
                #endregion
                #region 注册删除文件 完成事件
                Client.DeleteFileByUrlCompleted += new EventHandler<DeleteFileByUrlCompletedEventArgs>(Client_DeleteFileByUrlCompleted);
                Client.DeleteFileCompleted += new EventHandler<DeleteFileCompletedEventArgs>(Client_DeleteFileCompleted);
                Client.DeleteFileByApplicationIDCompleted += new EventHandler<DeleteFileByApplicationIDCompletedEventArgs>(Client_DeleteFileByApplicationIDCompleted);
                Client.DeleteFileByOnlyApplicationIDCompleted += new EventHandler<DeleteFileByOnlyApplicationIDCompletedEventArgs>(Client_DeleteFileByOnlyApplicationIDCompleted);
                Client.DeleteFileByCompanycodeCompleted += new EventHandler<DeleteFileByCompanycodeCompletedEventArgs>(Client_DeleteFileByCompanycodeCompleted);
                Client.DeleteFileByModelCodeCompleted += new EventHandler<DeleteFileByModelCodeCompletedEventArgs>(Client_DeleteFileByModelCodeCompleted);
                Client.DeleteFileBySystemCodeCompleted += new EventHandler<DeleteFileBySystemCodeCompletedEventArgs>(Client_DeleteFileBySystemCodeCompleted);
                Client.DeleteFileByApplicationIDAndFileNameCompleted += new EventHandler<DeleteFileByApplicationIDAndFileNameCompletedEventArgs>(Client_DeleteFileByApplicationIDAndFileNameCompleted);
            }
            catch (Exception ex)
            {
                string a = ex.ToString();
            }
            #endregion          
        }