Beispiel #1
0
        public static List <Component> TrackMaker(SubAssemblyBase subassembly, int PanelCount, int positions, TrackConfiguration configuration)
        {
            List <Component> result = new List <Component>();

            switch (configuration)
            {
            case TrackConfiguration.Telescoping:

                #region Track Blades

                for (int i = 0; i < PanelCount; i++)
                {
                    Component p = new Component(3345, "Blade-" + i.ToString(), subassembly, 1, subassembly.SubAssemblyWidth + 3.0m);
                    result.Add(p);
                }


                #endregion



                break;

            case TrackConfiguration.BiComponenting:
                break;

            default:
                break;
            }


            return(result);
        }
Beispiel #2
0
        public Component(int sourceID, string functionalName, SubAssemblyBase parent, int Quantity, decimal calculatedLength, decimal width)
        {
            if (sourceID == -1)
            {
                m_source = new SourceMaterial();
                m_ComponentSourceNumber = -1;
            }
            else
            {
                try
                {
                    this.m_source = FrameWorks.PartDictionary.PartSource[sourceID];
                }
                catch
                {
                    ComponentNotFoundException ex = new ComponentNotFoundException("Component ID = does not exist");
                    throw ex;
                }
            }


            this.FunctionalName    = functionalName;
            this.m_parentAssembly  = parent;
            this.m_ComponentLength = calculatedLength;
            this.Qnty           = Quantity;
            this.ComponentWidth = width;
        }
Beispiel #3
0
        public LComponent(int routingID, string TaskName, SubAssemblyBase parent, decimal laborAmount, decimal laborRate)
        {
            this.ComponentType  = "Labor";
            this.m_UOM          = 11;
            this.FunctionalName = TaskName;

            this.m_parentAssembly     = parent;
            this.m_rate               = laborRate;
            this.m_laborAmount        = laborAmount;
            this.Qnty                 = 1;
            this.m_ComponentLength    = 0.0m;
            this.m_ComponentWidth     = 0.0m;
            this.m_ComponentGroupType = "Labor";

            this.m_ComponentThick = 0.0m;

            this.m_waste  = 0.0m;
            this.m_weight = 0.0m;
            this.m_source = new SourceMaterial();
            this.m_source.MaterialDescription = TaskName;
            this.m_source.MaterialName        = TaskName;
            this.m_source.Cost      = laborRate;
            this.ComponentGroupType = "Labor";
            this.m_UOM = 11; //hrs
        }
Beispiel #4
0
        public Part(int sourceID, string functionalName, SubAssemblyBase parent, int Quantity, decimal calculatedLength)
        {
            if (sourceID == -1)
            {
                m_source           = new Material();
                m_partSourceNumber = -1;
            }
            else
            {
                try
                {
                    this.m_source = FrameWorks.SourceManager.PartsSource[sourceID];
                }
                catch
                {
                    PartNotFoundException ex = new PartNotFoundException("Part ID = does not exist");
                    throw ex;
                }
            }


            this.FunctionalName   = functionalName;
            this.m_parentAssembly = parent;
            this.m_partLength     = calculatedLength;
            this.Qnty             = Quantity;
        }
Beispiel #5
0
 private void buildTree_DoubleClick(object sender, EventArgs e)
 {
     if (buildTree.SelectedNode.Tag.GetType().BaseType.ToString() == "FrameWorks.SubAssemblyBase")
     {
         FrameWorks.SubAssemblyBase selected = (FrameWorks.SubAssemblyBase)buildTree.SelectedNode.Tag;
         PartEditor pedit = new PartEditor(selected);
         pedit.Show();
     }
 }
Beispiel #6
0
        private void buildTree_AfterSelect(object sender, TreeViewEventArgs e)
        {
            string sel = e.Node.Tag.GetType().BaseType.ToString();


            switch (sel)
            {
            case "FrameWorks.SubAssemblyBase":
            {
                FrameWorks.SubAssemblyBase selectedPart = (FrameWorks.SubAssemblyBase)e.Node.Tag;
                this.partPropertyGrid.SelectedObject = selectedPart;
                break;
            }

            case "FrameWorks.AssemblyBase":
            {
                FrameWorks.AssemblyBase selectedPart = (FrameWorks.AssemblyBase)e.Node.Tag;
                this.partPropertyGrid.SelectedObject = selectedPart;
                break;
            }

            case "System.Object":
            {
                FrameWorks.Part selectedPart = (FrameWorks.Part)e.Node.Tag;
                this.partPropertyGrid.SelectedObject = selectedPart;
                break;
            }

            case "FrameWorks.Part":
            {
                FrameWorks.LPart selectedPart = (FrameWorks.LPart)e.Node.Tag;
                this.partPropertyGrid.SelectedObject = selectedPart;
                break;
            }



            default:
                break;
            }
        }