예제 #1
0
        private void LoadForm(object sender, EventArgs e)
        {
            _settings         = new Settings();
            _previousCommands = new PreviousCommands();
            try
            {
                _telnetHandler = new ClientHandler(_settings.ServerAdress, _settings.Port, new JsonMudMessage());
                timer_UpdateTimer.Start();
                //richTextBox1.ReadOnly = true;
                SetDoubleBufferToOn(myRichTextBox_MainText);
            }
            catch (Exception ex)
            {
                string message = "Unable to connect" + Environment.NewLine + ex.Message;
                MessageBox.Show(message);
                this.Close();
                return;
            }

            SelectTextEntry(sender, e);
            ResetFontSize(_settings);
            if (_settings.Map)
            {
                LoadMap();
            }
            if (_settings.Sound)
            {
                LoadSound();
            }
        }
예제 #2
0
        private void LoadForm(object sender, EventArgs e)
        {
            Settings.Initialize();
            _previousCommands = new PreviousCommands();
            //_triggers = new Dictionary<TagType, List<Trigger.Trigger>>();
            SetTriggersDictioanry(new TriggerSettings());
            try
            {
                _telnetHandler = new ClientHandler(Settings.ServerAdress, Settings.Port, new JsonMudMessage());
                timer_UpdateTimer.Start();
                //richTextBox1.ReadOnly = true;
                SetDoubleBufferToOn(myRichTextBox_MainText);
            }
            catch (Exception ex)
            {
                string message = "Unable to connect" + Environment.NewLine + ex.Message;
                MessageBox.Show(message);
                this.Close();
                return;
            }

            SelectTextEntry(sender, e);
            ResetFontSize();
            if (Settings.DisplayMap)
            {
                LoadMap();
            }
            if (Settings.PlaySound)
            {
                LoadSound();
            }
        }