Exemplo n.º 1
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure you want to clear the drawing pane?", "DFA2CFG", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         src.Dispose();
         src               = new DFA_Wrapper(drawingBoard);
         src.DFAIsEdited  += UpdateDFATable;
         src.stateclicked += UpdateStateClicked;
         Utils.Drawing.DrawRectangle(drawingBoard, drawingBoard.Size);
         Registry.FixedImage = (Image)drawingBoard.Image.Clone();
         _clearWorkspace     = true;
         UpdateDFATable();
         _clearWorkspace = false;
         drawingBoard_MouseClick(sender, new MouseEventArgs(MouseButtons.Right, 1, 1, 1, 1));
     }
 }
Exemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();
            System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
            FileVersionInfo            fvi      = FileVersionInfo.GetVersionInfo(assembly.Location);
            string version = fvi.FileMajorPart + "." + fvi.FileMinorPart;

            this.Text = "DFA2CFG v" + version + " Beta";

            drawingBoard.Image        = new Bitmap(drawingBoard.Width, drawingBoard.Height);
            Utils.Registry.FixedImage = (Image)drawingBoard.Image.Clone();

            src               = new DFA_Wrapper(drawingBoard);
            src.DFAIsEdited  += UpdateDFATable;
            src.stateclicked += UpdateStateClicked;
            _clearWorkspace   = false;
        }