コード例 #1
0
        void RefreshRecordingList()
        {
            XDocument requestDoc = new XDocument(
                new XElement("PlaceWareConfCenter", new XAttribute("authUser", Properties.Settings.Default.Username), new XAttribute("authPassword", Config.Password),
                             new XElement("ListRecordingsRequest", new XAttribute("listDeleted", false),
                                          new XElement("TimeIntervalQuery", new XAttribute("fieldName", "startTime"),
                                                       new XElement("TimeInterval", new XAttribute("startTime", "2015-01-01T00:00:00Z"), new XAttribute("endTime", "2016-10-26T00:00:00Z"))),
                                          new XElement("FieldList",
                                                       new XElement("Name", "title"),
                                                       new XElement("Name", "createTime"),
                                                       new XElement("Name", "duration"),
                                                       new XElement("Name", "owner"),
                                                       new XElement("Name", "name"),
                                                       new XElement("Name", "registration"),
                                                       new XElement("Name", "size"),
                                                       new XElement("Name", "startTime"),
                                                       new XElement("Name", "timeZone"),
                                                       new XElement("Name", "reid")))));

            XmlDocument doc = new XmlDocument();

            doc.Load(requestDoc.CreateReader());

            XmlDocument resp = XmlApiClient.PostMessageRequest(doc);

            XmlNodeList list = resp.SelectNodes("//Recording");

            _recordings.Clear();
            foreach (XmlNode node in list)
            {
                Recording recording = new Recording(node);
                _recordings.Add(recording);
            }

            Debug.WriteLine(_recordings.Count.ToString());
            dataGridView1.DataSource = _recordings;

            foreach (DataGridViewColumn column in dataGridView1.Columns)
            {
                dataGridView1.Columns[column.Name].SortMode = DataGridViewColumnSortMode.Automatic;
            }
        }
コード例 #2
0
        private string GetRecordingURL(string recID)
        {
            XDocument requestDoc = new XDocument(
                new XElement("PlaceWareConfCenter", new XAttribute("authUser", Properties.Settings.Default.Username), new XAttribute("authPassword", Config.Password),
                             new XElement("GetURLRequest",
                                          new XElement("StringQuery", new XAttribute("fieldName", "reid"), new XAttribute("operator", "="), new XAttribute("value", recID)),
                                          new XElement("OptionList",
                                                       new XElement("StringOption", new XAttribute("name", "recViewerCompany"), new XAttribute("value", Config.RecViewerCompany)),
                                                       new XElement("StringOption", new XAttribute("name", "recViewerName"), new XAttribute("value", Config.RecViewerName)),
                                                       new XElement("StringOption", new XAttribute("name", "recViewerEmail"), new XAttribute("value", Config.RecViewerEmail)),
                                                       new XElement("EnumerationOption", new XAttribute("name", "resourceType"), new XAttribute("value", "WindowsMediaMovieRecordingDownload"),
                                                                    new XElement("String", "ESS"),
                                                                    new XElement("String", "PWP"),
                                                                    new XElement("String", "HighFidelityPresentation"),
                                                                    new XElement("String", "HighFidelityPresentationDownload"),
                                                                    new XElement("String", "WindowsMediaMovieRecording"),
                                                                    new XElement("String", "WindowsMediaMovieRecordingDownload"),
                                                                    new XElement("String", "BasicRecording"))))));

            XmlDocument doc = new XmlDocument();

            doc.Load(requestDoc.CreateReader());

            XmlDocument response = XmlApiClient.PostMessageRequest(doc);
            XmlNode     node     = response.SelectSingleNode("//GetURLReply");

            if (node == null)
            {
                Debug.WriteLine("GetURLReply missing, response=" + response.OuterXml);
                return(null);
            }

            string url = node.Attributes["url"].Value;

            return(url);
        }