예제 #1
0
        void AddCount(ucCounter cnt, bool showLeft)
        {
            const int delta = 150;
            var       wnd   = new vwCount();

            wnd.Owner = null; // this;
            if (showLeft)
            {
                wnd.Left = this.Left + delta;
            }
            else
            {
                wnd.Left = this.Width - wnd.Width - delta;
            }
            wnd.Top = this.Top + (this.Height - wnd.Height) / 2;
            wnd.ShowDialog();
            cnt.AddCount(wnd.Count);
        }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.PlayerAName = ((System.Windows.Controls.TextBlock)(target));

            #line 37 "..\..\MainWindow.xaml"
                this.PlayerAName.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.btnPlayer);

            #line default
            #line hidden
                return;

            case 2:
                this.PlayerBName = ((System.Windows.Controls.TextBlock)(target));

            #line 40 "..\..\MainWindow.xaml"
                this.PlayerBName.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.btnPlayer);

            #line default
            #line hidden
                return;

            case 3:
                this.PlayerA = ((Watt.ucCounter)(target));
                return;

            case 4:
                this.PlayerB = ((Watt.ucCounter)(target));
                return;

            case 5:
                this.Hauptschlag = ((Watt.ucHauptschlag)(target));
                return;
            }
            this._contentLoaded = true;
        }