Esempio n. 1
0
        void QuitButton_Click(object sender, EventArgs e)
        {
            if (QuitButton.Text == "Login")
            {
                myAvatar     = new ALIVE.SmartDog(FNtextBox.Text, LNtextBox.Text, PWtextBox.Text, URIbox.Text);
                LoginSuccess = myAvatar.Login();
                //client.Network.CurrentSim.ObjectsAvatars.ForEach();
                //client.Network.CurrentSim.ObjectsPrimitives.ForEach();

                if (LoginSuccess)
                {
                    //client.Settings.DISABLE_AGENT_UPDATE_DUPLICATE_CHECK = true;

                    buttonTextUpdate(QuitButton, "Logout");
                    ChatBox.Visible       = true;
                    InputBox.Visible      = true;
                    saychatbutton.Visible = true;
                    textBoxUpdate(PWtextBox, "");
                }
                else
                {
                    //MessageBox.Show("Din't work! " + client.Network.LoginMessage);
                    return;
                }

                displayMyLocation();
                textBoxUpdate(ChatBox, "Version: " + myAvatar.AliveVersion);
            }
            else
            {
                //client.Network.Logout();
                myAvatar.Logout();
                buttonTextUpdate(QuitButton, "Login");
                ChatBox.Visible       = false;
                InputBox.Visible      = false;
                saychatbutton.Visible = false;

                textBoxUpdate(objectsBox, "");
                textBoxUpdate(locationBox, "");
            }
        }
Esempio n. 2
0
        /*        public sgrMachine ParseMachine;
        *  public SpeechSynthesizer mySynth;
        *  public SpeechRecognitionEngine myRecog;*/

        //public MyBot.BotControlForm1.objectsTextBoxUpdater oboxSay;

        public DogsMind(ALIVE.SmartDog dog /*, SpeechSynthesizer myS, SpeechRecognitionEngine myR, sgrMachine pm*/)
        {
            myDog = dog;

/*            mySynth = myS;
 *          myRecog = myR;*/// Wei Chen 2010-04-20
            min_x        = 90;
            min_y        = 90;
            max_x        = 160;
            max_y        = 160;
            obstacleMap  = new AliveObject[256, 256];
            exploredMap  = new bool[256, 256];
            myContext    = new Context();
            knownObjects = new Hashtable();
            update_explored();

            // Wei Chen 2010-04-20
//            dogGrammars.buildDogGrammars(this);

//            ParseMachine = pm;
//            mySynth.SpeakAsync("I am ready master!");
        }