Пример #1
0
        public Form1()
        {
            Instance = this;
            Storage.InitializeFileDefs();

            InitializeComponent();

            mainPanelLocation = new Point(150, 20);

            Control itemControl = new GenericItemValues();

            itemControl.Tag      = new DataFormTag();
            itemControl.Location = mainPanelLocation;
            itemControl.Visible  = false;
            Controls.Add(itemControl);
            Storage.FileDefSetControl(Storage.FileType.ITEMS, itemControl);

            itemExtensionLocation = new Point(150, itemControl.Bottom);

            GunModControl          = new GunmodValues();
            GunModControl.Tag      = new ItemExtensionFormTag("GUNMOD");
            GunModControl.Location = itemExtensionLocation;
            Controls.Add(GunModControl);

            ComestibleControl          = new ComestibleValues();
            ComestibleControl.Tag      = new ItemExtensionFormTag("COMESTIBLE");
            ComestibleControl.Location = itemExtensionLocation;
            Controls.Add(ComestibleControl);

            GunControl          = new GunValues();
            GunControl.Tag      = new ItemExtensionFormTag("GUN");
            GunControl.Location = itemExtensionLocation;
            Controls.Add(GunControl);

            ToolControl          = new ToolValues();
            ToolControl.Tag      = new ItemExtensionFormTag("TOOL");
            ToolControl.Location = itemExtensionLocation;
            Controls.Add(ToolControl);

            AmmoControl          = new AmmoValues();
            AmmoControl.Tag      = new ItemExtensionFormTag("AMMO");
            AmmoControl.Location = itemExtensionLocation;
            Controls.Add(AmmoControl);

            ArmorControl          = new ArmorValues();
            ArmorControl.Tag      = new ItemExtensionFormTag("ARMOR");
            ArmorControl.Location = itemExtensionLocation;
            Controls.Add(ArmorControl);

            BookControl          = new BookValues();
            BookControl.Tag      = new ItemExtensionFormTag("BOOK");
            BookControl.Location = itemExtensionLocation;
            Controls.Add(BookControl);

            ContainControl          = new ContainValues();
            ContainControl.Tag      = new ItemExtensionFormTag("CONTAINER");
            ContainControl.Location = itemExtensionLocation;
            Controls.Add(ContainControl);

            HideItemExtensions();

            Control itemGroupControl = new ItemGroupValues();

            itemGroupControl.Tag      = new DataFormTag();
            itemGroupControl.Location = mainPanelLocation;
            itemGroupControl.Visible  = false;
            Controls.Add(itemGroupControl);
            Storage.FileDefSetControl(Storage.FileType.ITEM_GROUPS, itemGroupControl);

            Control recipeControl = new RecipeControl();

            recipeControl.Tag      = new DataFormTag();
            recipeControl.Location = mainPanelLocation;
            recipeControl.Visible  = false;
            Controls.Add(recipeControl);
            Storage.FileDefSetControl(Storage.FileType.RECIPES, recipeControl);

            Control professionControl = new ProfessionValues();

            professionControl.Tag      = new DataFormTag();
            professionControl.Location = mainPanelLocation;
            professionControl.Visible  = false;
            Controls.Add(professionControl);
            Storage.FileDefSetControl(Storage.FileType.PROFESSIONS, professionControl);

            Control vehiclePartControl = new VehiclePartValues();

            vehiclePartControl.Tag      = new DataFormTag();
            vehiclePartControl.Location = mainPanelLocation;
            vehiclePartControl.Visible  = false;
            Controls.Add(vehiclePartControl);
            Storage.FileDefSetControl(Storage.FileType.VEHICLE_PARTS, vehiclePartControl);

            //Load previous workspace
            if (File.Exists(".conf"))
            {
                StreamReader read = new StreamReader(new FileStream(".conf", FileMode.Open));
                string       path = read.ReadToEnd();
                read.Close();
                loadFiles(path);
            }
        }
Пример #2
0
        public Form1()
        {
            Instance = this;

            InitializeComponent();

            mainPanelLocation = new Point(150, 20);

            GenericItemControl = new GenericItemValues();
            GenericItemControl.Tag = new DataFormTag();
            GenericItemControl.Location = mainPanelLocation;
            GenericItemControl.Visible = false;
            Controls.Add(GenericItemControl);

            itemExtensionLocation = new Point(150, GenericItemControl.Bottom);

            GunModControl = new GunmodValues();
            GunModControl.Tag = new ItemExtensionFormTag("GUNMOD");
            GunModControl.Location = itemExtensionLocation;
            Controls.Add(GunModControl);

            ComestibleControl = new ComestibleValues();
            ComestibleControl.Tag = new ItemExtensionFormTag("COMESTIBLE");
            ComestibleControl.Location = itemExtensionLocation;
            Controls.Add(ComestibleControl);

            GunControl = new GunValues();
            GunControl.Tag = new ItemExtensionFormTag("GUN");
            GunControl.Location = itemExtensionLocation;
            Controls.Add(GunControl);

            ToolControl = new ToolValues();
            ToolControl.Tag = new ItemExtensionFormTag("TOOL");
            ToolControl.Location = itemExtensionLocation;
            Controls.Add(ToolControl);

            AmmoControl = new AmmoValues();
            AmmoControl.Tag = new ItemExtensionFormTag("AMMO");
            AmmoControl.Location = itemExtensionLocation;
            Controls.Add(AmmoControl);

            ArmorControl = new ArmorValues();
            ArmorControl.Tag = new ItemExtensionFormTag("ARMOR");
            ArmorControl.Location = itemExtensionLocation;
            Controls.Add(ArmorControl);

            BookControl = new BookValues();
            BookControl.Tag = new ItemExtensionFormTag("BOOK");
            BookControl.Location = itemExtensionLocation;
            Controls.Add(BookControl);

            ContainControl = new ContainValues();
            ContainControl.Tag = new ItemExtensionFormTag("CONTAINER");
            ContainControl.Location = itemExtensionLocation;
            Controls.Add(ContainControl);

            HideItemExtensions();

            ItemGroupControl = new ItemGroupValues();
            ItemGroupControl.Tag = new DataFormTag();
            ItemGroupControl.Location = mainPanelLocation;
            ItemGroupControl.Visible = false;
            Controls.Add(ItemGroupControl);

            RecipeControl = new RecipeControl();
            RecipeControl.Tag = new DataFormTag();
            RecipeControl.Location = mainPanelLocation;
            RecipeControl.Visible = false;
            Controls.Add(RecipeControl);

            //Load previous workspace
            if (File.Exists(".conf"))
            {
                StreamReader read = new StreamReader(new FileStream(".conf", FileMode.Open));
                string path = read.ReadToEnd();
                read.Close();
                loadFiles(path);
            }
        }
Пример #3
0
        public Form1()
        {
            Instance = this;
            Storage.InitializeFileDefs();

            InitializeComponent();

            mainPanelLocation = new Point(150, 20);

            Control itemControl = new GenericItemValues();
            itemControl.Tag = new DataFormTag();
            itemControl.Location = mainPanelLocation;
            itemControl.Visible = false;
            Controls.Add(itemControl);
            Storage.FileDefSetControl(Storage.FileType.ITEMS, itemControl);

            itemExtensionLocation = new Point(150, itemControl.Bottom);

            GunModControl = new GunmodValues();
            GunModControl.Tag = new ItemExtensionFormTag("GUNMOD");
            GunModControl.Location = itemExtensionLocation;
            Controls.Add(GunModControl);

            ComestibleControl = new ComestibleValues();
            ComestibleControl.Tag = new ItemExtensionFormTag("COMESTIBLE");
            ComestibleControl.Location = itemExtensionLocation;
            Controls.Add(ComestibleControl);

            GunControl = new GunValues();
            GunControl.Tag = new ItemExtensionFormTag("GUN");
            GunControl.Location = itemExtensionLocation;
            Controls.Add(GunControl);

            ToolControl = new ToolValues();
            ToolControl.Tag = new ItemExtensionFormTag("TOOL");
            ToolControl.Location = itemExtensionLocation;
            Controls.Add(ToolControl);

            AmmoControl = new AmmoValues();
            AmmoControl.Tag = new ItemExtensionFormTag("AMMO");
            AmmoControl.Location = itemExtensionLocation;
            Controls.Add(AmmoControl);

            ArmorControl = new ArmorValues();
            ArmorControl.Tag = new ItemExtensionFormTag("ARMOR");
            ArmorControl.Location = itemExtensionLocation;
            Controls.Add(ArmorControl);

            BookControl = new BookValues();
            BookControl.Tag = new ItemExtensionFormTag("BOOK");
            BookControl.Location = itemExtensionLocation;
            Controls.Add(BookControl);

            ContainControl = new ContainValues();
            ContainControl.Tag = new ItemExtensionFormTag("CONTAINER");
            ContainControl.Location = itemExtensionLocation;
            Controls.Add(ContainControl);

            HideItemExtensions();

            Control itemGroupControl = new ItemGroupValues();
            itemGroupControl.Tag = new DataFormTag();
            itemGroupControl.Location = mainPanelLocation;
            itemGroupControl.Visible = false;
            Controls.Add(itemGroupControl);
            Storage.FileDefSetControl(Storage.FileType.ITEM_GROUPS, itemGroupControl);

            Control recipeControl = new RecipeControl();
            recipeControl.Tag = new DataFormTag();
            recipeControl.Location = mainPanelLocation;
            recipeControl.Visible = false;
            Controls.Add(recipeControl);
            Storage.FileDefSetControl(Storage.FileType.RECIPES, recipeControl);

            Control professionControl = new ProfessionValues();
            professionControl.Tag = new DataFormTag();
            professionControl.Location = mainPanelLocation;
            professionControl.Visible = false;
            Controls.Add(professionControl);
            Storage.FileDefSetControl(Storage.FileType.PROFESSIONS, professionControl);

            Control vehiclePartControl = new VehiclePartValues();
            vehiclePartControl.Tag = new DataFormTag();
            vehiclePartControl.Location = mainPanelLocation;
            vehiclePartControl.Visible = false;
            Controls.Add(vehiclePartControl);
            Storage.FileDefSetControl(Storage.FileType.VEHICLE_PARTS, vehiclePartControl);

            //Load previous workspace
            if (File.Exists(".conf"))
            {
                StreamReader read = new StreamReader(new FileStream(".conf", FileMode.Open));
                string path = read.ReadToEnd();
                read.Close();
                loadFiles(path);
            }
        }
Пример #4
0
        public Form1()
        {
            Instance = this;

            InitializeComponent();

            mainPanelLocation = new Point(150, 20);

            GenericItemControl          = new GenericItemValues();
            GenericItemControl.Tag      = new DataFormTag();
            GenericItemControl.Location = mainPanelLocation;
            GenericItemControl.Visible  = false;
            Controls.Add(GenericItemControl);

            itemExtensionLocation = new Point(150, GenericItemControl.Bottom);

            GunModControl          = new GunmodValues();
            GunModControl.Tag      = new ItemExtensionFormTag("GUNMOD");
            GunModControl.Location = itemExtensionLocation;
            Controls.Add(GunModControl);

            ComestibleControl          = new ComestibleValues();
            ComestibleControl.Tag      = new ItemExtensionFormTag("COMESTIBLE");
            ComestibleControl.Location = itemExtensionLocation;
            Controls.Add(ComestibleControl);

            GunControl          = new GunValues();
            GunControl.Tag      = new ItemExtensionFormTag("GUN");
            GunControl.Location = itemExtensionLocation;
            Controls.Add(GunControl);

            ToolControl          = new ToolValues();
            ToolControl.Tag      = new ItemExtensionFormTag("TOOL");
            ToolControl.Location = itemExtensionLocation;
            Controls.Add(ToolControl);

            AmmoControl          = new AmmoValues();
            AmmoControl.Tag      = new ItemExtensionFormTag("AMMO");
            AmmoControl.Location = itemExtensionLocation;
            Controls.Add(AmmoControl);

            ArmorControl          = new ArmorValues();
            ArmorControl.Tag      = new ItemExtensionFormTag("ARMOR");
            ArmorControl.Location = itemExtensionLocation;
            Controls.Add(ArmorControl);

            BookControl          = new BookValues();
            BookControl.Tag      = new ItemExtensionFormTag("BOOK");
            BookControl.Location = itemExtensionLocation;
            Controls.Add(BookControl);

            ContainControl          = new ContainValues();
            ContainControl.Tag      = new ItemExtensionFormTag("CONTAINER");
            ContainControl.Location = itemExtensionLocation;
            Controls.Add(ContainControl);

            HideItemExtensions();

            ItemGroupControl          = new ItemGroupValues();
            ItemGroupControl.Tag      = new DataFormTag();
            ItemGroupControl.Location = mainPanelLocation;
            ItemGroupControl.Visible  = false;
            Controls.Add(ItemGroupControl);

            RecipeControl          = new RecipeControl();
            RecipeControl.Tag      = new DataFormTag();
            RecipeControl.Location = mainPanelLocation;
            RecipeControl.Visible  = false;
            Controls.Add(RecipeControl);

            //Load previous workspace
            if (File.Exists(".conf"))
            {
                StreamReader read = new StreamReader(new FileStream(".conf", FileMode.Open));
                string       path = read.ReadToEnd();
                read.Close();
                loadFiles(path);
            }
        }