Exemple #1
0
        public CIAModel(ConquerItAllView ciav)
        {
            AttackerDice = new List <Random>();

            for (int i = 0; i < 3; i++)
            {
                AttackerDice.Add(new Random((int)DateTime.Now.Ticks & 0x0000FFFF));
                Thread.Sleep(50);
            }

            DefenderDice = new List <Random>();

            this.ciav = ciav;

            for (int i = 0; i < 2; i++)
            {
                DefenderDice.Add(new Random((int)DateTime.Now.Ticks & 0x0000FFFF));
                Thread.Sleep(50);
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((Conquer_It_All.ConquerItAllView)(target));

            #line 6 "..\..\ConquerItAllView.xaml"
                this.window.Loaded += new System.Windows.RoutedEventHandler(this.window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.viewbox = ((System.Windows.Controls.Viewbox)(target));
                return;

            case 3:
                this.uniformGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.MapCanvas = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.Map = ((System.Windows.Controls.Image)(target));
                return;

            case 6:
                this.Territory1 = ((System.Windows.Controls.Label)(target));

            #line 19 "..\..\ConquerItAllView.xaml"
                this.Territory1.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 7:
                this.Territory2 = ((System.Windows.Controls.Label)(target));

            #line 20 "..\..\ConquerItAllView.xaml"
                this.Territory2.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 8:
                this.Territory3 = ((System.Windows.Controls.Label)(target));

            #line 21 "..\..\ConquerItAllView.xaml"
                this.Territory3.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 9:
                this.Territory4 = ((System.Windows.Controls.Label)(target));

            #line 22 "..\..\ConquerItAllView.xaml"
                this.Territory4.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 10:
                this.Territory5 = ((System.Windows.Controls.Label)(target));

            #line 23 "..\..\ConquerItAllView.xaml"
                this.Territory5.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 11:
                this.Territory6 = ((System.Windows.Controls.Label)(target));

            #line 24 "..\..\ConquerItAllView.xaml"
                this.Territory6.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 12:
                this.Territory7 = ((System.Windows.Controls.Label)(target));

            #line 25 "..\..\ConquerItAllView.xaml"
                this.Territory7.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 13:
                this.Territory8 = ((System.Windows.Controls.Label)(target));

            #line 26 "..\..\ConquerItAllView.xaml"
                this.Territory8.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 14:
                this.Territory9 = ((System.Windows.Controls.Label)(target));

            #line 27 "..\..\ConquerItAllView.xaml"
                this.Territory9.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 15:
                this.Territory10 = ((System.Windows.Controls.Label)(target));

            #line 28 "..\..\ConquerItAllView.xaml"
                this.Territory10.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 16:
                this.Territory11 = ((System.Windows.Controls.Label)(target));

            #line 29 "..\..\ConquerItAllView.xaml"
                this.Territory11.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 17:
                this.Territory12 = ((System.Windows.Controls.Label)(target));

            #line 30 "..\..\ConquerItAllView.xaml"
                this.Territory12.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 18:
                this.Territory13 = ((System.Windows.Controls.Label)(target));

            #line 31 "..\..\ConquerItAllView.xaml"
                this.Territory13.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 19:
                this.Territory14 = ((System.Windows.Controls.Label)(target));

            #line 32 "..\..\ConquerItAllView.xaml"
                this.Territory14.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 20:
                this.Territory15 = ((System.Windows.Controls.Label)(target));

            #line 33 "..\..\ConquerItAllView.xaml"
                this.Territory15.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 21:
                this.Territory16 = ((System.Windows.Controls.Label)(target));

            #line 34 "..\..\ConquerItAllView.xaml"
                this.Territory16.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 22:
                this.Territory17 = ((System.Windows.Controls.Label)(target));

            #line 35 "..\..\ConquerItAllView.xaml"
                this.Territory17.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 23:
                this.Territory18 = ((System.Windows.Controls.Label)(target));

            #line 36 "..\..\ConquerItAllView.xaml"
                this.Territory18.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 24:
                this.Territory19 = ((System.Windows.Controls.Label)(target));

            #line 37 "..\..\ConquerItAllView.xaml"
                this.Territory19.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 25:
                this.Territory20 = ((System.Windows.Controls.Label)(target));

            #line 38 "..\..\ConquerItAllView.xaml"
                this.Territory20.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 26:
                this.Territory21 = ((System.Windows.Controls.Label)(target));

            #line 39 "..\..\ConquerItAllView.xaml"
                this.Territory21.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 27:
                this.Territory22 = ((System.Windows.Controls.Label)(target));

            #line 40 "..\..\ConquerItAllView.xaml"
                this.Territory22.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 28:
                this.Territory23 = ((System.Windows.Controls.Label)(target));

            #line 41 "..\..\ConquerItAllView.xaml"
                this.Territory23.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 29:
                this.Territory24 = ((System.Windows.Controls.Label)(target));

            #line 42 "..\..\ConquerItAllView.xaml"
                this.Territory24.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 30:
                this.Territory25 = ((System.Windows.Controls.Label)(target));

            #line 43 "..\..\ConquerItAllView.xaml"
                this.Territory25.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 31:
                this.Territory26 = ((System.Windows.Controls.Label)(target));

            #line 44 "..\..\ConquerItAllView.xaml"
                this.Territory26.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 32:
                this.Territory27 = ((System.Windows.Controls.Label)(target));

            #line 45 "..\..\ConquerItAllView.xaml"
                this.Territory27.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 33:
                this.Territory28 = ((System.Windows.Controls.Label)(target));

            #line 46 "..\..\ConquerItAllView.xaml"
                this.Territory28.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 34:
                this.Territory29 = ((System.Windows.Controls.Label)(target));

            #line 47 "..\..\ConquerItAllView.xaml"
                this.Territory29.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 35:
                this.Territory30 = ((System.Windows.Controls.Label)(target));

            #line 48 "..\..\ConquerItAllView.xaml"
                this.Territory30.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 36:
                this.Territory31 = ((System.Windows.Controls.Label)(target));

            #line 49 "..\..\ConquerItAllView.xaml"
                this.Territory31.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 37:
                this.Territory32 = ((System.Windows.Controls.Label)(target));

            #line 50 "..\..\ConquerItAllView.xaml"
                this.Territory32.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 38:
                this.Territory33 = ((System.Windows.Controls.Label)(target));

            #line 51 "..\..\ConquerItAllView.xaml"
                this.Territory33.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 39:
                this.Territory34 = ((System.Windows.Controls.Label)(target));

            #line 52 "..\..\ConquerItAllView.xaml"
                this.Territory34.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 40:
                this.Territory35 = ((System.Windows.Controls.Label)(target));

            #line 53 "..\..\ConquerItAllView.xaml"
                this.Territory35.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 41:
                this.Territory36 = ((System.Windows.Controls.Label)(target));

            #line 54 "..\..\ConquerItAllView.xaml"
                this.Territory36.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 42:
                this.Territory37 = ((System.Windows.Controls.Label)(target));

            #line 55 "..\..\ConquerItAllView.xaml"
                this.Territory37.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 43:
                this.Territory38 = ((System.Windows.Controls.Label)(target));

            #line 56 "..\..\ConquerItAllView.xaml"
                this.Territory38.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 44:
                this.Territory39 = ((System.Windows.Controls.Label)(target));

            #line 57 "..\..\ConquerItAllView.xaml"
                this.Territory39.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 45:
                this.Territory40 = ((System.Windows.Controls.Label)(target));

            #line 58 "..\..\ConquerItAllView.xaml"
                this.Territory40.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 46:
                this.Territory41 = ((System.Windows.Controls.Label)(target));

            #line 59 "..\..\ConquerItAllView.xaml"
                this.Territory41.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 47:
                this.Territory42 = ((System.Windows.Controls.Label)(target));

            #line 60 "..\..\ConquerItAllView.xaml"
                this.Territory42.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 48:
                this.Territory43 = ((System.Windows.Controls.Label)(target));

            #line 61 "..\..\ConquerItAllView.xaml"
                this.Territory43.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 49:
                this.Territory44 = ((System.Windows.Controls.Label)(target));

            #line 62 "..\..\ConquerItAllView.xaml"
                this.Territory44.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 50:
                this.Territory45 = ((System.Windows.Controls.Label)(target));

            #line 63 "..\..\ConquerItAllView.xaml"
                this.Territory45.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 51:
                this.Territory46 = ((System.Windows.Controls.Label)(target));

            #line 64 "..\..\ConquerItAllView.xaml"
                this.Territory46.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Territory_MouseUp);

            #line default
            #line hidden
                return;

            case 52:
                this.PlayerNameLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 53:
                this.CurrentStageLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 54:
                this.CurrentStageActionLabel2 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 55:
                this.CurrentStageActionLabel1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 56:
                this.InfantryToAdd = ((System.Windows.Controls.TextBox)(target));
                return;

            case 57:
                this.AddButton = ((System.Windows.Controls.Button)(target));

            #line 70 "..\..\ConquerItAllView.xaml"
                this.AddButton.Click += new System.Windows.RoutedEventHandler(this.AddButton_Click);

            #line default
            #line hidden
                return;

            case 58:
                this.Cards = ((System.Windows.Controls.Image)(target));

            #line 79 "..\..\ConquerItAllView.xaml"
                this.Cards.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Cards_MouseUp);

            #line default
            #line hidden
                return;

            case 59:
                this.NextStageButton = ((System.Windows.Controls.Image)(target));

            #line 80 "..\..\ConquerItAllView.xaml"
                this.NextStageButton.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.NextStageButton_MouseUp);

            #line default
            #line hidden
                return;

            case 60:
                this.Player1Name = ((System.Windows.Controls.Label)(target));
                return;

            case 61:
                this.Player2Name = ((System.Windows.Controls.Label)(target));
                return;

            case 62:
                this.Player3Name = ((System.Windows.Controls.Label)(target));
                return;

            case 63:
                this.Player4Name = ((System.Windows.Controls.Label)(target));
                return;

            case 64:
                this.Player1Territories = ((System.Windows.Controls.Label)(target));
                return;

            case 65:
                this.Player2Territories = ((System.Windows.Controls.Label)(target));
                return;

            case 66:
                this.Player3Territories = ((System.Windows.Controls.Label)(target));
                return;

            case 67:
                this.Player4Territories = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Exemple #3
0
 public CIAViewModel(ConquerItAllView CIA)
 {
     _CIA = CIA;
     CIAM = new CIAModel(_CIA);
 }
 public StartDialog(ConquerItAllView cv)
 {
     InitializeComponent();
     this.cv = cv;
 }