Beispiel #1
0
        public MainWindow(iController chatcontroller, iChatConnector chatconnector)
        {
            InitializeComponent();
            this.DataContext          = this;
            this.chatconnector        = chatconnector;
            listBox.ItemsSource       = chatcontroller.getMessages();
            listBox.DisplayMemberPath = "message";

            chatconnector.connect();

            PresionarEnter = new ComandoEnter(enviarMensaje);
        }
Beispiel #2
0
 public ViewBoard(iController controller, int sizeCell, Panel panel)
 {
     Cell.SetController(controller);
     this.sizeCell = sizeCell;
     cell          = new Cell[8, 8];
     for (int i = 0; i < 8; i++)
     {
         for (int j = 0; j < 8; j++)
         {
             cell[i, j] = new Cell(sizeCell, i, j, panel);
         }
     }
 }
Beispiel #3
0
        public Form1(Controller _contoller, Game _game)
        {
            timer           = new System.Timers.Timer();
            timer.Interval  = 600;
            timer.Elapsed  += Time;
            timer.AutoReset = true;

            controller = _contoller;
            game       = _game;
            InitializeComponent();
            this.KeyPreview = true;
            this.KeyDown   += new KeyEventHandler(OnKeyDown);
        }
Beispiel #4
0
 public MainWindow()
 {
     iView view = this;
     iModel model = new Model();
     _controller = new Controller(model, view);
     user = "******";
     
     InitializeComponent();
     tab_sc.Visibility = Visibility.Hidden;
     tab_search.Visibility = Visibility.Hidden;
     tab_sellerhome.Visibility = Visibility.Hidden;
     tab_settings.Visibility = Visibility.Hidden;
     tab_hot.Visibility = Visibility.Hidden;
 }
Beispiel #5
0
        public SettingForm(iController contr, TypeSettingForm _id)
        {
            InitializeComponent();
            controller = contr;

            comboBox1color.SelectedIndex              = 0; comboBox2color.SelectedIndex = 1;
            comboBox1depth.SelectedIndex              = 5; comboBox2depth.SelectedIndex = 3;
            comboBox1search.SelectedIndex             = 1; comboBox2search.SelectedIndex = 1;
            comboBox1player.SelectedIndex             = 0; comboBox2player.SelectedIndex = 0;
            comboBox1evaluate.SelectedIndex           = 1; comboBox2evaluate.SelectedIndex = 1;
            comboBox1color.DropDownStyle              = comboBox1depth.DropDownStyle =
                comboBox1search.DropDownStyle         = comboBox1player.DropDownStyle = comboBox1evaluate.DropDownStyle =
                    comboBox2color.DropDownStyle      = comboBox2depth.DropDownStyle =
                        comboBox2search.DropDownStyle = comboBox2player.DropDownStyle = comboBox2evaluate.DropDownStyle =
                            System.Windows.Forms.ComboBoxStyle.DropDownList;

            id = _id;
            CreatePanels(id);
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            i  = new InputManager();
            d  = new display();
            gb = new gameBoard(d);
            pd = new paddle(2, d, 1);
            b  = new ball(d, 2, pd);

            //c = new Controllers.PlayerController();
            //c = new Controllers.PerfectAI();
            c = new Controllers.PerfectAiHybrid();

            System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
            int counter = 0;

            while (!i.IsKeyFalling(OpenTK.Input.Key.Escape))
            {
                stopwatch.Start();

                i.Update();
                d.draw(true);
                doGameUpdate();

                //System.Threading.Thread.Sleep(5);

                stopwatch.Stop();

                counter++;
                fps = (int)(1.0 / ((double)stopwatch.ElapsedMilliseconds / (double)counter) * 1000.0);

                if (counter > 200)
                {
                    stopwatch.Reset();
                    counter = 0;
                }
            }
        }
Beispiel #7
0
 public ChatConnector(iController chatcontroller)
 {
     this.chatcontroller = chatcontroller;
 }
Beispiel #8
0
 public static void SetController(iController _controller)
 {
     controller = _controller;
 }