Exemple #1
0
        private void btnUpload_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtFile.Text))
            {
                onOpen(null, null);
            }
            if (currentFiles == null)
            {
                return;
            }

            foreach (string fn in currentFiles)
            {
                if (string.IsNullOrEmpty(fn) || !File.Exists(fn))
                {
                    MessageBox.Show("File not found: " + fn, "Upload");
                    return;
                }
            }

            string busic = cbbBusic.SelectedItem?.ToString();

            Core.UploadUi(client, busic, uid, currentFiles,
                          (resulved) =>
            {
                SemanticObject attId0 = (SemanticObject)resulved.Get("a_attaches");     // some Id losted when resulving
                lbAttachId.Invoke((MethodInvoker) delegate
                {
                    lbAttachId.Text = "last file recId: " + attId0.Get("attId");
                });
            });
        }
Exemple #2
0
        private void btnUpload_Click(object sender, EventArgs e)
        {
            foreach (string fn in ExApp.currentFiles)
            {
                if (string.IsNullOrEmpty(fn) || !File.Exists(fn))
                {
                    MessageBox.Show("File not found: " + fn, "Upload");
                    return;
                }
            }

            //if (onlyGlb.Checked)
            //{
            //    string glb = Core.ConvertGlb(ExApp.currentFiles[0]);
            //    ExApp.currentFiles.Clear();
            //    ExApp.currentFiles.Add(glb);
            //}

            string uid = client.ssInf.uid;

            Core.UploadUi(client, null, uid, ExApp.currentFiles,
                          (resulved) =>
            {
                SemanticObject attId0 = (SemanticObject)resulved.Get("a_attaches");     // some Id losted when resulving
                lbAttachId.Invoke((MethodInvoker) delegate
                {
                    lbAttachId.Text = "last file recId: " + attId0.Get("attId");
                });
            });
        }