Пример #1
0
        void LoadBaseXML(bool firstLoad, string configtoload)
        {
            if (firstLoad)
            {
                LoadListOfConfigs();
            }
            else
            {
                locx          = view.Location.X;
                locy          = view.Location.Y;
                currentConfig = ConfigChoice.Current;
                chatLoc       = ChatCommand.Text;

                if (properties != null)
                {
                    properties.Dispose();
                }

                if (controls != null)
                {
                    controls.Dispose();
                }

                if (view != null)
                {
                    view.Dispose();
                }

                foreach (string p in popoutWindows.Keys)
                {
                    popoutWindows[p].Dispose();
                }

                popoutWindows.Clear();
                sizes.Clear();
                locations.Clear();

                LoadWindow();
                LoadListOfConfigs();
                if (configtoload == "")
                {
                    LoadConfig(((HudStaticText)ConfigChoice[currentConfig]).Text);
                }
                else
                {
                    for (int i = 0; i < ConfigChoice.Count; i++)
                    {
                        if (((HudStaticText)ConfigChoice[i]).Text.Trim() == configtoload.Trim())
                        {
                            ConfigChoice.Current = i;
                            LoadConfig(((HudStaticText)ConfigChoice[i]).Text);
                        }
                    }
                }
            }
        }
Пример #2
0
        public void Dispose()
        {
            if (popoutproperties != null)
            {
                popoutproperties.Dispose();
            }

            if (popoutcontrols != null)
            {
                popoutcontrols.Dispose();
            }

            if (popoutview != null)
            {
                popoutview.Dispose();
            }
        }
Пример #3
0
        protected virtual void Dispose(bool disposing)
        {
            // If you need thread safety, use a lock around these
            // operations, as well as in your methods that use the resource.
            if (!disposed)
            {
                if (disposing)
                {
                    //Remove the view
                    if (view != null)
                    {
                        view.Dispose();
                    }
                }

                // Indicate that the instance has been disposed.
                disposed = true;
            }
        }