Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonExportCSP_Click(object sender, EventArgs e)
        {
            if (mxListBox1.SelectedItem is MEXCostume costume)
            {
                using (SaveFileDialog d = new SaveFileDialog())
                {
                    d.Filter = "PNG (*.png)|*.png";

                    if (d.ShowDialog() == DialogResult.OK)
                    {
                        using (var bmp = GraphicExtensions.TOBJToBitmap(costume.CSP))
                            bmp.Save(d.FileName);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        private void RefreshPanel()
        {
            // enable edit panel if one icon is selected
            imageEditPanel.Visible = false;

            if (stageListBox.SelectedItems.Count == 1 && stageListBox.SelectedItem is MEXStageIcon icon)
            {
                imageEditPanel.Visible = true;

                if (nameTagBox.Image != null)
                {
                    nameTagBox.Image.Dispose();
                }

                nameTagBox.Image = GraphicExtensions.TOBJToBitmap(icon._previewText);

                iconBox.Image = icon.GetImage();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        private void RefreshSelected()
        {
            if (mxListBox1.SelectedItem is MEXCostume costume)
            {
                if (cspBox.Image != null)
                {
                    cspBox.Image.Dispose();
                }
                cspBox.Image = GraphicExtensions.TOBJToBitmap(costume.CSP);

                gawButton.Visible = MEX.Fighters.IndexOf(_fighter) == GAWIndex;

                if (MEX.Fighters.IndexOf(_fighter) == GAWIndex)
                {
                    mxPropertyGrid1.SelectedObject = MEX.GaWColors[mxListBox1.SelectedIndex];
                }
                else
                {
                    mxPropertyGrid1.SelectedObject = costume;
                }
            }
            mxListBox1.Invalidate();
        }