public Form1() { InitializeComponent(); manager = new Manager(); manager.AddTypes(typeof(CorbaProtocolManager)); manager.Activate(); component = manager.CreateComponent <LRFViewerComponent>(); if (component == null) { throw new ApplicationException("コンポーネントの作成に失敗しました。"); } component.Received_righthanddata += onReceived_righthanddata; component.Received_lefthanddata += onReceived_lefthanddata; component.Received_colordata += onReceived_colordata; list_rightpoints = new List <coloredPoint>(); g = pictureBox1.CreateGraphics(); blackpen = new Pen(Color.Blue, 3); redpen = new Pen(Color.Red, 2); bluepen = new Pen(Color.Black, 2); greenpen = new Pen(Color.Green, 2); gwidth = pictureBox1.Width; gheight = pictureBox1.Height; gratio = 300.0F; xoffset = pictureBox1.Width / 2; yoffset = pictureBox1.Height / 2; timer1.Start(); }
static void Main(string[] args) { var manager = new Manager(args); manager.AddTypes(typeof(CorbaProtocolManager)); manager.Activate(); var comp = manager.CreateComponent<WebToRTM>(); manager.Run(); }
public ActionResult Index() { ViewData["Message"] = "ASP.NET MVC へようこそ"; var manager = new Manager(); manager.AddTypes(typeof(CorbaProtocolManager)); manager.Activate(); var comp = manager.CreateComponent<ExampleComponent>(); manager.Run(); return View(); }
/// <summary> /// 初期化処理。コンポーネントの作成 /// </summary> private void MainForm_Load(object sender, EventArgs e) { manager = new Manager(); manager.AddTypes(typeof(CorbaProtocolManager)); manager.Activate(); component = manager.CreateComponent<WebRTC>(); if (component == null) { throw new ApplicationException("コンポーネントの作成に失敗しました。"); } component.DataReceived += ReceiveData; //HTTP daemon開始 HttpDaemon httpd = new HttpDaemon(component); httpd.startListener(); }
protected override void OnInput(GameTime time, int updateCounter) { if (Session.IsGameOver) { HandleGameOver(); } else { Session.Time += time.ElapsedSeconds(); if (Session.CurrentAtom != null && IsMouseOverGrid() && Mouse.IsButtonPressed(MouseButton.Left)) { var gridPos = GetMouseGridPos(); if (Grid.SetAtom(gridPos.X, gridPos.Y, Session.CurrentAtom)) { Session.AddedAtoms++; Session.CurrentAtom = Session.NextAtom; Session.NextAtom = GetNextAtom(); Session.IsGameOver = CheckGameOver(); } } if (Keyboard.IsKeyReleased(Keys.Escape)) { Manager.Activate <GameMenuScreen>(); } #if CHEATS_ENABLED HandleCheats(); #endif } }