/// <summary> /// Method runs after the application has been launched /// </summary> /// <param name="bundle"></param> protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); ISharedPreferences preferences = PreferenceManager.GetDefaultSharedPreferences(ApplicationContext); ISharedPreferencesEditor editor = preferences.Edit(); editor.Clear(); editor.Commit(); //Get references to user interface controls chatHistory = FindViewById <TextView>(Resource.Id.mainText); input = FindViewById <AutoCompleteTextView>(Resource.Id.messageTextInput); sendButton = FindViewById <Button>(Resource.Id.sendButton); settingsButton = FindViewById <Button>(Resource.Id.settingsButton); //Append the method 'sendButton_Click' to the button click event sendButton.Click += sendButton_Click; //Append the settings button event handler settingsButton.Click += settingsButton_Click; //Initialise the chat application chatApplication = new ChatAppAndroid(this, chatHistory, input); //Print the usage instructions chatApplication.PrintUsageInstructions(); //Initialise NetworkComms.Net but without a local server chatApplication.RefreshNetworkCommsConfiguration(); //Uncomment this line to enable logging //EnableLogging(); }
/// <summary> /// Method runs after the application has been launched /// </summary> /// <param name="bundle"></param> protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); ISharedPreferences preferences = PreferenceManager.GetDefaultSharedPreferences(ApplicationContext); ISharedPreferencesEditor editor = preferences.Edit(); editor.Clear(); editor.Commit(); //Get references to user interface controls chatHistory = FindViewById<TextView>(Resource.Id.mainText); input = FindViewById<AutoCompleteTextView>(Resource.Id.messageTextInput); sendButton = FindViewById<Button>(Resource.Id.sendButton); settingsButton = FindViewById<Button>(Resource.Id.settingsButton); //Append the method 'sendButton_Click' to the button click event sendButton.Click += sendButton_Click; //Append the settings button event handler settingsButton.Click += settingsButton_Click; //Initialise the chat application chatApplication = new ChatAppAndroid(this, chatHistory, input); //Print the usage instructions chatApplication.PrintUsageInstructions(); //Initialise NetworkComms.Net but without a local server chatApplication.RefreshNetworkCommsConfiguration(); //Uncomment this line to enable logging //EnableLogging(); }