Example #1
0
        private void comboBox_pose_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (this.comboBox_pose.SelectedItem == null)
            {
                return;
            }

            //選択された立ち絵
            var charData = (CharDataFile)this.comboBox_pose.SelectedItem;

            //服装・表情データ読み込み
            string filepath = GetLayerInfoFilePath();

            if (!File.Exists(filepath))
            {
                MessageBox.Show("このポーズは使用することが出来ません。\n他のポーズを選択して下さい。", "",
                                MessageBoxButton.OK, MessageBoxImage.Asterisk);
                InitializeComboBox();
                return;
            }

            FgFileReader reader    = new FgFileReader(filepath);
            var          imageData = reader.ReadAll();

            this.comboBox_dress.ItemsSource = imageData.Where(s => s.Name.IndexOf("腕") == 0);
            this.comboBox_eye.ItemsSource   = imageData.Where(s => s.Name.IndexOf("目") == 0 && s.LayerType == "2");
            this.comboBox_mouth.ItemsSource = imageData.Where(s => s.Name.IndexOf("口") == 0 && s.LayerType == "2");
        }
Example #2
0
        private void comboBox_pose_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (this.comboBox_pose.SelectedItem == null) return;

            //選択された立ち絵
            var charData = (CharDataFile)this.comboBox_pose.SelectedItem;

            //服装・表情データ読み込み
            string filepath = GetLayerInfoFilePath();
            if (!File.Exists(filepath))
            {
                MessageBox.Show("このポーズは使用することが出来ません。\n他のポーズを選択して下さい。", "",
                    MessageBoxButton.OK, MessageBoxImage.Asterisk);
                InitializeComboBox();
                return;
            }

            FgFileReader reader = new FgFileReader(filepath);
            var imageData = reader.ReadAll(); 
           
            this.comboBox_dress.ItemsSource = imageData.Where(s => s.Name.IndexOf("腕") == 0);
            this.comboBox_eye.ItemsSource = imageData.Where(s => s.Name.IndexOf("目") == 0 && s.LayerType == "2");
            this.comboBox_mouth.ItemsSource = imageData.Where(s => s.Name.IndexOf("口") == 0 && s.LayerType == "2");
        }