Exemplo n.º 1
0
 private void swap()
 {
     if (midSwap)
     {
         if (this != toSwap)
         {
             // Perform Swap
             ScreenIndex temp = this.index;
             this.index   = toSwap.index;
             toSwap.index = temp;
             toSwap.updateUI(dir, Color.black, Color.black);
         }
         else
         {
             updateUI(dir, Color.white, Color.black);
         }
         midSwap = false;
     }
     else
     {
         // Store Info for Swap
         toSwap  = this;
         midSwap = true;
         updateUI(dir, Color.white, Color.yellow);
     }
 }
        private void MainNavigationHendler(ScreenIndex index)
        {
            switch (index)
            {
            case ScreenIndex.MainScreen:
                ShowMainScreen();

                break;

            case ScreenIndex.AppartmentScreen:
                ShowDatabaseScreen();

                break;

            case ScreenIndex.RenersScreen:
                break;

            case ScreenIndex.RentListScreen:
                break;

            case ScreenIndex.Exit:
                break;

            case ScreenIndex.Test:
                ShowTestScreen();
                break;
            }
        }
Exemplo n.º 3
0
        protected void InitializeComponent_extended()
        {
            this.LastFallTime    = new DateTime();
            this.BackColor       = Color.LimeGreen;
            this.TransparencyKey = Color.LimeGreen;

            this.Text = String.Format("Veneer {0}", ScreenIndex.ToString("D2"));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Build a csv line describing this pup screen (to be saved in a screens.pup file)
        /// </summary>
        /// <returns></returns>
        public string GetCsv()
        {
            string text = "";

            text += ScreenIndex.ToString() + ",";
            text += "\"" + Description + "\",";
            text += "\"" + PlayList + "\",";
            text += "\"" + Playfile + "\",";
            text += (Loopit?"1":"") + ",";
            text += Active + ",";
            text += Priority + ",";
            text += "\"" + CustomPos + "\"";
            return(text);
        }
Exemplo n.º 5
0
// ---------- Setup Methods ----------

    public void setup(DisplayCamera dc, CalibrationScreen nextScreen, CalibrationScreen prevScreen)
    {
        displayCam = dc;
        next       = nextScreen;
        prev       = prevScreen;

        index = (ScreenIndex)dc.cameraData.display;

        //Debug.Log (prev.ToString () + " > " + index.ToString () + " > " + next.ToString ());

        Image[] temp = gameObject.GetComponentInChildren <GridLayoutGroup> ().GetComponentsInChildren <Image> ();
        foreach (Image img in temp)
        {
            switch (img.gameObject.name)
            {
            case "TopLeftMarker":
                controlPoints [0] = img;
                break;

            case "TopMidMarker":
                controlPoints [1] = img;
                break;

            case "TopRightMarker":
                controlPoints [2] = img;
                break;

            case "MidLeftMarker":
                controlPoints [7] = img;
                break;

            case "MidRightMarker":
                controlPoints [3] = img;
                break;

            case "BotLeftMarker":
                controlPoints [6] = img;
                break;

            case "BotMidMarker":
                controlPoints [5] = img;
                break;

            case "BotRightMarker":
                controlPoints [4] = img;
                break;
            }
        }
    }
Exemplo n.º 6
0
 /// <summary>
 /// get a description of this pup screen as a list item
 /// </summary>
 /// <returns></returns>
 public ListViewItem GetListViewItem()
 {
     return(new ListViewItem(new[]
     {
         ScreenIndex.ToString(),
         Description,
         //PlayList,
         //Playfile,
         //Loopit,
         Active,
         //Priority,
         CustomPos
     }
                             ));
 }
Exemplo n.º 7
0
        public XmlElement GenerateXmlElement(XmlDocument doc)
        {
            var node = doc.CreateElement("Viewport");

            node.SetAttribute("Index", ScreenIndex.ToString());
            node.SetAttribute("Name", Name);
            if (!IsVisible)
            {
                node.SetAttribute("IsVisible", IsVisible.ToString());
            }
            node.SetAttribute("TimeLength", TimeLength.ToString());
            node.SetAttribute("SwitchMode", SwitchMode.ToString());
            node.SetAttribute("SwitchHotKey", SwitchHotKey.ToString());
            if (ElementsCaptionColor != System.Drawing.Color.White)
            {
                node.SetAttribute("ElementsCaptionColor", ElementsCaptionColor.ToArgb().ToString());
            }
            if (ElementsCaptionScale != 1)
            {
                node.SetAttribute("ElementsCaptionScale", ElementsCaptionScale.ToString());
            }
            foreach (var elm in Elements)
            {
                if (elm == null)
                {
                    continue;
                }
                if (elm.Resource != null && elm.Resource.FullFilePath == ResourceInfo_BackgroundImage.DefaultBackgroundImageFile)
                {
                    continue;
                }
                var enode = elm.GenerateXmlElement(doc);
                node.AppendChild(enode);
            }
            var gnode = ElemGroupCollector.GenerateXmlElement(doc);

            if (gnode != null)
            {
                node.AppendChild(gnode);
            }
            return(node);
        }