예제 #1
0
        //The overriden DragDrop and DragEnter methods are necessary since a tabcontrol without
        //any tabpages does not fire either of the events, this is by design but unfortunate.
        protected override void OnDragDrop(DragEventArgs e)
        {
            base.OnDragDrop(e);
            if (e.Data.GetDataPresent(typeof(ATP)))
            {
                ATP tb = (ATP)e.Data.GetData(typeof(ATP));
                if (tb.Equals(null))
                {
                    return;
                }
                Point   p    = PointToClient(new  Point(e.X, e.Y));
                Control ctrl = GetChildAtPoint(p);
                if (ctrl == null)
                {
                    return;
                }
                if (ctrl == this.nuiTabControl1)
                {
                    if (this.nuiTabControl1.TabPages.Count == 0)
                    {
                        this.nuiTabControl1.TabPages.Add(tb.Element);
                        this.nuiTabControl1.SelectedTab = tb.Element;
                    }
                }

                if (ctrl == this.nuiTabControl2)
                {
                    if (this.nuiTabControl2.TabPages.Count == 0)
                    {
                        this.nuiTabControl2.TabPages.Add(tb.Element);
                        this.nuiTabControl2.SelectedTab = tb.Element;
                    }
                }
            }
        }
예제 #2
0
 // Clear the form.
 private void buttonClear_Click(object sender, EventArgs e)
 {
     atp = new ATP();
     // Clear outputs.
     pictureBoxTree.Image = null;
     richTextBoxCNF.Clear();
     richTextBoxResolution.Clear();
     m_premisses.Clear();
     m_theorem.Clear();
     treeViewTheory.Nodes[0].Nodes.Clear();
     treeViewTheory.Nodes[1].Nodes.Clear();
     // Clear errors.
     ClearErrorMsgs();
 }
예제 #3
0
        /// <summary>
        /// Prints the item report
        /// </summary>
        /// <returns>The item report</returns>
        public override string ItemReport()
        {
            string report = ItemReaderText + "\n" + "Hex: " + HexString + "\n\n";

            report += "Type: " + Enum.GetName(typeof(ItemType), Type) + "\n";

            report += "\n";

            if (HP != 0)
            {
                report += "HP: " + HP.ToString() + "\n";
            }
            if (TP != 0)
            {
                report += "TP: " + TP.ToString() + "\n";
            }
            if (ATP != 0)
            {
                report += "ATP: " + ATP.ToString() + "\n";
            }
            if (DFP != 0)
            {
                report += "DFP: " + DFP.ToString() + "\n";
            }
            if (MST != 0)
            {
                report += "MST: " + MST.ToString() + "\n";
            }
            if (ATA != 0)
            {
                report += "ATA: " + ATA.ToString() + "\n";
            }
            if (EVP != 0)
            {
                report += "EVP: " + EVP.ToString() + "\n";
            }
            if (LCK != 0)
            {
                report += "LCK: " + LCK.ToString() + "\n";
            }
            if (EFR != 0)
            {
                report += "EFR: " + EFR.ToString() + "\n";
            }
            if (EIC != 0)
            {
                report += "EIC: " + EIC.ToString() + "\n";
            }
            if (ETH != 0)
            {
                report += "ETH: " + ETH.ToString() + "\n";
            }
            if (ELT != 0)
            {
                report += "ELT: " + ELT.ToString() + "\n";
            }
            if (EDK != 0)
            {
                report += "EDK: " + EDK.ToString() + "\n";
            }

            report += "\n";

            report += "HUmar:     " + (((EquipMask & HUmarMask) > 0) ? "x" : "") + "\n";
            report += "HUnewearl: " + (((EquipMask & HUnewearlMask) > 0) ? "x" : "") + "\n";
            report += "HUcast:    " + (((EquipMask & HUcastMask) > 0) ? "x" : "") + "\n";
            report += "HUcaseal:  " + (((EquipMask & HUcasealMask) > 0) ? "x" : "") + "\n";
            report += "RAmar:     " + (((EquipMask & RAmarMask) > 0) ? "x" : "") + "\n";
            report += "RAmarl:    " + (((EquipMask & RAmarlMask) > 0) ? "x" : "") + "\n";
            report += "RAcast:    " + (((EquipMask & RAcastMask) > 0) ? "x" : "") + "\n";
            report += "RAcaseal:  " + (((EquipMask & RAcasealMask) > 0) ? "x" : "") + "\n";
            report += "FOmar:     " + (((EquipMask & FOmarMask) > 0) ? "x" : "") + "\n";
            report += "FOmarl:    " + (((EquipMask & FOmarlMask) > 0) ? "x" : "") + "\n";
            report += "FOnewm:    " + (((EquipMask & FOnewmMask) > 0) ? "x" : "") + "\n";
            report += "FOnewearl: " + (((EquipMask & FOnewearlMask) > 0) ? "x" : "") + "\n";

            return(report);
        }
예제 #4
0
 public LTP()
 {
     _aTP = new ATP();
 }
예제 #5
0
        /// <summary>
        /// Prints the item report
        /// </summary>
        /// <returns>The item report</returns>
        public override string ItemReport()
        {
            string report = ItemReaderText + "\n" + "Hex: " + HexString + "\n\n";

            report += "Type: " + Enum.GetName(typeof(ItemType), Type) + "\n";

            if (RequirementLevel != 0)
            {
                report += "Requirement: Level " + RequirementLevel + " \n";
            }

            if (Type == ItemType.Frame)
            {
                report += "Slots: " + Slots.ToString() + "\n";
            }

            report += "Base DFP: " + DFP.ToString() + "\n";
            report += "Base EVP: " + EVP.ToString() + "\n";

            report += "DFP Roll: " + VariableDFP.ToString() + "/" + (MaxDFP - DFP).ToString() + "\n";
            report += "EVP Roll: " + VariableEVP.ToString() + "/" + (MaxEVP - EVP).ToString() + "\n";

            report += "\n";

            if (HP != 0)
            {
                report += "HP: " + HP.ToString() + "\n";
            }
            if (TP != 0)
            {
                report += "TP: " + TP.ToString() + "\n";
            }
            if (ATP != 0)
            {
                report += "ATP: " + ATP.ToString() + "\n";
            }
            if (MST != 0)
            {
                report += "MST: " + MST.ToString() + "\n";
            }
            if (ATA != 0)
            {
                report += "ATA: " + ATA.ToString() + "\n";
            }
            if (LCK != 0)
            {
                report += "LCK: " + LCK.ToString() + "\n";
            }
            if (EFR != 0)
            {
                report += "EFR: " + EFR.ToString() + "\n";
            }
            if (EIC != 0)
            {
                report += "EIC: " + EIC.ToString() + "\n";
            }
            if (ETH != 0)
            {
                report += "ETH: " + ETH.ToString() + "\n";
            }
            if (ELT != 0)
            {
                report += "ELT: " + ELT.ToString() + "\n";
            }
            if (EDK != 0)
            {
                report += "EDK: " + EDK.ToString() + "\n";
            }

            report += "\n";

            report += "HUmar:     " + (((EquipMask & HUmarMask) > 0) ? "x" : "") + "\n";
            report += "HUnewearl: " + (((EquipMask & HUnewearlMask) > 0) ? "x" : "") + "\n";
            report += "HUcast:    " + (((EquipMask & HUcastMask) > 0) ? "x" : "") + "\n";
            report += "HUcaseal:  " + (((EquipMask & HUcasealMask) > 0) ? "x" : "") + "\n";
            report += "RAmar:     " + (((EquipMask & RAmarMask) > 0) ? "x" : "") + "\n";
            report += "RAmarl:    " + (((EquipMask & RAmarlMask) > 0) ? "x" : "") + "\n";
            report += "RAcast:    " + (((EquipMask & RAcastMask) > 0) ? "x" : "") + "\n";
            report += "RAcaseal:  " + (((EquipMask & RAcasealMask) > 0) ? "x" : "") + "\n";
            report += "FOmar:     " + (((EquipMask & FOmarMask) > 0) ? "x" : "") + "\n";
            report += "FOmarl:    " + (((EquipMask & FOmarlMask) > 0) ? "x" : "") + "\n";
            report += "FOnewm:    " + (((EquipMask & FOnewmMask) > 0) ? "x" : "") + "\n";
            report += "FOnewearl: " + (((EquipMask & FOnewearlMask) > 0) ? "x" : "") + "\n";

            return(report);
        }