public GroupCalculationProgressDialog(IGraph graph, GroupsCheckedList chkList, ShowMetricCalculateResult oShowMetricCalculateResult)
        {
            InitializeComponent();
            m_oGroupsCheckedList = chkList;
            m_oGroupCalculatorManager = new GroupCalculatorManager();
            m_ograph = graph;

            m_oGroupCalculatorManager.CalculationProgressChanged += new ProgressChangedEventHandler(Manager_ProgressChanged);
            m_oGroupCalculatorManager.CalculationCompleted += new RunWorkerCompletedEventHandler(Manager_WorksCompleted);

            m_oShowMetricCalculateResult = oShowMetricCalculateResult;
            m_oGroupCalculatorManager.attach(m_oShowMetricCalculateResult);
        }
 public void SetAndShowGraph(object sender, IgraphGenerateEvent e)
 {
     layoutControl1.SetAndShowGraph(e.getGraph());
     m_oShowMetricCalculateResult = new ShowMetricCalculateResult();     
 }
 public GroupSettingDialog(IGraph graph, ShowMetricCalculateResult oShowMetricCalculateResult)
 {
     InitializeComponent();
     this.m_oGraph = graph;
     this.m_oShowMetricCalculateResult = oShowMetricCalculateResult;
 }
 private void button5_Click(object sender, EventArgs e)
 {
     if (m_oShowMetricCalculateResult == null)
         m_oShowMetricCalculateResult = new ShowMetricCalculateResult();
     if (layoutControl1.Graph.Vertices.Count > 0)
     {
         GroupSettingDialog oGroupSettingDialog = new GroupSettingDialog(layoutControl1.Graph, m_oShowMetricCalculateResult);
         if (oGroupSettingDialog.ShowDialog() == DialogResult.OK)
         {
             DialogResult = DialogResult.OK;
             m_oResultDataTableObservableBase = m_oShowMetricCalculateResult.m_oDataTableObservableBase;
         }
     }
     else
     {
         MessageBox.Show("Error: 請先選好讀入的Graph", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 public GroupItemSelecter(IGraph graph, ShowMetricCalculateResult oShowMetricCalculateResult)
 {
     InitializeComponent();
     this.m_oGraph = graph;
     this.m_oShowMetricCalculateResult = oShowMetricCalculateResult;
 }