Пример #1
0
        public Form1(Data data, ItemChecker ItemC, StartForm startform)
        {
            serialize = new Serialize();
            this.Data = data;
            this.Startform = startform;
            this.itemchecker = ItemC;
            this.GuiC = new GUIControl(this.itemchecker);

            InitializeComponent();
            this.Text = data.getfilename() + " - MCItemChecker";
            GuiC.UpdateListview(lvitems, itemchecker.Items);

            lvitems.ListViewItemSorter = GuiC.ColumnSorter;

            Initlvitems();
            Initlvsubitems();
            Initlvcalculateitems();

            UpdateModPackControls();
            UpdateItemTypeControls();
            cbfiltertype.SelectedItem = "-";
            cbsearchmodpack.SelectedItem = "-";
            cbsearchtype.SelectedItem = "-";

            litemid.Text = "";
            litemname.Text = "";
            litemtype.Text = "";
            lmodpack.Text = "";
        }
Пример #2
0
 /// <summary>
 /// Constructor for creating NewItem Form with it's required components.
 /// </summary>
 /// <param name="IC">ItemChecker Class.</param>
 /// <param name="lvwColumnSorter">Columnsorter class, used to sort listviews.</param>
 /// <param name="mainform">MainForm Class, is called to update item information.</param>
 /// <param name="t"abname>Name of the tab that should be opened on start-up.</param>
 public NewItem(ItemChecker IC, GUIControl guic, Form1 mainform, string tabname)
     : this(IC, guic, mainform)
 {
     if (tabname == "Items")
     {
         tabControl1.SelectedTab = TabNewItem;
     }
     else if (tabname == "Modpack")
     {
         tabControl1.SelectedTab = TabModPack;
     }
     else if (tabname == "Types")
     {
         tabControl1.SelectedTab = TabType;
     }
 }
Пример #3
0
        /// <summary>
        /// Constructor for creating NewItem Form with it's required components.
        /// </summary>
        /// <param name="IC">ItemChecker Class.</param>
        /// <param name="lvwColumnSorter">Columnsorter class, used to sort listviews.</param>
        /// <param name="mainform">MainForm Class, is called to update item information.</param>
        public NewItem(ItemChecker IC, GUIControl guic, Form1 mainform)
            : this()
        {
            this.itemchecker = IC;
            this.Mainform = mainform;
            this.GuiC = guic;
            lvitems.ListViewItemSorter = GuiC.ColumnSorter;
            tbadd.Text = "1";
            tbremove.Text = "1";

            this.Text = Mainform.Text;

            UpdateTypeControls();
            UpdateModPackControls();
            cbmodpack.SelectedItem = "-";
            cbsearchmodpack.SelectedItem = "-";
            cbsearchtype.SelectedItem = "-";
            cbtype.SelectedItem = "-";

            Initlvitems();
            Initlvsubitems();
        }