ObjectEditor.frmMain.LoadProtoList C# (CSharp) Method

LoadProtoList() private method

private LoadProtoList ( string Path ) : bool
Path string
return bool
        bool LoadProtoList(string Path)
        {
            // Parse stuff
            ItemProtoParser ProtoParser = new ItemProtoParser();
            int Count = LoadedProtos.Count;
            if (ProtoParser.LoadProtosFromFile(Path, Utils.GetVersion(), FOObj, LoadedProtos, CustomInterface.CustomFields))
            {
                Message.Show("Some protos already loaded have been overwritten because they had the same proto id, for information on which protos, see ObjectEditor.log",
                      System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
            lstProtos.SetObjects(LoadedProtos);

            if (Count == LoadedProtos.Count)
            {
                Message.Show("Invalid file or version of the proto. No item data found.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            return true;
        }