예제 #1
0
        private void showInstencThread(Object paramsObj)
        {
            ParametersObject parametersObject = null;

            try { parametersObject = (ParametersObject)paramsObj; } catch { }

            MainWindow iWindow = new MainWindow();

            iWindow.ShowDialog();
        }
예제 #2
0
        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);
        }