Esempio n. 1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            ClipClass clip = new ClipClass(rstartX, rwidth, rstartY, rheight, aX, aY, bX, bY);

            clip.clip();

            //первая линия
            out1X1 = aX;
            out1Y1 = aY;
            out1X2 = clip.x1;
            out1Y2 = clip.y1;

            //вторая линия
            out2X1 = bX;
            out2Y1 = bY;
            out2X2 = clip.x0;
            out2Y2 = clip.y0;

            // aX = clip.x0;
            // aY = clip.y0;
            // bX = clip.x1;
            // bY = clip.y1;

            isResult = true;

            panel1.Refresh();
        }
 private static void STAClipBoard(string myStringWithHtmlCode)
 {
     ClipClass clipClass = new ClipClass();
     clipClass.myString = myString;
     System.Threading.Thread t = new System.Threading.Thread(clipClass.CopyToClipBoard);
        t.SetApartmentState(System.Threading.ApartmentState.STA);
        t.Start();
        t.Join();
    }
Esempio n. 3
0
        private void Button1_Click(object sender, EventArgs e)
        {
            ClipClass clip = new ClipClass(rstartX, rwidth, rstartY, rheight, aX, aY, bX, bY);

            clip.clip();
            aX = clip.x0;
            aY = clip.y0;
            bX = clip.x1;
            bY = clip.y1;
            panel1.Refresh();
        }