Esempio n. 1
0
        private void LoadOptions()
        {
            // Check if options file exists
            if ( System.IO.File.Exists( OptionsFile ) )
            {
                // File exists read it
                XmlSerializer serializer = new XmlSerializer(typeof(LocOptions));
                FileStream theStream = new FileStream( OptionsFile, FileMode.Open );
                Options = (LocOptions) serializer.Deserialize( theStream );
                theStream.Close();

                // Apply options
                Map.DrawStatics = Options.DrawStatics;
                Map.Map = Options.Map;
                Map.ZoomLevel = Options.ZoomLevel;
                Map.Center = Options.MapCenter;
                if ( Options.UOFolder != "" )
                    Map.MulManager.CustomFolder = Options.UOFolder;
                this.TopMost = Options.AlwaysOnTop;
                m_GoCommand = Options.GoCommand;
            }
        }
Esempio n. 2
0
        public LocationEditor()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            Text = TitleText;

            Options = new LocOptions();

            LoadOptions();
        }