예제 #1
0
        private void Places_Load(object sender, EventArgs e)
        {
            TreeNode[] nodes = ft.GetAllLocationsTreeNodes(tvPlaces.Font, false);
            tvPlaces.Nodes.AddRange(nodes);
            int Width  = (int)Application.UserAppDataRegistry.GetValue("Places size - width", this.Width);
            int Height = (int)Application.UserAppDataRegistry.GetValue("Places size - height", this.Height);
            int Top    = (int)Application.UserAppDataRegistry.GetValue("Places position - top", this.Top);
            int Left   = (int)Application.UserAppDataRegistry.GetValue("Places position - left", this.Left);

            this.Width  = Width;
            this.Height = Height;
            this.Top    = Top;
            this.Left   = Left;
            isloading   = false; // only turn off building map if completely done initializing
            if (tvPlaces.Nodes.Count > 0)
            {                    // update map using first node as selected node
                tvPlaces.SelectedNode = tvPlaces.Nodes[0];
            }
            mh.CheckIfGeocodingNeeded(this);
            this.Cursor = Cursors.Default;
        }