Beispiel #1
0
        private void Settings_Button_Click(object sender, RoutedEventArgs e)
        {
            if (!isInSettings)
            {
                isInSettings = true;
                ContentGrid.Children.Remove(ContentPanelMaster.panel);
                settingpanel = new SettingsPanel();
                settingpanel.SetValue(Grid.RowProperty, 3);
                ContentGrid.Children.Add(settingpanel);
            }
            else
            {
                isInSettings = false;
                Settings.saveSettings(settingpanel.ComboBoxLanguage.Text, settingpanel.ComboBoxSipType.SelectedIndex, (bool)settingpanel.CheckBoxHideWindow.IsChecked);
                ContentGrid.Children.Remove(settingpanel);

                ContentPanelMaster.setLanguage();

                ContentGrid.Children.Add(ContentPanelMaster.panel);
            }
        }
Beispiel #2
0
        private void setLang()
        {
            XmlNode langNode = Settings.loadSettings();

            this.settings_langLabel.Content = langNode.SelectSingleNode("field_language").InnerText;

            this.settings_sipLabel.Content = langNode.SelectSingleNode("field_siptype").InnerText;

            this.ComboBoxSipType.Items.Clear();
            this.ComboBoxSipType.Items.Add(langNode.SelectSingleNode("field_siptype_0").InnerText);
            this.ComboBoxSipType.Items.Add(langNode.SelectSingleNode("field_siptype_2").InnerText);

            this.CheckBoxHideWindow.Content = langNode.SelectSingleNode("field_hide_window").InnerText;

            this.settings_develLabel.Text = langNode.SelectSingleNode("field_developed").InnerText;

            this.settings_setToDef.Content = langNode.SelectSingleNode("field_setdefault").InnerText;
            this.resetButton.Content       = langNode.SelectSingleNode("field_reset_button").InnerText;

            ContentPanelMaster.setLanguage();
        }