Esempio n. 1
0
        public World(Context InputContext, Theme Theme)
        {
            this._Arcs = new List<Arc>();
            this._Nodes = new List<Node>();
            this._Theme = Theme;

            InputContext.RegisterProbeSignalChange(this._ProbeSignalChange);
            InputContext.RegisterUpdate(this._Update);
            this._InputContext = InputContext;
        }
Esempio n. 2
0
File: Text.cs Progetto: dzamkov/DUIP
            public override RemoveHandler Link(Context Context)
            {
                // Update context and link information
                this._Context = Context;
                this.TextBlock._Linked = this;
                RemoveHandler rh = delegate
                {
                    this._Context = null;
                    this.TextBlock._Linked = null;
                };

                // Probe signal change handler for selection
                rh += Context.RegisterProbeSignalChange(delegate(Probe Probe, ProbeSignal Signal, bool Value, ref bool Handled)
                {
                    if (Signal == ProbeSignal.Primary && Value)
                    {
                        _SelectionInfo sel = this.TextBlock._Selection;
                        throw new NotImplementedException();
                    }
                });

                // Clean up context with remove handler
                rh += delegate
                {
                    if (this._ReleaseProbe != null)
                    {
                        this._ReleaseProbe();
                    }
                    if (this._RemoveUpdate != null)
                    {
                        this._RemoveUpdate();
                    }
                    if (this._RemoveProbeMessage != null)
                    {
                        this._RemoveProbeMessage();
                    }
                };

                return rh;
            }