Inheritance: Windows.UI.Xaml.Controls.Page
Example #1
0
        private void SetLocaleMI_Click(object sender, EventArgs e)
        {
            try
            {
                // get selected session.
                Session session = SelectedTag as Session;

                if (session == null)
                {
                    return;
                }

                string locale = new SelectLocaleDlg().ShowDialog(session);

                if (locale == null)
                {
                    return;
                }

                PreferredLocales = new string[] { locale };
                session.ChangePreferredLocales(new StringCollection(PreferredLocales));
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void SetLocaleMI_Click(object sender, EventArgs e)
        {
            try
            {
                // get selected session.
                Session session = SelectedTag as Session;

                if (session == null)
                {
                    return;
                }

                string locale = new SelectLocaleDlg().ShowDialog(session);

                if (locale == null)
                {
                    return;
                }

                PreferredLocales = new string[] { locale };
                session.ChangePreferredLocales(new StringCollection(PreferredLocales));
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(String.Empty, GuiUtils.CallerName(), exception);
            }
        }