Exemplo n.º 1
0
        private void IntroPictureUser_Click(object sender, EventArgs e)
        {
                        #if !DEBUG
            try
            {
                        #endif

            this.UserInteract();
            ForcedX.GCCollect();

                        #if !DEBUG
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.GetLowestMessage(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
                        #endif
        }
Exemplo n.º 2
0
        public void LoadMapFromProfile(bool gccollect)
        {
            this._map.Clear();
            this._map.EnsureCapacity(this.FastEstimateCapacity());

            foreach (var sdb in this.Profile)
            {
                foreach (var manager in sdb.Database.Managers)
                {
                    foreach (Collectable collection in manager)
                    {
                        var path = sdb.Filename + delim + manager.Name + delim + collection.CollectionName;
                        this._map.Add(path, collection);
                    }
                }
            }

            if (gccollect)
            {
                ForcedX.GCCollect();
            }
        }
Exemplo n.º 3
0
        private void IntroPictureModder_Click(object sender, EventArgs e)
        {
            // If password check was not done yet (deprecated)

            /*
             * if (!Configurations.Default.PassPassed)
             * {
             *      using var form = new ModderPass();
             *
             *      if (form.ShowDialog() != DialogResult.OK)
             *      {
             *
             *              return;
             *
             *      }
             *
             * }
             */

            this.ModderInteract();
            ForcedX.GCCollect();
        }
Exemplo n.º 4
0
        public void Invoke()
        {
            var info = new FileInfo(this._options.File);

            if (!info.Exists)
            {
                return;
            }

            var comp = this.NeedsDecompression();

            if (!comp && info.Length > (1 << 26))
            {
                this.ReadFromStream();
            }
            else
            {
                this.ReadFromBuffer(comp);
            }

                        #if DEBUG
            foreach (var pair in this._offsets)
            {
                this._logger.WriteLine($"File: {this._options.File}");
                this._logger.Write($"0x{pair.Key:X8} | ");

                foreach (var off in pair.Value)
                {
                    this._logger.Write($" ---> 0x{off:X8}");
                }

                this._logger.WriteLine(String.Empty);
            }
                        #endif

            ForcedX.GCCollect();
        }
Exemplo n.º 5
0
        public void Invoke()
        {
            var info = new FileInfo(this._options.File);

            if (!info.Exists)
            {
                this.WriteUnique();
                return;
            }

            info.IsReadOnly = false;
            var comp = this.NeedsDecompression();

            if (!comp && info.Length > (1 << 26))
            {
                this.WriteFromStream();
            }
            else
            {
                this.WriteFromBuffer(comp);
            }

            ForcedX.GCCollect();
        }