示例#1
0
 public override void Show()
 {
     if (!drawing)
     {
         DoubleBuffering.getinstance().callback_work += delegate()
         {
             for (int i = 0; i < activation.Length; i++)
             {
                 if (activation[i])
                 {
                     DoubleBuffering.getinstance().getGraphics.DrawLine(LineColors.Pens[i], point1, point2);
                     return;
                 }
             }
             //if (activation[0])
             //{
             //    DoubleBuffering.getinstance().getGraphics.DrawLine(ActivatePen, point1, point2);
             //}
             //else
             //{
             DoubleBuffering.getinstance().getGraphics.DrawLine(DrawingPen, point1, point2);
             //}
         };
     }
 }
示例#2
0
 public virtual void Show()
 {
     if (!drawing)
     {
         drawing = true;
         DoubleBuffering.getinstance().callback_work += draw;
     }
 }
示例#3
0
 public virtual void unShow()
 {
     if (drawing)
     {
         drawing = false;
         DoubleBuffering.getinstance().callback_work -= draw;
     }
 }
示例#4
0
        public Form1()
        {
            InitializeComponent();
            Timer_State.getinstance(this);
            DoubleBuffering.getinstance().setInstance(this);
            Form_input.binding(this);

            MainProgram.init(this);
        }
示例#5
0
        public Mainprogram(Form1 form)
        {
            db = DoubleBuffering.getinstance();
            db.setInstance(form);
            Timer_State.getinstance(form);
            this.form = form;
            tv        = new TextViewer();

            Helper              = new ansHanoi();
            map                 = new GraphicMap(form);
            GraphicMap.moveend += moveend;
        }
示例#6
0
        public TextViewer()
        {
            db = DoubleBuffering.getinstance();

            cal = new Threading_Timer_v0();
            cal.setInterval(10);
            cal.setCallback(() =>
            {
                if (calc != null)
                {
                    calc();
                }
            });
            cal.Start();
            strpoint   = new Point(270, 150);
            timepoint  = new Point(270, 180);
            indexpoint = new Point(550, 180);
        }
 void DownloaderControl_Load(object sender, EventArgs e)
 {
     DoubleBuffering.SetDoubleBuffered(this);
     if (!directStart)
     {
         btnPauseResume.Text    = dorg.Status == HttpDownloaderStatus.Completed ? "Download again" : "Resume";
         btnPauseResume.Enabled = true;
     }
     else
     {
         if (dorg.Ranges != null && dorg.Ranges.Any())
         {
             dorg.Resume();
         }
         else
         {
             dorg.Start();
         }
     }
 }
示例#8
0
 public void draw()
 {
     DoubleBuffering.getinstance().getGraphics.DrawLine(DrawingPen, p1, p2);
 }
示例#9
0
 public Map()
 {
     Screen     = DoubleBuffering.getinstance();
     CenterLine = new Line();
 }
示例#10
0
 void drawindexno()
 {
     DoubleBuffering.getinstance().getGraphics.DrawString(indexstr, f, brush, indexpoint);
 }
示例#11
0
 void drawtime()
 {
     DoubleBuffering.getinstance().getGraphics.DrawString(timestr, f, brush, timepoint);
 }
示例#12
0
 void drawwait()
 {
     DoubleBuffering.getinstance().getGraphics.DrawString(str, font, brush, strpoint);
 }
示例#13
0
 protected override void Draw()
 {
     DoubleBuffering.getinstance().getGraphics.FillRectangle(riverbrush, 180, 420, 550, 100);
 }
示例#14
0
 protected override void draw()
 {
     DoubleBuffering.getinstance().getGraphics.FillRectangle(brush, (float)draw_x, (float)draw_y, width, height);
     DoubleBuffering.getinstance().getGraphics.DrawRectangle(edgePen, (float)draw_x, (float)draw_y, width, height);
     DoubleBuffering.getinstance().getGraphics.DrawString(num + "", font, strbrush, (float)this.x - 5, (float)this.y - 5);
 }
示例#15
0
 public virtual void unShow()
 {
     DoubleBuffering.getinstance().callback_work -= draw;
 }
示例#16
0
 protected override void draw()
 {
     DoubleBuffering.getinstance().getGraphics.FillRectangle(brush, (float)draw_x, (float)draw_y, width, height);
     DoubleBuffering.getinstance().getGraphics.DrawRectangle(edgePen, (float)draw_x, (float)draw_y, width, height);
 }