Exemple #1
0
        public RelationalBuilder2(SymbIOT p, List <KeyValue> kv)
        {
            InitializeComponent();
            parent            = p;
            keyValues         = kv;
            activeLB          = null;
            selectedChild     = null;
            selectedContainer = null;
            relationalTypes   = new List <KeyValue>();
            RelationalID      = "FD020001";
            scrollpos         = PAN_Relational.VerticalScroll.Value;
            numContainers     = 0;

            BTN_Swap.Visible = parent.dm_name == "Cooking";

            AddGroupBox(0, "Presets");

            AddGroupBox(PAN_Keys.Controls.Count, "Recent");

            LoadLBs(CB_FullDM.Checked);

            if (!File.Exists("SymbIOT_Presets.xml"))
            {
                // Create a file to write to.
                using (StreamWriter sw = File.CreateText("SymbIOT_Presets.xml"))
                {
                    sw.WriteLine(Properties.Resources.SymbIOT_Presets);
                }
            }

            LoadXML();
        }
Exemple #2
0
        public Scripter(SymbIOT p, List <KeyValue> kv)
        {
            InitializeComponent();
            parent       = p;
            keyValues    = kv;
            activeLB     = null;
            batchrunning = false;
            LoadLBs(false);

            scriptDelegate = new UpdateScripterLog(UpdateLog);

            batch = new XmlDocument();
            XmlNode node = batch.CreateNode(XmlNodeType.Element, "Batch", null);

            batch.AppendChild(node);
        }
Exemple #3
0
        public RelationalBuilder(SymbIOT p, List <Cycle> cy, string temp, string time, string probe, string done, string pow, KeyValue cplt)
        {
            InitializeComponent();
            relationalItems = new List <RelationalItem>();
            cycles          = cy;
            tempKey         = temp;
            timeKey         = time;
            probeAmtKey     = probe;
            cpltKey         = cplt;
            doneKey         = done;
            powKey          = pow;
            cyclekeys       = "";
            parent          = p;

            foreach (Cycle c in cycles)
            {
                if (!cyclekeys.Contains(c.KeyID))
                {
                    cyclekeys += c.KeyID + ";";
                }
            }
        }
Exemple #4
0
 public Capability(SymbIOT p, List <List <Cycle> > c, List <KeyValue> k)
 {
     InitializeComponent();
     parent    = p;
     cycles    = c;
     keyValues = k;
     LB_Cycle  = new List <ListBox>(3);
     for (int tabs = 0; tabs < cycles.Count; tabs++)
     {
         ListBox clb = new ListBox();
         clb.SelectionMode         = SelectionMode.MultiExtended;
         clb.Size                  = new System.Drawing.Size(252, 284);
         clb.Location              = new System.Drawing.Point(0, 0);
         clb.SelectedIndexChanged += new EventHandler(CLB_Cycles_SelectedIndexChanged);
         LB_Cycle.Add(clb);
         TAB_Cavities.TabPages[tabs].Controls.Add(LB_Cycle[tabs]);
     }
     if (parent.capabilityLoaded)
     {
         this.LoadListBox();
     }
 }
Exemple #5
0
        //private List<Panel> pans;
        public XCategory(List <KeyValue> kv, SymbIOT parent)
        {
            InitializeComponent();
            this.parent = parent;
            int curtab = 0;

            foreach (KeyValue k in kv)
            {
                if (k.IsUsed)
                {
                    bool   found    = false;
                    string instance = k.Instance.Split('_')[0];
                    instance = instance.StartsWith("Config") ? "Config" : instance;
                    for (int i = 0; i < TAB_Keys.TabPages.Count; i++)
                    {
                        if (TAB_Keys.TabPages[i].Text == instance)
                        {
                            found  = true;
                            curtab = i;
                        }
                    }
                    if (!found)
                    {
                        TAB_Keys.TabPages.Add(instance);
                        curtab = TAB_Keys.TabPages.Count - 1;
                        TAB_Keys.TabPages[curtab].AutoScroll = true;
                    }


                    XCatItem xc = new XCatItem(k, this);
                    xc.Top  = TAB_Keys.TabPages[curtab].Controls.Count * xc.Height;
                    xc.Left = 0;
                    TAB_Keys.TabPages[curtab].Controls.Add(xc);
                }
            }
        }