Example #1
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (sfdSaveGraphFile.ShowDialog() == System.Windows.Forms.DialogResult.OK && validateGraph())
     {
         CGraphManager graphman = new CGraphManager(this, m_log);
         graphman.SaveGraph(graphCtrl, sfdSaveGraphFile.FileName);
         m_dirty = false;
     }
 }
Example #2
0
 private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (ofdOpenFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         List <Node> nodeList = new List <Node>();
         foreach (Node n in graphCtrl.Nodes)
         {
             nodeList.Add(n);
         }
         graphCtrl.RemoveNodes(nodeList);
         graphCtrl.Refresh();
         CGraphManager graphman = new CGraphManager(this, m_log);
         graphman.LoadGraph(graphCtrl, ofdOpenFile.FileName);
         m_dirty = false;
     }
 }
Example #3
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (m_dirty)
            {
                if (MessageBox.Show("Save before starting a new conversation?", "Save", MessageBoxButtons.YesNoCancel) == System.Windows.Forms.DialogResult.Yes)
                {
                    if (sfdSaveGraphFile.ShowDialog() == System.Windows.Forms.DialogResult.OK && validateGraph())
                    {
                        CGraphManager graphman = new CGraphManager(this, m_log);
                        graphman.SaveGraph(graphCtrl, sfdSaveGraphFile.FileName);
                    }
                }
            }
            List <Node> nodeList = new List <Node>();

            foreach (Node n in graphCtrl.Nodes)
            {
                nodeList.Add(n);
            }
            graphCtrl.RemoveNodes(nodeList);
            graphCtrl.Refresh();
            m_dirty = false;
        }
Example #4
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (sfdSaveGraphFile.ShowDialog() == System.Windows.Forms.DialogResult.OK && validateGraph())
     {
         CGraphManager graphman = new CGraphManager(this, m_log);
         graphman.SaveGraph(graphCtrl, sfdSaveGraphFile.FileName);
         m_dirty = false;
     }
 }
Example #5
0
 private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if(ofdOpenFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         List<Node> nodeList = new List<Node>();
         foreach (Node n in graphCtrl.Nodes)
             nodeList.Add(n);
         graphCtrl.RemoveNodes(nodeList);
         graphCtrl.Refresh();
         CGraphManager graphman = new CGraphManager(this, m_log);
         graphman.LoadGraph(graphCtrl, ofdOpenFile.FileName);
         m_dirty = false;
     }
 }
Example #6
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if(m_dirty)
     {
         if(MessageBox.Show("Save before starting a new conversation?", "Save", MessageBoxButtons.YesNoCancel) == System.Windows.Forms.DialogResult.Yes)
         {
             if (sfdSaveGraphFile.ShowDialog() == System.Windows.Forms.DialogResult.OK && validateGraph())
             {
                 CGraphManager graphman = new CGraphManager(this, m_log);
                 graphman.SaveGraph(graphCtrl, sfdSaveGraphFile.FileName);
             }
         }
     }
     List<Node> nodeList = new List<Node>();
     foreach (Node n in graphCtrl.Nodes)
         nodeList.Add(n);
     graphCtrl.RemoveNodes(nodeList);
     graphCtrl.Refresh();
     m_dirty = false;
 }