Ejemplo n.º 1
0
 // REPLACE myFrame WITHIN EXISTING PANEL
 public void replace(string argmyFrameName, myFrame argmyFrame)
 {
     if (this.data.ContainsKey(argmyFrameName))
     {
         this.remove(argmyFrameName);
         this.add(argmyFrameName, argmyFrame);
     }
 }
Ejemplo n.º 2
0
        // ************************************************************
        // UNION, MERGE, ADD, ETC.
        // ************************************************************



        public void Union(myFrame anotherFrame)
        {
            foreach (KeyValuePair <DateTime, myElement> kvp in anotherFrame.data)
            {
                if (!data.ContainsKey(kvp.Key))
                {
                    this.data.Add(kvp.Key, kvp.Value);
                }
            }
        }
Ejemplo n.º 3
0
        // SWAP myFrame WITHIN PANEL
        public myFrame swap(string argmyFrameName, myFrame argmyFrame)
        {
            myFrame ans = new myFrame();

            if (this.data.ContainsKey(argmyFrameName))
            {
                ans = this.pop(argmyFrameName);
                this.add(argmyFrameName, argmyFrame);
            }

            return(ans);
        }
Ejemplo n.º 4
0
        // ************************************************************
        // COMMON METHODS
        // ************************************************************


        // ADD myFrame TO PANEL
        public void add(string argmyFrameName, myFrame argmyFrame)
        {
            // Perform sanity checks
            // @TODO : to be implemented
            if (this.data.ContainsKey(argmyFrameName))
            {
                throw new System.ArgumentException("myFrame already exists in Panel.", "ExistingmyFrame");
            }

            // Add to panel
            this.data[argmyFrameName] = argmyFrame;
        }
Ejemplo n.º 5
0
        // POP myFrame FROM PANEL
        public myFrame pop(string argmyFrameName)
        {
            myFrame ans = new myFrame();

            if (this.data.ContainsKey(argmyFrameName))
            {
                ans = this.data[argmyFrameName];
                this.remove(argmyFrameName);
            }

            return(ans);
        }