private void RollupSegmentation() { //Directory.CreateDirectory("..\\TempDLL"); //string specialFolder = Directory.GetCurrentDirectory() + "\\TempDLL"; //Environment.CurrentDirectory = Path.GetDirectoryName(Application.ExecutablePath); //string specialFolder = ".\\TempDLL"; //Directory.CreateDirectory(specialFolder); this.Cursor = Cursors.WaitCursor; m_rollup = new RollupSegmentation.RollupSegmentation(); m_rollup.strNetwork = Network.Network; this.Cursor = Cursors.WaitCursor; // Close all tabs associated with this network m_rollupThread = new Thread(new ThreadStart(m_rollup.DoRollup)); m_rollupThread.Priority = ThreadPriority.AboveNormal; m_rollupThread.Start(); timerRollup.Start(); }
private void buttonRollup_Click(object sender, EventArgs e) { LockInformation rollupCheck = Global.GetLockInfo(m_strNetworkID, ""); if (!rollupCheck.Locked) { rollupLock = Global.LockNetwork(m_strNetworkID, false); this.Cursor = Cursors.WaitCursor; buttonRollup.Enabled = false; Global.ClearOutputWindow(); m_rollup = new RollupSegmentation.RollupSegmentation(); m_rollup.strNetwork = m_strNetwork; this.Cursor = Cursors.WaitCursor; // Close all tabs associated with this network FormManager.CloseMultipleSimulations(m_strNetworkID); FormManager.CloseNetworkViewers(m_strNetworkID); m_rollupThread = new Thread(new ThreadStart(m_rollup.DoRollup)); //m_rollupThread.Priority = ThreadPriority.AboveNormal; try { m_rollupThread.Start(); timerRollup.Start(); } catch (Exception ex) { MessageBox.Show(ex.Message); } //currentLock.UnlockNetwork(); } else { Global.WriteOutput(rollupCheck.LockOwner + " started performing an action locking this network at " + rollupCheck.Start.ToString() + "."); } }