Example #1
0
        public void UploadFileToComosDevice(RemoteFileInfo fileinfo)
        {
            string fullFileName = fileinfo.FullFileName;

            Log.WriteLog("UploadFileToComosDevice::" + (fileinfo == null));
            Log.WriteLog(string.Format("Project: {0} , Overlay: {1}, Owner: {2}, FileName ={3}, User = {4}", fileinfo.Project,
                                       fileinfo.Workinglayer, fileinfo.Owner, fileinfo.FileName, fileinfo.User));

            m_ComosSession.SetCurrentUser(fileinfo.User);
            m_ComosSession.SetCurrentProjectAndWorkingOverlay(fileinfo.Project, fileinfo.Workinglayer, "");

            Log.WriteLog("FromStream::" + (fileinfo.FileByteStream == null));
            var img = System.Drawing.Bitmap.FromStream(fileinfo.FileByteStream);

            m_ComosSession.AddPictureToComosObject(fileinfo.Owner, fileinfo.FileName, fileinfo.Description, img, fileinfo.FullFileName);
            Log.WriteLog("PIC:SAVED:");
        }