Exemple #1
0
        static void Main(String[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (args.Length == 0 || (type = args[0].ToLower()[1]) == 'c')
            {
                Application.Run(new frmConfig());
            }
            else
            {
                Painter    painter    = new Painter();
                controller controller = new controller(painter);
                Timer      timer      = new Timer();
                timer.Interval = 100;
                timer.Tick    += timer_tick;
                timer.Start();
                switch (type)
                {
                case 's':
                    Form f = new frmScreen(painter.getPaper());
                    controller.init();
                    Application.Run(f);
                    break;

                case 'p':
                    new otherWindow(int.Parse(args[1]), painter.getPaper());
                    Application.Run();
                    break;
                }
            }
        }
Exemple #2
0
 //public static MouseEventArgs mouseEvent = null;
 public frmScreen(Bitmap paper)
 {
     InitializeComponent();
     SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw, true);
     this.paper          = paper;
     scr                 = this;
     controller.main.frm = this;
 }