/// <summary> /// 添加 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ToolStripMenuItem_add_Click(object sender, EventArgs e) { StreamMediaList tmpStreamMediaData = null; List <DeviceTypeList> tmpDeviceTypeList = tmpListDeviceType; Add_Modify_StreamMedia tmp = new Add_Modify_StreamMedia(tmpStreamMediaData, tmpDeviceTypeList); tmp.ShowDialog(); if (tmp.result == DialogResult.OK) { getStreamMediaList(); } }
/// <summary> /// 修改 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ToolStripMenuItem_edittype_Click(object sender, EventArgs e) { StreamMediaList tmpStreamMediaData = new StreamMediaList(); List <DeviceTypeList> tmpDeviceTypeList = tmpListDeviceType; for (int i = 0; i < tmpListStreamMedia.Count; i++) { if (tmpListStreamMedia[i].DeviceID == _tmpStreamMediaList.DeviceID) { tmpStreamMediaData = tmpListStreamMedia[i]; break; } } Add_Modify_StreamMedia tmp = new Add_Modify_StreamMedia(tmpStreamMediaData, tmpDeviceTypeList); tmp.ShowDialog(); if (tmp.result == DialogResult.OK) { getStreamMediaList(); } }