public GameTabPage()
        {
            this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);

            this.MouseMove  += this.OnMouseMove;
            this.MouseClick += this.OnMouseClick;

            this.fiber = new FormFiber(this, new DefaultExecutor());
            this.fiber.Start();
        }
        public GameTabPage()
        {
            this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);

            this.MouseMove += this.OnMouseMove;
            this.MouseClick += this.OnMouseClick;

            this.fiber = new FormFiber(this, new DefaultExecutor());
            this.fiber.Start();
        }
 public FooForm()
 {
     InitializeComponent();
     _ServerMessageChannel = new Channel <string>();
     _WorkFiber            = new PoolFiber();
     _FormFiber            = new _Fiber = new FormFiber(this, new BatchAndSingleExecutor());
     _WorkFiber.Start();     //begin recive messages
     _FormFiber.Start();     //begin recive messages
     _WorkFiber.Enqueue(LissenToServer);
     _ServerMessageChannel.Subscribe(_FormFiber, (x) => textBox1.Text = x);
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="WorldForm"/> class.
        /// </summary>
        public WorldForm()
        {
            this.gameCounter = 0;

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_OnUnhandledException;
            Application.ThreadException += Application_OnThreadException;

            this.InitializeComponent();

            this.MouseWheel += this.OnMouseWheel;

            // diagnostics
            this.fiber = new FormFiber(this, new DefaultExecutor());
            this.fiber.Start();
            Settings settings = Program.GetDefaultSettings();
            this.diagnosticsPeer = new PhotonPeer(this, settings.UseTcp);
            this.counterGraph.GraphPane.Title.Text = "Server Performance";
            this.counterGraph.GraphPane.YAxis.Title.Text = "Value";
            this.counterGraph.GraphPane.YAxis.Scale.Min = 0;
            this.counterGraph.GraphPane.XAxis.Title.Text = "Time";
            this.counterGraph.GraphPane.XAxis.Scale.MajorUnit = DateUnit.Second;
        }
Exemple #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WorldForm"/> class.
        /// </summary>
        public WorldForm()
        {
            this.gameCounter = 0;

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_OnUnhandledException;
            Application.ThreadException += Application_OnThreadException;

            this.InitializeComponent();

            this.MouseWheel += this.OnMouseWheel;

            // diagnostics
            this.fiber = new FormFiber(this, new DefaultExecutor());
            this.fiber.Start();
            Settings settings = Program.GetDefaultSettings();

            this.diagnosticsPeer = new PhotonPeer(this, settings.UseTcp);
            this.counterGraph.GraphPane.Title.Text            = "Server Performance";
            this.counterGraph.GraphPane.YAxis.Title.Text      = "Value";
            this.counterGraph.GraphPane.YAxis.Scale.Min       = 0;
            this.counterGraph.GraphPane.XAxis.Title.Text      = "Time";
            this.counterGraph.GraphPane.XAxis.Scale.MajorUnit = DateUnit.Second;
        }