Exemplo n.º 1
0
		} /*CtrlController*/
		#endregion Properties

		#region Constructor
		public FrmMain() {
			InitializeComponent();
			SgList = new SavedGamesList();
			SClass = new SerializeClass();
			ctrlController = new ControlsController(this);
			clrPicker = new ColorPicker();
			SavedGamesList sg = SClass.deserializeSavedGames(this);
			if (sg != null) SgList = sg;
			CtrlController.giveControlspProperties();
			showOptions();
		} /*FrmMain*/
Exemplo n.º 2
0
		} /*serializeSavedGames*/

		public SavedGamesList deserializeSavedGames(FrmMain main) {
			try {
				S = new FileStream("save.dat", FileMode.Open);
				SavedGamesList SgList = (SavedGamesList)F.Deserialize(S);
				S.Close();
				return SgList;
			} catch (IOException) {
				return null;
			} catch (SerializationException) {
				S.Close();
				return null;
			} catch (ArgumentNullException) {
				S.Close();
				return null;
			}
		} /*deserializeSavedGames*/