コード例 #1
0
        public List <ConferenceInformationEntityPC> GetTempInformation()
        {
            //上锁,达到线程互斥作用
            lock (objGetTempInformation)
            {
                try
                {
                    if (Constant.IsNeedReservationInfo && ReservationConferenceInformationEntityPCList == null)
                    {
                        //bool getReservationSuccessed = false;
                        ModelManage.ClientInit(Constant.RevertWebServiceUri, Constant.UserDoaminPart1Name, Constant.ReservationLoginUser, Constant.ReservationLoginPwd);

                        string info = ModelManage.ConferenceWebInfo.GetReservationConferenceInfo();
                        if (!string.IsNullOrEmpty(info))
                        {
                            ReservationConferenceInformationEntityPCList = JsonManage.JsonToEntity <ConferenceInformationEntityPC, SceneModeType, MaxtrixModeType>(info, ',');
                            if (ReservationConferenceInformationEntityPCList != null && ReservationConferenceInformationEntityPCList.Count > 0)
                            {
                                //添加预定会议信息
                                ConferenceInformationEntityPCList.AddRange(ReservationConferenceInformationEntityPCList);
                            }
                        }
                    }

                    if (string.IsNullOrEmpty(meetingInfo))
                    {
                        //获取webservice路径
                        string strLocal = this.Server.MapPath(".");

                        //通过文件流将音频文件转为字节数组
                        using (System.IO.FileStream fileStream = new System.IO.FileStream(strLocal + @"\" + Constant.MeetFileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, FileShare.Delete))
                        {
                            //流读取器
                            StreamReader sr = new StreamReader(fileStream);
                            //读取流中的信息
                            meetingInfo = sr.ReadToEnd();
                            //去掉换行字符
                            meetingInfo = meetingInfo.Replace("\r\n", string.Empty);
                        }
                        ConferenceInformationEntityPCList.AddRange(JsonManage.JsonToEntity <ConferenceInformationEntityPC, SceneModeType, MaxtrixModeType>(meetingInfo, ','));
                    }

                    //if(KeepAliveTimer == null)
                    //{
                    //    KeepAliveTimer = new System.Timers.Timer();
                    //    KeepAliveTimer.Elapsed += KeepAliveTimer_Elapsed;
                    //    KeepAliveTimer.Interval = 30000;
                    //    KeepAliveTimer.Start();
                    //}
                }
                catch (Exception ex)
                {
                    LogManage.WriteLog(this.GetType(), ex);
                }
                finally
                {
                }
                return(ConferenceInformationEntityPCList);
            }
        }
コード例 #2
0
 public void LoadFolderCenter(string dicParameters, int itemID, string itemName)
 {
     ListViewCollection.Clear();
     ModelManage.Space_Service.Function_Invoke(SpaceCodeEnterEntity.GetFileByExtention, dicParameters, SpaceCodeEnterEntity.LoginUserName, SpaceCodeEnterEntity.WebLoginPassword, SpaceCodeEnterEntity.UserDomain, new Action <Dictionary <string, object> >((dicResult) =>
     {
         try
         {
             string json = Convert.ToString(dicResult[SpaceCodeEnterEntity.Collection]);
             List <SPItemEntity> sPItemEntity_List = JsonManage.JsonToEntity <SPItemEntity>(json, ',');
             this.Dispatcher.BeginInvoke(new Action(() =>
             {
                 foreach (var item in sPItemEntity_List)
                 {
                     if (item.ContentType.Equals(File_Flg))
                     {
                         fileType fileExtension   = default(fileType);
                         bool isTransferSuccessed = Enum.TryParse <fileType>(item.DocIcon, out fileExtension);
                         if (isTransferSuccessed)
                         {
                             this.DataLoad_File(item);
                         }
                     }
                 }
                 this.HidenTip();
             }));
         }
         catch (Exception ex)
         {
             LogManage.WriteLog(this.GetType(), ex);
         }
         finally
         {
         }
     }));
 }
コード例 #3
0
 /// <summary>
 /// 获取uri地址
 /// </summary>
 /// <param name="Item"></param>
 protected void GetItemUri(SpaceListViewItem Item)
 {
     try
     {
         if (Item.BookType == Common.BookType.File && Item.Self_File != null)
         {
             if (string.IsNullOrEmpty(Item.Uri))
             {
                 string parameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.DisplayItem, Item.Self_File.ID);
                 ModelManage.Space_Service.Function_Invoke(SpaceCodeEnterEntity.DisplayItem, parameters, SpaceCodeEnterEntity.LoginUserName,
                                                           SpaceCodeEnterEntity.WebLoginPassword, SpaceCodeEnterEntity.UserDomain, new Action <Dictionary <string, object> >((dicResult) =>
                 {
                     SPItemEntity sPItemEntity = JsonManage.DictionaryToEntity <SPItemEntity>(dicResult, ',');
                     string uri = SpaceCodeEnterEntity.SPSiteAddressFront + sPItemEntity.FileRef;
                     //跨线程(异步委托)
                     this.Dispatcher.BeginInvoke(new Action(() =>
                     {
                         Item.Self_File.ServerRelativeUrl = uri;
                         Item.Uri = uri;
                     }));
                 }));
             }
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
コード例 #4
0
        /// <summary>
        /// 获取参数(删除文件)
        /// </summary>
        /// <param name="spaceType">空间类型</param>
        /// <param name="methodName">方法名称</param>
        /// <param name="listItemID">子项ID</param>
        /// <returns></returns>
        internal static string GetParameters(SpaceType spaceType, string methodName, List <int> listItemID)
        {
            string str = string.Empty;

            try
            {
                ParametersInit(spaceType);
                string strArrayID = string.Empty;
                dirIn.Add(SpaceCodeEnterEntity.MethodName, methodName);
                foreach (var item in listItemID)
                {
                    strArrayID += item + ",";
                }
                strArrayID.Remove(strArrayID.LastIndexOf(","), 1);
                dirIn.Add(SpaceCodeEnterEntity.SP_ItemID, strArrayID);

                str = JsonManage.DictionaryToJson(dirIn);
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(typeof(SpaceHelper), ex);
            }
            finally
            {
            }
            return(str);
        }
コード例 #5
0
        public void FileUpload_Synchronous(string Method, string parameters, string username, string pwd, string domain, byte[] data, Action <Dictionary <string, object> > callBack)
        {
            try
            {
                try
                {
                    string result = Client.Fontion_Uplode(parameters, username, pwd, domain, data);

                    Dictionary <string, object> dicResult = JsonManage.JsonToDictionary(result);
                    callBack(dicResult);
                }
                catch (Exception ex)
                {
                    LogManage.WriteLog(this.GetType(), ex);
                }
                finally
                {
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
        }
コード例 #6
0
        public void LoadFolderCenter(string dicParameters, int itemID, string itemName)
        {
            ListViewCollection.Clear();
            ModelManage.Space_Service.Function_Invoke(SpaceCodeEnterEntity.GetCollection, dicParameters, SpaceCodeEnterEntity.LoginUserName, SpaceCodeEnterEntity.WebLoginPassword, SpaceCodeEnterEntity.UserDomain, new Action <Dictionary <string, object> >((dicResult) =>
            {
                //跨线程(异步委托)
                this.Dispatcher.BeginInvoke(new Action(() =>
                {
                    try
                    {
                        this.SpaceListViewItemList.Clear();
                        this.NavicateListView3.IsEnabled = false;

                        string json = Convert.ToString(dicResult[SpaceCodeEnterEntity.Collection]);
                        List <SPItemEntity> sPItemEntity_List = JsonManage.JsonToEntity <SPItemEntity>(json, ',');
                        if (this.currentBreadLine == null || this.currentBreadLine.Folder == null)
                        {
                            SPVirtualFolder folder = new SPVirtualFolder();
                            //folder.Name = "文档";
                            if (itemID > 0)
                            {
                                folder.ID = itemID;
                            }
                            if (!string.IsNullOrEmpty(itemName))
                            {
                                folder.Name = itemName;
                            }
                            SPVirtualItemInit(folder, sPItemEntity_List);

                            //设置根目录(第一层面包线,文件夹为第一层文件夹【会议文件夹】)
                            this.BreadLineRoot.Folder = folder;
                            //设置当前所处的目录
                            this.currentBreadLine = this.BreadLineRoot;

                            base.Bread_LineRoot = this.BreadLineRoot;
                            //清除之前的那根线【第一个面包线是不需要那根线的】
                            this.BreadLineRoot.ClearBeforeLine();
                            //面包线点击事件
                            this.BreadLineRoot.LineClickEventCallBack = breadLine_LineClickEvent;
                        }
                        else
                        {
                            SPVirtualItemInit(this.currentBreadLine.Folder, sPItemEntity_List);
                        }
                        //刷新当前页面
                        this.RefleshSpaceData(this.currentBreadLine);
                    }
                    catch (Exception ex)
                    {
                        LogManage.WriteLog(this.GetType(), ex);
                    }
                    finally
                    {
                    }
                }));
            }));
        }
コード例 #7
0
        private void gridShareFileWindow_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                foreach (var item in this.Ad_ListViewCollection)
                {
                    string dicParameters = string.Empty;
                    switch (this.SpaceType)
                    {
                    case SpaceType.PersonSpace:

                        string caml = "<Where><Eq><FieldRef Name='FileLeafRef' /><Value Type='Text'>" + item.loginname + "</Value></Eq></Where>";
                        dicParameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetCollection, caml);
                        break;

                    case SpaceType.MeetSpace:
                        //string caml2 = "<Where><Eq><FieldRef Name='FileLeafRef' /><Value Type='Text'>" + SpaceCodeEnterEntity.ConferenceName + "</Value></Eq></Where>";
                        dicParameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetCollection);
                        break;

                    case SpaceType.TopicSpace:
                        break;

                    default:
                        break;
                    }

                    ModelManage.Space_Service.Function_Invoke(SpaceCodeEnterEntity.GetCollection, dicParameters, SpaceCodeEnterEntity.LoginUserName, SpaceCodeEnterEntity.WebLoginPassword, SpaceCodeEnterEntity.UserDomain, new Action <Dictionary <string, object> >((dicResult) =>
                    {
                        if (dicResult.Count > 0)
                        {
                            string json = Convert.ToString(dicResult[SpaceCodeEnterEntity.Collection]);
                            List <SPItemEntity> sPItemEntity_List = JsonManage.JsonToEntity <SPItemEntity>(json, ',');

                            if (sPItemEntity_List.Count > 0)
                            {
                                //跨线程(异步委托)
                                this.Dispatcher.BeginInvoke(new Action(() =>
                                {
                                    string id_Root_str = sPItemEntity_List[0].ID;
                                    int id_Root        = Convert.ToInt32(sPItemEntity_List[0].ID);

                                    Share_Foreach_Helper(id_Root, this.Selected_PageViewBase.SpaceListViewItemList);
                                }));
                            }
                        }
                    }));
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
        }
コード例 #8
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            MyProgressRing.IsActive   = true;
            MyProgressRing.Visibility = Visibility.Visible;

            await JsonManage.RandomDataManageAsync(Data);

            MyProgressRing.IsActive   = false;
            MyProgressRing.Visibility = Visibility.Collapsed;
        }
コード例 #9
0
        private async void DouBan_Click(object sender, RoutedEventArgs e)
        {
            MyProgressRing.IsActive   = true;
            MyProgressRing.Visibility = Visibility.Visible;

            id = 57;
            allData.Clear();

            await JsonManage.AllDataManageAsync(allData, id);

            MyProgressRing.IsActive   = false;
            MyProgressRing.Visibility = Visibility.Collapsed;
        }
コード例 #10
0
        /// <summary>
        /// 打开文件(包括文件夹)
        /// </summary>
        /// <param name="spaceListViewItem"></param>
        protected void book_OpenFileEvent(SpaceListViewItem spaceListViewItem, Action <string, int, string> compleateCallBack)
        {
            try
            {
                switch (spaceListViewItem.BookType)
                {
                case BookType.File:

                    if (spaceListViewItem.Self_File != null)
                    {
                        if (string.IsNullOrEmpty(spaceListViewItem.Uri))
                        {
                            string parameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.DisplayItem, spaceListViewItem.Self_File.ID);
                            ModelManage.Space_Service.Function_Invoke(SpaceCodeEnterEntity.DisplayItem, parameters, SpaceCodeEnterEntity.LoginUserName,
                                                                      SpaceCodeEnterEntity.WebLoginPassword, SpaceCodeEnterEntity.UserDomain, new Action <Dictionary <string, object> >((dicResult) =>
                            {
                                SPItemEntity sPItemEntity = JsonManage.DictionaryToEntity <SPItemEntity>(dicResult, ',');
                                string uri = SpaceCodeEnterEntity.SPSiteAddressFront + sPItemEntity.FileRef;
                                //跨线程(异步委托)
                                this.Dispatcher.BeginInvoke(new Action(() =>
                                {
                                    spaceListViewItem.Self_File.ServerRelativeUrl = uri;
                                    spaceListViewItem.Uri = uri;
                                    //根据文件的类型使用相应的方式打开
                                    SpaceCodeEnterEntity.fileOpenManage.FileOpenByExtension((fileType)spaceListViewItem.FileType, spaceListViewItem.Uri);
                                }));
                            }));
                        }
                        else
                        {
                            //根据文件的类型使用相应的方式打开
                            SpaceCodeEnterEntity.fileOpenManage.FileOpenByExtension((fileType)spaceListViewItem.FileType, spaceListViewItem.Uri);
                        }
                    }
                    break;

                case BookType.Folder:
                    //打开文件夹
                    this.FolderOpen(spaceListViewItem, compleateCallBack);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
コード例 #11
0
        public void TreeChildInit(Ad_TreeViewItem ad_TreeViewItem)
        {
            try
            {
                if (string.IsNullOrEmpty(ad_TreeViewItem.path))
                {
                    return;
                }

                string dicParameters = SpaceHelper.GetParameters_Path(SpaceType, SpaceCodeEnterEntity.GetAd_Tree, ad_TreeViewItem.path);
                ModelManage.Space_Service.Function_Invoke(SpaceCodeEnterEntity.GetAd_Tree, dicParameters,
                                                          SpaceCodeEnterEntity.LoginUserName, SpaceCodeEnterEntity.WebLoginPassword,
                                                          SpaceCodeEnterEntity.UserDomain, new Action <Dictionary <string, object> >((dicResult) =>
                {
                    this.Dispatcher.BeginInvoke(new Action(() =>
                    {
                        string json = Convert.ToString(dicResult[SpaceCodeEnterEntity.Collection]);
                        List <Ad_TreeViewItem> adEntityList = JsonManage.JsonToEntity <Ad_TreeViewItem>(json, ',');
                        if (adEntityList.Count > 0)
                        {
                            ad_TreeViewItem.Ad_Children = new ObservableCollection <Ad_TreeViewItem>();
                            foreach (var item in adEntityList)
                            {
                                item.Style = Share_Item_Style;
                                //(this.Ad_Root as TreeViewItem).Items.Add(item);
                                ad_TreeViewItem.Ad_Children.Add(item);

                                string loginName = item.loginname;
                                if (!string.IsNullOrEmpty(loginName) && loginName.Contains("\\"))
                                {
                                    item.loginname = loginName.Substring(loginName.LastIndexOf("\\") + 1);
                                }

                                item.Ad_Parent = ad_TreeViewItem;
                                TreeChildInit(item);
                            }
                        }
                    }));
                }));
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
        }
コード例 #12
0
        /// <summary>
        /// 获取参数(获取目录)
        /// </summary>
        /// <param name="spaceType">空间名称</param>
        /// <param name="methodName">方法名称</param>
        /// <returns></returns>
        internal static string GetParameters(SpaceType spaceType, string methodName)
        {
            string str = string.Empty;

            try
            {
                ParametersInit(spaceType);
                dirIn.Add(SpaceCodeEnterEntity.MethodName, methodName);
                str = JsonManage.DictionaryToJson(dirIn);
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(typeof(SpaceHelper), ex);
            }
            finally
            {
            }
            return(str);
        }
コード例 #13
0
        /// <summary>
        /// 方法执行(唯一入口点)
        /// </summary>
        /// <param name="username">用户名称</param>
        /// <param name="pwd">用户密码</param>
        /// <param name="domain">域名</param>
        public void Function_Invoke(string Method, string parameters, string username, string pwd, string domain, Action <Dictionary <string, object> > callBack)
        {
            try
            {
                new Thread(() =>
                {
                    string result = Client.Fontion(parameters, username, pwd, domain);

                    Dictionary <string, object> dicResult = JsonManage.JsonToDictionary(result);

                    callBack(dicResult);
                })
                {
                    IsBackground = true
                }.Start();
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
コード例 #14
0
 /// <summary>
 /// 展示数据
 /// </summary>
 /// <param name="message">搜索信息</param>
 public void Display(string message)
 {
     try
     {
         List <SpSearchEntity> SpSearchEntityList = JsonManage.JsonToEntity <SpSearchEntity>(message, ',');
         SpSearchEntityList.ForEach(item =>
         {
             string path = item.Path;
             item.Title  = System.IO.Path.GetFileName(item.Path);
         });
         //展示搜索结果
         this.datagrid.ItemsSource = SpSearchEntityList;
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
コード例 #15
0
 /// <summary>
 /// 文件上传
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void Client_Fontion_UplodeCompleted(object sender, Fontion_UplodeCompletedEventArgs e)
 {
     try
     {
         if (e.Error == null)
         {
             Dictionary <string, object> result = JsonManage.JsonToDictionary(e.Result);
             string methodName = Convert.ToString(result[MethodName]);
             if (result.ContainsKey(MethodName))
             {
                 dicReturns(result);
             }
         }
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
     finally
     {
     }
 }
コード例 #16
0
        internal static string GetParameters(SpaceType spaceType, string methodName, string OldFileOrFolderListName, int OldFileOrFolderListItemID, string NewFileOrFolderListName, int NewFileOrFolderListItemID)
        {
            string str = string.Empty;

            try
            {
                ParametersInit(spaceType);
                dirIn.Add(SpaceCodeEnterEntity.MethodName, methodName);
                dirIn.Add(SpaceCodeEnterEntity.OldFileOrFolderListName, OldFileOrFolderListName);
                dirIn.Add(SpaceCodeEnterEntity.OldFileOrFolderListItemID, Convert.ToString(OldFileOrFolderListItemID));
                dirIn.Add(SpaceCodeEnterEntity.NewFileOrFolderListName, NewFileOrFolderListName);
                dirIn.Add(SpaceCodeEnterEntity.NewFileOrFolderListItemID, Convert.ToString(NewFileOrFolderListItemID));

                str = JsonManage.DictionaryToJson(dirIn);
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(typeof(SpaceHelper), ex);
            }
            finally
            {
            }
            return(str);
        }
コード例 #17
0
        /// <summary>
        /// 获取参数(文件筛选)
        /// </summary>
        /// <param name="spaceType">空间类型</param>
        /// <param name="methodName">方法名称</param>
        /// <param name="ItemID">子项ID</param>
        /// <param name="ItemName">子项名称</param>
        /// <returns></returns>
        internal static string GetParameters(SpaceType spaceType, string methodName, string Camel, Dictionary <string, string> dicAdd)
        {
            string str = string.Empty;

            try
            {
                ParametersInit(spaceType);
                dirIn.Add(SpaceCodeEnterEntity.MethodName, methodName);
                dirIn.Add(SpaceCodeEnterEntity.Caml, Camel);
                foreach (var item in dicAdd)
                {
                    dirIn.Add(item.Key, item.Value);
                }
                str = JsonManage.DictionaryToJson(dirIn);
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(typeof(SpaceHelper), ex);
            }
            finally
            {
            }
            return(str);
        }
コード例 #18
0
        public string GetConferenceInfoByMobile(string loginName)
        {
            string json = string.Empty;

            MessageInfo mi = new MessageInfo();

            mi.State   = "0000";
            mi.Message = "";

            ConferenceInformationEntityM ConferenceInformationEntityM = new ConferenceInformationEntityM();

            try
            {
                string userName = loginName + "@" + Constant.UserDomain;
                if (!string.IsNullOrEmpty(meetingInfo))
                {
                    List <ConferenceInformationEntity> list = JsonManage.JsonToEntity <ConferenceInformationEntity, SceneModeType, MaxtrixModeType>(meetingInfo, ',');

                    List <ConferenceInformationEntity> list2 = list.Where(Item => Item.JoinPeople.Contains(userName)).ToList <ConferenceInformationEntity>();

                    if (list2.Count > 0)
                    {
                        if (list2[0].JoinPeople.Contains(userName))
                        {
                            int index = list2[0].JoinPeople.IndexOf(userName);
                            //list2[0].JoinPeopleName
                            ConferenceInformationEntityM.SelfRealName = list2[0].JoinPeopleName[index];
                        }
                        ConferenceInformationEntityM.ConferenceInformationEntityList = list2;
                        ConferenceInformationEntityM.SelfAddress = userName;

                        json      = CommonMethod.Serialize(ConferenceInformationEntityM);
                        mi.Result = json;
                    }
                    else
                    {
                        mi.State   = "0001";
                        mi.Message = "当前用户没有所有参加的会议";
                    }
                }
                else
                {
                    mi.State   = "0001";
                    mi.Message = "获取会议信息失败";
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
            Context.Response.ContentType     = "application/json";
            Context.Response.Charset         = Encoding.UTF8.ToString(); //设置字符集类型
            Context.Response.ContentEncoding = System.Text.Encoding.UTF8;
            Context.Response.Write(CommonMethod.Serialize(mi));
            Context.Response.End();

            return(json);
        }
コード例 #19
0
        public void SpaceInit()
        {
            try
            {
                //等待提示
                this.ShowTip();

                this.SpaceListViewItemList.Clear();
                this.NavicateListView3.IsEnabled = false;
                this.listView.Items.Clear();

                if (dicParameters_Root == null)
                {
                    string dicParameters = string.Empty;
                    switch (this.SpaceType)
                    {
                    case SpaceType.PersonSpace:
                        string caml = "<Where><Eq><FieldRef Name='FileLeafRef' /><Value Type='Text'>" + SpaceCodeEnterEntity.LoginUserName + "</Value></Eq></Where>";
                        dicParameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetCollection, caml);
                        break;

                    case SpaceType.MeetSpace:
                        //string caml2 = "<Where><Eq><FieldRef Name='FileLeafRef' /><Value Type='Text'>" + SpaceCodeEnterEntity.ConferenceName + "</Value></Eq></Where>";
                        dicParameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetCollection);
                        break;

                    case SpaceType.TopicSpace:
                        break;

                    default:
                        break;
                    }

                    ModelManage.Space_Service.Function_Invoke(SpaceCodeEnterEntity.GetCollection, dicParameters, SpaceCodeEnterEntity.LoginUserName, SpaceCodeEnterEntity.WebLoginPassword, SpaceCodeEnterEntity.UserDomain, new Action <Dictionary <string, object> >((dicResult) =>
                    {
                        if (dicResult.Count > 0)
                        {
                            string json = Convert.ToString(dicResult[SpaceCodeEnterEntity.Collection]);
                            List <SPItemEntity> sPItemEntity_List = JsonManage.JsonToEntity <SPItemEntity>(json, ',');

                            if (sPItemEntity_List.Count > 0)
                            {
                                //跨线程(异步委托)
                                this.Dispatcher.BeginInvoke(new Action(() =>
                                {
                                    id_Root_str        = sPItemEntity_List[0].ID;
                                    id_Root            = Convert.ToInt32(id_Root_str);
                                    dicParameters_Root = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetCollection, id_Root);
                                    //ParentLeafName_Root = sPItemEntity_List[0].LinkFilename;
                                    //string caml = "<Where><Or>" + partCaml + "</Or></Where>";

                                    //string caml = "<Where><Or><Eq><FieldRef Name='DocIcon' /><Values><Value Type='Text'>" + "txt" + "</Value>"+"<Value Type='Text'>" + "doc" + "</Value></Eq></Or></Where>";
                                    dicParameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetFileByExtention, this.partCaml, new Dictionary <string, string>()
                                    {
                                        {
                                            SpaceCodeEnterEntity.ViewAttributes, "Scope=\"Recursive\""
                                        },
                                        { SpaceCodeEnterEntity.SP_ItemID, sPItemEntity_List[0].ID }
                                    });

                                    this.LoadFolderCenter(dicParameters, id_Root, ParentLeafName_Root);
                                }));
                            }
                        }
                    }));
                }
                else
                {
                    string dicParameters2 = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetFileByExtention, this.partCaml, new Dictionary <string, string>()
                    {
                        {
                            SpaceCodeEnterEntity.ViewAttributes, "Scope=\"Recursive\""
                        },
                        { SpaceCodeEnterEntity.SP_ItemID, id_Root_str }
                    });
                    this.LoadFolderCenter(dicParameters2, id_Root, ParentLeafName_Root);
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
        }
コード例 #20
0
        public void SpaceInit()
        {
            try
            {
                //等待提示
                this.ShowTip();

                this.listView.Items.Clear();
                if (dicParameters_Root == null)
                {
                    string dicParameters = string.Empty;
                    switch (this.SpaceType)
                    {
                    case SpaceType.PersonSpace:

                        string caml = "<Where><Eq><FieldRef Name='FileLeafRef' /><Value Type='Text'>" + SpaceCodeEnterEntity.LoginUserName + "</Value></Eq></Where>";
                        dicParameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetCollection, caml);
                        break;

                    case SpaceType.MeetSpace:
                        //string caml2 = "<Where><Eq><FieldRef Name='FileLeafRef' /><Value Type='Text'>" + SpaceCodeEnterEntity.ConferenceName + "</Value></Eq></Where>";
                        dicParameters = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetCollection);
                        break;

                    case SpaceType.TopicSpace:
                        break;

                    default:
                        break;
                    }

                    ModelManage.Space_Service.Function_Invoke(SpaceCodeEnterEntity.GetCollection, dicParameters, SpaceCodeEnterEntity.LoginUserName, SpaceCodeEnterEntity.WebLoginPassword, SpaceCodeEnterEntity.UserDomain, new Action <Dictionary <string, object> >((dicResult) =>
                    {
                        if (dicResult.Count > 0)
                        {
                            string json = Convert.ToString(dicResult[SpaceCodeEnterEntity.Collection]);
                            List <SPItemEntity> sPItemEntity_List = JsonManage.JsonToEntity <SPItemEntity>(json, ',');

                            if (sPItemEntity_List.Count > 0)
                            {
                                //跨线程(异步委托)
                                this.Dispatcher.BeginInvoke(new Action(() =>
                                {
                                    id_Root_str         = sPItemEntity_List[0].ID;
                                    id_Root             = Convert.ToInt32(sPItemEntity_List[0].ID);
                                    dicParameters_Root  = SpaceHelper.GetParameters(this.SpaceType, SpaceCodeEnterEntity.GetCollection, id_Root);
                                    ParentLeafName_Root = sPItemEntity_List[0].LinkFilename;
                                    this.LoadFolderCenter(dicParameters_Root, id_Root, ParentLeafName_Root);
                                }));
                            }
                        }
                    }));
                }
                else
                {
                    this.LoadFolderCenter(dicParameters_Root, id_Root, ParentLeafName_Root);
                }
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
            finally
            {
            }
        }