Exemplo n.º 1
0
        private void PoleMoveBinding(Vehicle T, bool isPushPole, UIVehicals.Tjc tjc)
        {
            Binding myBinding = new Binding();

            myBinding.Source = T.DataRead;
            myBinding.Path   = new PropertyPath(isPushPole ? "PushPoleLength" : "PingPoleLength");
            PoleMoveConverter move = new PoleMoveConverter();

            move.IsPushPole = isPushPole;
            if (isPushPole)
            {
                move.Pause = ((TjcTogetherInfo)T.DataRead.TogetherInfo).PushPolePause;
            }
            myBinding.Converter = move;
            (isPushPole ? tjc.pushPole : tjc.pingPole).SetBinding(MarginProperty, myBinding);
        }
Exemplo n.º 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.mainCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 3:
                this.tjc1 = ((WGPM.R.UI.UIVehicals.Tjc)(target));
                return;

            case 4:
                this.tjc2 = ((WGPM.R.UI.UIVehicals.Tjc)(target));
                return;

            case 5:
                this.ljc1 = ((WGPM.R.UI.UIVehicals.Ljc)(target));
                return;

            case 6:
                this.ljc2 = ((WGPM.R.UI.UIVehicals.Ljc)(target));
                return;

            case 7:
                this.mc1 = ((WGPM.R.UI.UIVehicals.Mc)(target));
                return;

            case 8:
                this.mc2 = ((WGPM.R.UI.UIVehicals.Mc)(target));
                return;
            }
            this._contentLoaded = true;
        }