public SelectRemoteSystem(APPLICATION_DATA appData)
        {
            InitializeComponent();
            m_AppData = appData;
            m_AppData.AddOnClosing(OnClose, APPLICATION_DATA.CLOSE_ORDER.FIRST);
            m_Log = (ErrorLog) m_AppData.Logger;

            m_AppData.CurrentlyLoggedInRemoteServer = (object)new RemoteHosts(m_AppData, true);// assign a nullHost as a place holder until the use selects an actual server

            MessageGenerators = new MessageGeneratorEvents(this);

            buttonLogout.Visible = false;
            buttonLogout.Enabled = false;

            m_StatsViewer = new StatsViewer(m_AppData);
            //744, 57
            m_StatsViewer.Location = new Point(744, 57);
            this.Controls.Add(m_StatsViewer);

            bool hostsLoaded = false;
            string hostfile = UserSettings.Get(UserSettingTags.REMOTEHOSTS_LastHostFileUsed);
            if (hostfile != null)
            {
                if (File.Exists(hostfile))
                {
                    m_HostFile = hostfile;
                    LoadHostsFromFile(hostfile);
                    hostsLoaded = true;
                }
            }
            if ( ! hostsLoaded)
                AddLocalDefaultHost();
        }
Exemple #2
0
        public SelectRemoteSystem(APPLICATION_DATA appData)
        {
            InitializeComponent();
            m_AppData = appData;
            m_AppData.AddOnClosing(OnClose, APPLICATION_DATA.CLOSE_ORDER.FIRST);
            m_Log = (ErrorLog)m_AppData.Logger;

            m_AppData.CurrentlyLoggedInRemoteServer = (object)new RemoteHosts(m_AppData, true);// assign a nullHost as a place holder until the use selects an actual server

            MessageGenerators = new MessageGeneratorEvents(this);


            buttonLogout.Visible = false;
            buttonLogout.Enabled = false;



            m_StatsViewer = new StatsViewer(m_AppData);
            //744, 57
            m_StatsViewer.Location = new Point(744, 57);
            this.Controls.Add(m_StatsViewer);

            bool   hostsLoaded = false;
            string hostfile    = UserSettings.Get(UserSettingTags.REMOTEHOSTS_LastHostFileUsed);

            if (hostfile != null)
            {
                if (File.Exists(hostfile))
                {
                    m_HostFile = hostfile;
                    LoadHostsFromFile(hostfile);
                    hostsLoaded = true;
                }
            }
            if (!hostsLoaded)
            {
                AddLocalDefaultHost();
            }
        }