<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MeTLLib;
using MeTLLib.DataTypes;
using Microsoft.Practices.Composite.Presentation.Commands;
using SandRibbon.Providers;
using SandRibbon.Utils;
using System.Windows.Forms;

namespace SandRibbon.Components
{
    public class CivicServerAddress : MeTLServerAddress
    {
        public CivicServerAddress()
        {
            stagingUri = new Uri("http://civic.adm.monash.edu.au", UriKind.Absolute);
            productionUri = new Uri("http://civic.adm.monash.edu.au", UriKind.Absolute);
        }
    }
    public class NetworkController
    {
        private ClientConnection client;
        public NetworkController()
        {
            switchServer();
            if (client == null) return;
            registerCommands();
            attachToClient();
        }
        public void switchServer()
        {
            if (App.isExternal)
                client = MeTLLib.ClientFactory.Connection(new CivicServerAddress());
            else
            {
                if (App.isStaging)
                    client = MeTLLib.ClientFactory.Connection(MeTLServerAddress.serverMode.STAGING);
                else
                    client = MeTLLib.ClientFactory.Connection(MeTLServerAddress.serverMode.PRODUCTION);
            }
            Constants.JabberWire.SERVER = client.server.host;<commit_msg>removed an unecessary change to networkController.  Now it's back how it was.  All the changes in rev 1186 now occur in globals, app and login<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MeTLLib;
using MeTLLib.DataTypes;
using Microsoft.Practices.Composite.Presentation.Commands;
using SandRibbon.Providers;
using SandRibbon.Utils;
using System.Windows.Forms;

namespace SandRibbon.Components
{
    public class CivicServerAddress : MeTLServerAddress
    {
        public CivicServerAddress()
        {
            stagingUri = new Uri("http://civic.adm.monash.edu.au", UriKind.Absolute);
            productionUri = new Uri("http://civic.adm.monash.edu.au", UriKind.Absolute);
        }
    }
    public class NetworkController
    {
        private ClientConnection client;
        public NetworkController()
        {
            switchServer();
            registerCommands();
            attachToClient();
        }
        public void switchServer()
        {
            if (App.isExternal)
                client = MeTLLib.ClientFactory.Connection(new CivicServerAddress());
            else
            {
                if (App.isStaging)
                    client = MeTLLib.ClientFactory.Connection(MeTLServerAddress.serverMode.STAGING);
                else
                    client = MeTLLib.ClientFactory.Connection(MeTLServerAddress.serverMode.PRODUCTION);
            }
            Constants.JabberWire.SERVER = client.server.host;
{'fraction_non_alphanumeric': 0.08620102214650767, 'fraction_numerical': 0.001362862010221465, 'mean_word_length': 2.2622222222222224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6739171', 'n_tokens_mistral': 816, 'n_tokens_neox': 783, 'n_words': 157}