コード例 #1
0
 private void cbxFiles_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbxFiles.SelectedItem != null)
     {
         GraphicFile graphic = (GraphicFile)cbxFiles.SelectedItem;
         ChangeTileset(graphic.Path);
         RefreshGUI();
     }
     else
     {
         tileset.SourceImage = null;
         tileset.Size        = new Size(10, 10);
     }
 }
コード例 #2
0
        private void AddFiles(string[] files)
        {
            cbxFiles.Items.Clear();
            foreach (string file in files)
            {
                GraphicFile graphic = new GraphicFile();
                graphic.Text = Path.GetFileName(file);
                graphic.Path = file;

                cbxFiles.Items.Add(graphic);
            }

            cbxFiles.Enabled = (cbxFiles.Items.Count > 0);
        }