예제 #1
0
 private void btn_Delete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("删除此选项卡会将此选项卡内的快捷方式全部删除,请先确认是否删除此选项卡?", "删除", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
     {
         JObject jobject = JsonHelper.readJson();
         if (JsonHelper.DeleteTabPageJsonValue(jobject, txt_tabpageid.Text, 0))
         {
             JsonHelper.UpdateTabPagename("delete", jobject, "apptag", lbl_tabpagename.Text, txt_tabpagename.Text, 0);
             MessageBox.Show("删除成功!");
             LoadTabPages();
             if (MyEvent != null)
             {
                 MyEvent("删除成功");//触发事件
             }
         }
         else
         {
             MessageBox.Show("删除失败!");
         }
         Cancel();
     }
 }