private void btn_Search_Click(object sender, EventArgs e) { if (client.Authentication == null) { MessageBox.Show("Please authenticate first.", "M-Files Examples", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } var searchForm = new SearchForm(); var result = searchForm.ShowDialog(); if (result == DialogResult.OK) { var searchTerm = searchForm.SearchTerm; //Full Text Search Document Content & Metadata var restPath = string.Format("/objects/0.aspx?q={0}", searchTerm); var objectVersions = client.Get <Results <ObjectVersion> >(restPath); var downloadForm = new DownloadList(objectVersions, client); downloadForm.ShowDialog(); } }
private void btn_Download_Click(object sender, EventArgs e) { if (client.Authentication == null) { MessageBox.Show("Please authenticate first.", "M-Files Examples", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } //Document ObjectType Id is 0 var restPath = "/objects/0"; //Make Get Request var documents = client.Get <Results <ObjectVersion> >(restPath); //Create the form to display document titles var downloadForm = new DownloadList(documents, client); downloadForm.ShowDialog(); }