Beispiel #1
0
        // -------------------------------------------------        NewRingSet
        private void NewRingSet (Point pt)
        {
            Form_DefineNewRing form = new Form_DefineNewRing (2, 26);
            if (form .ShowDialog () == DialogResult .OK)
            {
                RingSet ringSrc = form .Ring;
                RingSet ring = new RingSet (this, pt, 40, 120, ringSrc .Rings [0] .Values);
                ring .AddComment (-90, -0.4, DateTime .Now .ToShortTimeString (),
                                  new Font ("Microsoft Sans Serif", 10, FontStyle .Bold | FontStyle .Italic), 0, Color .Blue);
                RingArea ra = ring .Rings [0];
                ra .Colors = ringSrc .Rings [0] .Colors;
                for (int i = 0; i < ra .Comments .Count; i++)
                {
                    ra .Comments [i] .Text = ringSrc .Rings [0] .Comments [i] .Text;
                }
                ringsets .Insert (0, ring);

                RenewMover ();
                Invalidate ();
            }
        }
Beispiel #2
0
        // -------------------------------------------------        Click_miAddNewRing
        private void Click_miAddNewRing (object sender, EventArgs e)
        {
            RingSet rs = ringsets [iRingSetTouched];
            Form_DefineNewRing form = new Form_DefineNewRing (2, 26);
            if (form .ShowDialog () == DialogResult .OK)
            {
                RingSet ringSrc = form .Ring;
                RingArea ring = new RingArea (this, rs .Center, rs .OuterMostRadius + 20,
                                              rs .OuterMostRadius + 20 + 2 * RingSet .MinimumAllowedWidth, ringSrc .Rings [0] .Values);
                ring .Colors = ringSrc .Rings [0] .Colors;
                for (int i = 0; i < ring .Comments .Count; i++)
                {
                    ring .Comments [i] .Text = ringSrc .Rings [0] .Comments [i] .Text;
                }
                rs .AddRing (ring);

                RenewMover ();
                Invalidate ();
            }
        }
Beispiel #3
0
        // -------------------------------------------------        Click_miAddRingSet
        private void Click_miAddRingSet (object sender, EventArgs e)
        {
            Form_DefineNewRing form = new Form_DefineNewRing (2, 26);
            if (form .ShowDialog () == DialogResult .OK)
            {
                RingSet ringSrc = form .Ring;
                RingSet ring = new RingSet (this, ptMouse_Down, 40, 120, ringSrc .Rings [0] .Values);
                ring .AddComment (-90, -0.3, DateTime .Now .ToShortTimeString (),
                                  new Font ("Microsoft Sans Serif", 10, FontStyle .Bold | FontStyle .Italic), 0, Color .Blue);
                RingArea ra = ring .Rings [0];
                ra .Colors = ringSrc .Rings [0] .Colors;
                for (int i = 0; i < ra .Comments .Count; i++)
                {
                    ra .Comments [i] .Text = ringSrc .Rings [0] .Comments [i] .Text;
                }
                elems .Insert (0, new SingleElem (ring));

                RenewMover ();
                Invalidate ();
            }
        }