private async Task ShowDeviceWindow() { DeviceWindow window = new DeviceWindow(); window.Show(); await Task.CompletedTask; }
/// <summary> /// 设备管理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsmiDevice_Click(object sender, EventArgs e) { if (null == deviceWindow || deviceWindow.IsDisposed) { deviceWindow = new DeviceWindow(); deviceWindow.MdiParent = this; deviceWindow.StartLoad += (obj, ev) => { StartLoad(obj); }; deviceWindow.StopLoad += (obj, ev) => { StopLoad(obj); }; deviceWindow.Show(); } SetSelect(null, tsmiDevice); deviceWindow.Activate(); }