コード例 #1
0
        private void btn_EditStructure_Click(object sender, EventArgs e)
        {
            Structure structure = (Structure)lstbx_Structures.SelectedItem;

            this.Hide();
            EnterStructInfo enterStructInfo = new EnterStructInfo(structure);

            enterStructInfo.MdiParent = Program.StartScrn;
            enterStructInfo.Show();
        }
コード例 #2
0
        private void btn_AddStructure_Click(object sender, EventArgs e)
        {
            Structure structure = new Structure();

            Program.CurrentJob.Structures.Add(structure);
            EnterStructInfo enterStructInfo = new EnterStructInfo(structure);

            enterStructInfo.MdiParent = Program.StartScrn;
            enterStructInfo.Show();
        }
コード例 #3
0
 private void sketchArea_MouseClickNormal(object sender, MouseEventArgs e)
 {
     foreach (Structure s in Program.CurrentJob.Structures)
     {
         if (s.Rect.Contains(sketchArea.PointToClient(MousePosition)))
         {
             EnterStructInfo structInfo = new EnterStructInfo(s);
             structInfo.Show();
             break;
         }
     }
 }
コード例 #4
0
        private void btn_ConnectNew_Click(object sender, EventArgs e)
        {
            PipeEnd p = (PipeEnd)lstbx_Pipes.SelectedItem;

            Structure s = new Structure();

            Program.CurrentJob.Structures.Add(s);
            EnterStructInfo enterStructInfo = new EnterStructInfo(s);

            if (enterStructInfo.ShowDialog() == DialogResult.Cancel)
            {
                Program.CurrentJob.Structures.Remove(s);
            }
        }