Esempio n. 1
0
        /// <summary>
        /// Initalize variables, set default phase and UI configurations.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainForm_Load(object sender, EventArgs e)
        {
            slots = new Button[3] {
                Slot1, Slot2, Slot3
            };
            buttons = new Button[3] {
                LeftButton, RightButton, CenterButton
            };
            Phase        = new PhaseConfig();
            Looks        = new LooksConfig();
            CurrentPhase = 0;
            UpdateEngine();
            UpdateLooks();

            // attempt to connect socket
            try
            {
                socket.Bind(new IPEndPoint(IPAddress.Any, 25565));
                socket.Blocking = false;
                socket.Listen(1);
                SocketAsyncEventArgs connectArgs = new SocketAsyncEventArgs();
                connectArgs.Completed += ConnectCompleted;
                socket.AcceptAsync(connectArgs);
            }
            catch (Exception ex) { Console.WriteLine(ex.Message); }
        }
Esempio n. 2
0
 public LooksConfigForm(MainForm sender, LooksConfig looks)
 {
     InitializeComponent();
     parent  = sender;
     current = looks;
 }