Exemplo n.º 1
0
		public static TheBox.Data.Facet Convert( string filename )
		{
			LocationsList single = TheBox.Common.Utility.LoadXml( typeof( LocationsList ), filename ) as LocationsList;
			CustomLocations cust = TheBox.Common.Utility.LoadXml( typeof( CustomLocations ), filename ) as CustomLocations;

			if ( single == null )
			{
				cust = TheBox.Common.Utility.LoadXml( typeof( CustomLocations ), filename ) as CustomLocations;

				if ( cust == null )
				{
					return null;
				}
			}

			if ( single != null )
			{
				return Convert( single );
			}
			else
			{
				PB1ImportForm form = new PB1ImportForm();
				form.ShowDialog();
				
				switch ( form.Map )
				{
					case 0 : return Convert( cust.Felucca );
					case 1 : return Convert( cust.Felucca );
					case 2 : return Convert( cust.Ilshenar );
					case 3 : return Convert( cust.Malas );
				}
			}

			return null;
		}
Exemplo n.º 2
0
        public static Facet Convert(string filename)
        {
            var single = Utility.LoadXml(typeof(LocationsList), filename) as LocationsList;
            var cust   = Utility.LoadXml(typeof(CustomLocations), filename) as CustomLocations;

            if (single == null)
            {
                cust = Utility.LoadXml(typeof(CustomLocations), filename) as CustomLocations;

                if (cust == null)
                {
                    return(null);
                }
            }

            if (single != null)
            {
                return(Convert(single));
            }
            var form = new PB1ImportForm();

            form.ShowDialog();

            switch (form.Map)
            {
            case 0:
                return(Convert(cust.Felucca));

            case 1:
                return(Convert(cust.Felucca));

            case 2:
                return(Convert(cust.Ilshenar));

            case 3:
                return(Convert(cust.Malas));
            }

            return(null);
        }
Exemplo n.º 3
0
        public static TheBox.Data.Facet Convert(string filename)
        {
            LocationsList   single = TheBox.Common.Utility.LoadXml(typeof(LocationsList), filename) as LocationsList;
            CustomLocations cust   = TheBox.Common.Utility.LoadXml(typeof(CustomLocations), filename) as CustomLocations;

            if (single == null)
            {
                cust = TheBox.Common.Utility.LoadXml(typeof(CustomLocations), filename) as CustomLocations;

                if (cust == null)
                {
                    return(null);
                }
            }

            if (single != null)
            {
                return(Convert(single));
            }
            else
            {
                PB1ImportForm form = new PB1ImportForm();
                form.ShowDialog();

                switch (form.Map)
                {
                case 0: return(Convert(cust.Felucca));

                case 1: return(Convert(cust.Felucca));

                case 2: return(Convert(cust.Ilshenar));

                case 3: return(Convert(cust.Malas));
                }
            }

            return(null);
        }