private void button5_Click( object sender, EventArgs e ) { IConnector connector = new Connector( ); string newname = this.textBox2.Text; IArtifact a = connector.CreateArtifact( this.Handle.ToInt64( ), "Word (*.doc)|*.doc|Wordx(*.docx)|*.docx|RTF(*.rtf)|*.rtf||", ref newname ); if( a != null && a.Id != null ) { a.Lock( ); string tempFile = textBox2.Text + ".tmp"; System.IO.File.Copy( textBox2.Text, tempFile, true ); a.Upload( tempFile ); a.UnLock( ); } }
private void button9_Click( object sender, EventArgs e ) { IConnector connector = new Connector( ); string filename = "Suggested Filename"; IArtifact a = connector.CreateArtifact( this.Handle.ToInt64( ), "Doc (*.doc)|*.doc|DocX (*.docx)|*.docx|Text (*.txt)|*.txt||", ref filename ); if( a != null ) { this.textBox1.Text = "http://" + a.Id;// +":" + a.VersionLabel; this.textBox1.Tag = a; } }