indexing
	description: "About Dialog"
	author: "Daniel Jacobi"
	date: "$Date: 2004/05/05 23:31:53 $"
	revision: "$Revision: 1.8 $"

class
	ABOUT_DIALOG

inherit
	WEL_MODAL_DIALOG
		redefine
			make_by_id,
			setup_dialog
		end

	APPLICATION_IDS
		export
			{NONE} all
		end

creation
	make_by_id

feature {NONE} -- Initialization

	make_by_id (a_parent: WEL_WINDOW; an_id: INTEGER) is
			-- Creation of `Current'
		do
 			{WEL_MODAL_DIALOG} Precursor (a_parent, an_id)

			create edit_file.make_by_id (Current, Idc_about_file)
			create edit_version.make_by_id (Current, Idc_about_version)
			create edit_osver.make_by_id (Current, Idc_about_osversion)	
			create edit_comment.make_by_id (Current, Idc_about_comment)	
			create edit_legal.make_by_id (Current, Idc_about_legal)	
			
			fenster ?= a_parent
		end

	setup_dialog is
			-- Dialog einstellen
		local
			ico: WEL_ICON
			ver: WEL_WINDOWS_VERSION
			str_ver: STRING
			schrift: WEL_FONT
			indirekt: WEL_LOG_FONT
		do
			create ver
			create ico.make_by_id (Idr_mainframe)			
			set_class_small_icon(ico)

			edit_file.set_text("Battle.Net Server Editor")
			edit_version.set_text("0.21 Beta")
			
			if ver.is_windows_95 then
				str_ver := "Microsoft Windows 95, Version: "
			elseif ver.is_windows_98 then
				str_ver := "Microsoft Windows 98, Version: "
			elseif ver.is_windows_nt4 then
				str_ver := "Microsoft Windows NT 4, Version: "
			elseif ver.is_windows_me then
				str_ver := "Microsoft Windows ME, Version: "
			elseif ver.is_windows_2000 then
				str_ver := "Microsoft Windows 2000, Version: "
			elseif ver.is_windows_xp then
				str_ver := "Microsoft Windows XP, Version: "
			end
			edit_osver.set_text(str_ver + ver.version_number_string)
			edit_legal.set_text("Written by tqm, Original by Octopussy")

			-- font setzen + text in comment-feld
			create indirekt.make(11, "Tahoma")
			create schrift.make_indirect(indirekt)
			edit_comment.set_font(schrift)
			edit_comment.set_text("Diablo, Dialbo II, Diablo II - Lord of Destruction, %
					%Starcraft, Broodwar, Warcraft, Warcraft III, Warcraft III - The Frozen Throne, Battle.net and%
					% others are Trademarks of Blizzard Entertainment. All copyrights belong to their Owners.")

			-- Position
			move (fenster.absolute_x + ((fenster.width - width) // 2), fenster.absolute_y + ((fenster.height - height) // 2))			
		end

feature {NONE} -- Implementation

	fenster: MAIN_WINDOW
	
	edit_file: WEL_SINGLE_LINE_EDIT
	edit_version: WEL_SINGLE_LINE_EDIT
	edit_osver: WEL_SINGLE_LINE_EDIT
	edit_comment: WEL_SINGLE_LINE_EDIT
	edit_legal: WEL_SINGLE_LINE_EDIT

end -- class ABUOT_DIALOG
