private void btn_bgsound_system_Click(object sender, RoutedEventArgs e)
        {
            string themeFilename = ((App)Application.Current).themefolder + ((App)Application.Current).gameplatformtheme + "\\theme.xml";
            string filename      = SomeUtilities.openFileDialog("Sound files(*.wav;*.ogg)|*.wav;*.ogg" + "|Все файлы (*.*)|*.* ", this.tb_bgsound.Text, themeFilename);

            if (filename != null)
            {
                this.tb_bgsound.Text = filename;
            }
            //saveSystemView();
        }
Exemple #2
0
        private void btn_fontPath_Click(object sender, RoutedEventArgs e)
        {
            string toollName = ((Button)sender).Name;

            toollName = toollName.Replace("btn", "tb");
            string  themeFilename = ((App)Application.Current).themefolder + ((App)Application.Current).gameplatformtheme + "\\theme.xml";
            TextBox foundTextBox  = SomeUtilities.FindChild <TextBox>(this, toollName);
            string  filename      = SomeUtilities.openFileDialog("Font files(*.ttf)|*.ttf" + "|Все файлы (*.*)|*.* ", foundTextBox.Text, themeFilename);

            if (filename != null)
            {
                foundTextBox.Text = filename;
            }
        }
        private void btn_getimagefile_Click(object sender, RoutedEventArgs e)
        {
            string toollName = ((Button)sender).Name;

            toollName = toollName.Replace("btn", "tb");
            string  themeFilename = ((App)Application.Current).themefolder + ((App)Application.Current).gameplatformtheme + "\\theme.xml";
            TextBox foundTextBox  = SomeUtilities.FindChild <TextBox>(canvas, toollName);
            string  filename      = SomeUtilities.openFileDialog("Image files(*.png;*.jpg;*.svg)|*.png;*.jpg;*.svg" + "|Все файлы (*.*)|*.* ", foundTextBox.Text, themeFilename);

            if (!string.IsNullOrEmpty(filename))
            {
                foundTextBox.Text = filename;
            }
            //saveSystemView();
        }
Exemple #4
0
        private void btn_path_Click(object sender, RoutedEventArgs e)
        {
            string toollName = ((Button)sender).Name;

            toollName = toollName.Replace("btn", "tb");
            string  themeFilename = ((App)Application.Current).themefolder + ((App)Application.Current).gameplatformtheme + "\\theme.xml";
            TextBox foundTextBox  = SomeUtilities.FindChild <TextBox>(this, toollName);
            string  filename      = SomeUtilities.openFileDialog("Image files(*.png;*.jpg;*.svg)|*.png;*.jpg;*.svg" + "|Все файлы (*.*)|*.* ", foundTextBox.Text, themeFilename);

            if (filename != null)
            {
                manualClear       = true;
                foundTextBox.Text = filename;
                manualClear       = false;
                onPropertyChanged(((Button)sender).Name.Replace("btn_", ""), filename);
            }
        }