Exemplo n.º 1
0
		public MainForm()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			SplashScreen ss=new SplashScreen(false);
			ss.TopLevel=true;
			ss.Show();
			Application.DoEvents();
			System.Threading.Thread.Sleep(3000);
			ss.Close();
			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			myData=new IsoData();

			StartUpRoom();

		}
Exemplo n.º 2
0
		public void DoList(IsoData idata)
		{
			this.ilItems.Images.Clear();
			this.glImages.Items.Clear();
			this.glImages.ImageList=ilItems;
			foreach(BlockDescriptor bd in idata.DefinedRooms)
			{
				if(bd.bmp==null) continue;
				try 
				{
					if(bd.bmp!="")
						this.ilItems.Images.Add(new Bitmap("images\\"+bd.bmp));
				} 
				catch 
				{
					this.ilItems.Images.Add(new Bitmap("images\\unknown.gif"));
					System.Windows.Forms.MessageBox.Show(this,"Could not open bitmap: " + "images\\"+bd.bmp);
				}

				GlacialComponents.Controls.GLItem gli=new GlacialComponents.Controls.GLItem();
				GlacialComponents.Controls.GLSubItem gls;
				gls=new GlacialComponents.Controls.GLSubItem();
				gls.ImageIndex=(this.ilItems.Images.Count-1);
				gli.SubItems.Add(gls);

				gls=new GlacialComponents.Controls.GLSubItem();
				gls.Text=bd.Name; //name
				gli.SubItems.Add(gls);

				gls=new GlacialComponents.Controls.GLSubItem();
				gls.Text="Room";
				gli.SubItems.Add(gls);

				this.glImages.Items.Add(gli);
			}

			foreach(BlockDescriptor bd in idata.DefinedBlocks)
			{
				if(bd.bmp==null) continue;
				try 
				{
					if(bd.bmp!="")
						this.ilItems.Images.Add(new Bitmap("images\\"+bd.bmp));
				} 
				catch 
				{
					this.ilItems.Images.Add(new Bitmap("images\\unknown.gif"));
					System.Windows.Forms.MessageBox.Show(this,"Could not open bitmap: " + "images\\"+bd.bmp);
				}

				GlacialComponents.Controls.GLItem gli=new GlacialComponents.Controls.GLItem();
				GlacialComponents.Controls.GLSubItem gls;
				gls=new GlacialComponents.Controls.GLSubItem();
				gls.ImageIndex=(this.ilItems.Images.Count-1);
				gli.SubItems.Add(gls);

				gls=new GlacialComponents.Controls.GLSubItem();
				gls.Text=bd.Name; //name
				gli.SubItems.Add(gls);

				gls=new GlacialComponents.Controls.GLSubItem();
				gls.Text="Object";
				gli.SubItems.Add(gls);

				this.glImages.Items.Add(gli);
			}

			int ilasttype=-1;
			foreach(PlacedObject bd in idata.PlacedObjects)
			{
				if(bd.Type!=ilasttype)
				{
					if(bd.bmp==null) continue;
					try 
					{
						if(bd.bmp!="")
							this.ilItems.Images.Add(new Bitmap("images\\"+bd.bmp));
					} 
					catch 
					{
						this.ilItems.Images.Add(new Bitmap("images\\unknown.gif"));
						System.Windows.Forms.MessageBox.Show(this,"Could not open bitmap: " + "images\\"+bd.bmp);
					}

					GlacialComponents.Controls.GLItem gli=new GlacialComponents.Controls.GLItem();
					GlacialComponents.Controls.GLSubItem gls;
					gls=new GlacialComponents.Controls.GLSubItem();
					gls.ImageIndex=(this.ilItems.Images.Count-1);
					gli.SubItems.Add(gls);

					gls=new GlacialComponents.Controls.GLSubItem();
					gls.Text=bd.Name; //name
					gli.SubItems.Add(gls);

					gls=new GlacialComponents.Controls.GLSubItem();
					gls.Text="Object";
					gli.SubItems.Add(gls);

					this.glImages.Items.Add(gli);
					ilasttype=bd.Type;
				}
			}

			this.glImages.Refresh();
		}