Esempio n. 1
0
        public void btnAddImage_Click(object sender, EventArgs e)
        {
            string filename = FileDialog.ShowOpen(FileDialog.Context.Image);

            if (string.IsNullOrEmpty(filename))
            {
                return;
            }
            try
            {
                if (m_Style.CustomImage[(int)State] == null)
                {
                    m_Style.CustomImage[(int)State] = new ScalableImage();
                }
                Img.AddImageFromDisc(filename);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }
            m_ImageIndex = Img.Images.Count - 1;
            DisplayImageIndex();
        }