Exemple #1
0
        private void buttonEditNickname_Click(object sender, EventArgs e)
        {
            // Prevent the button from getting focus, place focus on the form instead
            mainForm.Focus();

            MainFormBlur mainFormBlur = new MainFormBlur(mainForm);

            mainFormBlur.Show(mainForm);

            using (GetTextValueDialog dialog = new GetTextValueDialog("Edit Nickname", "Nickname"))
            {
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    string nickname = dialog.Result;
                    labelClientNickname.Text = nickname;

                    Properties.Settings.Default.Username = nickname;
                    Properties.Settings.Default.Save();

                    tSClient.GetSelfClient().Nickname = nickname;
                }
            }

            mainFormBlur.Close();
        }
Exemple #2
0
        public SettingsPanel(MainForm mainForm, TSClient tSClient)
        {
            InitializeComponent();

            this.mainForm = mainForm;

            this.tSClient   = tSClient;
            this.selfClient = tSClient.GetSelfClient();

            SetData();
        }