private void openSheetFileToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog fDialog = new OpenFileDialog(); fDialog.Title = "Open Sheet File"; fDialog.Filter = "EDS Files|*.eds"; if (fDialog.ShowDialog() == DialogResult.OK) { sheetDataFile = fDialog.FileName.ToString(); var imageFile = sheetDataFile.Substring(0, sheetDataFile.Length - 3) + "png"; var image = new Bitmap(imageFile); this.frameFinder = new SpritesheetData(sheetDataFile); SetFrameLabelerTab(image); } }
private void openSheetFileToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog fDialog = new OpenFileDialog(); fDialog.Title = "Open Sheet File"; fDialog.Filter = "EDS Files|*.eds"; if (fDialog.ShowDialog() == DialogResult.OK) { sheetDataFile = fDialog.FileName.ToString(); var imageFile = sheetDataFile.Substring(0, sheetDataFile.Length - 3) + "png"; var image = new Bitmap(imageFile); this.frameFinder = new SpritesheetData(sheetDataFile); SetFrameLabelerTab(image); } }
private void importImageToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog fDialog = new OpenFileDialog(); fDialog.Title = "Import Image File"; fDialog.Filter = "PNG Files|*.png"; if (fDialog.ShowDialog() == DialogResult.OK) { var imageFile = fDialog.FileName.ToString(); sheetDataFile = imageFile.Substring(0, imageFile.Length - 3) + "eds"; var image = new Bitmap(imageFile); this.frameFinder = SpritesheetData.CreateFromImage(image); SetFrameLabelerTab(image); } }
private void importImageToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog fDialog = new OpenFileDialog(); fDialog.Title = "Import Image File"; fDialog.Filter = "PNG Files|*.png"; if (fDialog.ShowDialog() == DialogResult.OK) { var imageFile = fDialog.FileName.ToString(); sheetDataFile = imageFile.Substring(0, imageFile.Length - 3) + "eds"; var image = new Bitmap(imageFile); this.frameFinder = SpritesheetData.CreateFromImage(image); SetFrameLabelerTab(image); } }
public FrameLabeler(Bitmap image, SpritesheetData frameFinder) { InitializeComponent(); this.image = image; this.frameListBox.DataSource = listBinding; this.frameListBox.SelectedIndexChanged += (sender, e) => ChangeFrame(); this.frameNameText.TextChanged += (sender, e) => { this.currentFrame.Name = this.frameNameText.Text; this.listBinding.ResetCurrentItem(); }; this.frameImageBox.Paint += PaintEvent; this.FrameFinder = frameFinder; this.frameListBox.ValueMember = "Name"; }
public FrameLabeler(Bitmap image, SpritesheetData frameFinder) { InitializeComponent(); this.image = image; this.frameListBox.DataSource = listBinding; this.frameListBox.SelectedIndexChanged += (sender, e) => ChangeFrame(); this.frameNameText.TextChanged += (sender, e) => { this.currentFrame.Name = this.frameNameText.Text; this.listBinding.ResetCurrentItem(); }; this.frameImageBox.Paint += PaintEvent; this.FrameFinder = frameFinder; this.frameListBox.ValueMember = "Name"; }