Esempio n. 1
0
        /// <summary>
        /// 保存至数据库
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            string name = txtName.Text.ToString();
            string type = ((ComboxItem)cboType.SelectedItem).Values;
            int    res  = ws.InsertVRIntoDataBase(name, "quanjing/qj" + folderNum + "/index.html", "quanjing/qj" + folderNum + "/images/preview_nodeimage_node1.jpg", type, "skrrr");

            if (res > 0)
            {
                if (path != "")
                {
                    //显示进度
                    label3.Visible       = false;
                    lblSize.Visible      = true;
                    lblSpeed.Visible     = true;
                    lblState.Visible     = true;
                    lblTime.Visible      = true;
                    progressBar1.Visible = true;

                    //对文件夹进行改名、压缩
                    string[] temp = path.Split('\\');
                    temp[temp.Length - 1] = "qj" + folderNum;
                    newPath = "";
                    for (int i = 0; i < temp.Length; i++)
                    {
                        if (i != temp.Length - 1)
                        {
                            newPath += temp[i] + "\\";
                        }
                        else
                        {
                            newPath += temp[i];
                        }
                    }
                    Directory.Move(path, newPath);
                    CompressRar(newPath + "\\", "D:\\" + "qj" + folderNum + ".zip");

                    //上传至服务器
                    int res2 = Upload_Request2("http://101.37.245.109/save.aspx", "D:\\" + "qj" + folderNum + ".zip", "qj" + folderNum + ".rar", progressBar1);
                    if (res == 1)
                    {
                        MessageBox.Show("全景录入成功!请前往录入相应的商品");
                        File.Delete("D:\\" + "qj" + folderNum + ".zip");
                        Data.qjNum = "qj" + folderNum;
                        Frm_Good frm_Good = new Frm_Good();
                        frm_Good.Show();
                    }
                    else
                    {
                        MessageBox.Show("上传至服务器失败!");
                    }
                }
                else
                {
                    MessageBox.Show("请将文件拖入下方区域!!");
                }
            }
            else
            {
                MessageBox.Show("录入失败!");
            }
        }
Esempio n. 2
0
        private void 商品录入ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Frm_Good frm_Good = new Frm_Good();

            frm_Good.Show();
        }