Example #1
0
		private void newToolStripMenuItem_Click(object sender, EventArgs e)
		{
			var dlg = new NewFile
			{
                Text = "New File",
				ImageWidth = 512,
				ImageHeight = 512
			};

			if (dlg.ShowDialog() == DialogResult.OK)
			{
				m_isModified = true;
				Open(new Document(dlg.ImageWidth, dlg.ImageHeight));
			}
		}
Example #2
0
		private void propertiesToolStripMenuItem_Click(object sender, EventArgs e)
		{
			var dlg = new NewFile
			{
                Text = "Properties",
				ImageWidth = m_document.Atlas.Width,
				ImageHeight = m_document.Atlas.Height
			};

			if (dlg.ShowDialog() == DialogResult.OK)
			{
				if (dlg.ImageWidth != m_document.Atlas.Width
					|| dlg.ImageHeight != m_document.Atlas.Height)
				{
					m_isModified = true;
					m_document.Atlas.Width = dlg.ImageWidth;
					m_document.Atlas.Height = dlg.ImageHeight;

					UpdateTitle();
					Redraw(true);
				}
			}
		}