private void showInstencThread(Object paramsObj) { ParametersObject parametersObject = null; try { parametersObject = (ParametersObject)paramsObj; } catch { } MainWindow iWindow = new MainWindow(); iWindow.ShowDialog(); }
private bool runInstenceInThread(int idx) { ParametersObject parametersObject = new ParametersObject(kmapi, idx); Thread InstenceThread = new Thread(showInstencThread); InstenceThread.Name = "Instence-" + idx; InstenceThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; InstenceThread.IsBackground = true; InstenceThread.SetApartmentState(ApartmentState.STA); InstenceThread.Start(parametersObject); return(true); }