protected override void OnBroadcastContext(BroadcastContextEventArgs e) { base.OnBroadcastContext(e); if (e.Context is Microscope) { microscope = e.Context as Microscope; microscope.WsiCompositesChanged += OnWsiCompositesChanged; microscope.WsiResolve += OnWsiResolve; //microscope.WsiComposites[0].Tile.WsiBox.WsiNavigation.Goto() wtbShowMessage = microscope.ToolBar.CreateToolButton(); wtbShowMessage.Image = TangoIconSet.LoadIcon(TangoIcon.Preferences_System_Windows); wtbShowMessage.ToolTipText = "Show message"; wtbShowMessage.Click += delegate { ShowMessage("Hallo Welt."); }; wtbDock = microscope.ToolBar.CreateToolButton(); wtbDock.Image = TangoIconSet.LoadIcon(TangoIcon.Window_New); wtbDock.ToolTipText = "Show dock"; wtbDock.Checked = true; wtbDock.Click += delegate { ToggleDock(); }; tb = new TextBox(); tb.Parent = microscope.DockAreas.Bottom; tb.ScrollBars = ScrollBars.Both; tb.Dock = DockStyle.Bottom; tb.BackColor = Color.Red; tb.WordWrap = false; tb.Multiline = true; tb.Visible = true; tb.Height = 100; } }
public readonly Microscope Microscope; // TODO: Evaluate whether this should also be a subsystem. public IOHandler() { this.RailController = new Rail(); this.TurntableController = new Turntable(); this.ToolheadController = new Toolhead(); this.DrillController = new Drill(); this.Microscope = new Microscope(); }
/// <summary> /// 初始化。场景加载完成之后 /// </summary> public void Init() { microscope = Manager.Instance.microscope; microscope.aim.Init(); //漫游实例 Manager.Instance.roamPathManager = new RoamPathManager(); Manager.Instance.roamManager = new RoamManager(); }
public static Microscope ToMicroscope(this MicroscopeEntity newEntity, Microscope oldEntity = null) { Microscope entity = oldEntity; if (entity == null) { entity = new Microscope(); } entity.Model = newEntity.Model; entity.Type = newEntity.Type; entity.Producer = newEntity.Producer; return(entity); }
public static MicroscopeEntity ToMicroscopeEntity(this Microscope model) { if (model == null) { return(null); } MicroscopeEntity entity = new MicroscopeEntity(); entity.Id = model.Id; entity.Model = model.Model; entity.Type = model.Type; entity.Producer = model.Producer; return(entity); }
protected override void OnBroadcastContext(BroadcastContextEventArgs e) { base.OnBroadcastContext(e); if (e.Context is Microscope) { microscope = e.Context as Microscope; microscope.WsiCompositesChanged += OnWsiCompositesChanged; wtbConnect = microscope.ToolBar.CreateToolButton(); wtbConnect.Image = TangoIconSet.LoadIcon(TangoIcon.Input_Gaming); wtbConnect.ToolTipText = "Connect navigation"; wtbConnect.ShortcutKeys = Keys.T; wtbConnect.Click += delegate { ToggleConnect(); }; wtbZoomIn = microscope.ToolBar.CreateToolButton(); wtbZoomIn.ToolTipText = "Zoom In"; wtbZoomOut = microscope.ToolBar.CreateToolButton(); wtbZoomOut.ToolTipText = "Zoom Out"; } }
// Use this for initialization void Start() { Microscope = GameObject.FindGameObjectWithTag("Microscope").GetComponent <Microscope>(); GenomeEditor = GameObject.FindGameObjectWithTag("Genome Editor").GetComponent <GenomeEditor>(); }
private void Awake() { Master = GetComponentInParent <Microscope>(); }
protected override void OnBroadcastContext(BroadcastContextEventArgs e) { base.OnBroadcastContext(e); SendItems = new ConcurrentQueue<BTContent>(); RecvItems = new ConcurrentQueue<BTContent>(); if (e.Context is Microscope) { microscope = e.Context as Microscope; microscope.WsiCompositesChanged += OnWsiCompositesChanged; lbListing = new ListBox(); lbListing.Parent = microscope.DockAreas.Bottom; lbListing.SelectionMode = SelectionMode.None; lbListing.Dock = DockStyle.Bottom; lbListing.BackColor = Color.Purple; lbListing.Visible = true; lbListing.Height = 100; Source.DataSource = Items; lbListing.DataSource = Source; lbListing.DisplayMember = "Data"; lbListing.DataBindings.Add(new Binding("Text", Source, "Data", true, DataSourceUpdateMode.OnPropertyChanged)); StartBluetooth(); AddMessage(MessageSource.Info, "Waiting for new Connection..."); } }