Пример #1
0
 public void ClickMe(string canvasid, int windowid)
 {
     CanvasControlLibrary.CCLLabelProps lp = ccl.getControlPropsByControlNameID("l1") as CanvasControlLibrary.CCLLabelProps;
     if (Convert.ToInt32(ccl.CurrentSessionObj.Data.GetValue("Count")) == 0)
     {
         ccl.CurrentSessionObj.Data.Add("Counter", 1);
     }
     else
     {
         ccl.CurrentSessionObj.Data.SetValue("Counter", (Convert.ToInt32(ccl.CurrentSessionObj.Data.GetValue("Counter")) + 1).ToString());
     }
     lp.Text = ccl.CurrentSessionObj.Data.GetValue("Counter").ToString();
     CanvasControlLibrary.CCLImageProps i1 = ccl.getControlPropsByControlNameID("i1") as CanvasControlLibrary.CCLImageProps;
     i1.ImageURL = "Bombay.png";
     parameters.Add(ccl.InputParams);
 }
Пример #2
0
    public void DoPaymentForTickets(string canvasid, int windowid)
    {
        CanvasControlLibrary.CCLButtonProps   buttonProps          = ccl.getControlPropsByWindowID(canvasid, windowid.ToString()) as CanvasControlLibrary.CCLButtonProps;
        CanvasControlLibrary.CCLLabelProps    lp                   = ccl.getControlPropsByControlNameID((string)buttonProps.Tag) as CanvasControlLibrary.CCLLabelProps;
        CanvasControlLibrary.CCLTextBoxProps  textbox              = ccl.getControlPropsByControlNameID("numTicketsTextBox") as CanvasControlLibrary.CCLTextBoxProps;
        CanvasControlLibrary.CCLComboBoxProps selectCinemaComboBox = ccl.getControlPropsByControlNameID("selectCinemaComboBoxComboBoxTextArea") as CanvasControlLibrary.CCLComboBoxProps;
        Regex  regex      = new System.Text.RegularExpressions.Regex("MovieTimeLabel[0-9]+Poster(?<PosterIndex>[0-9]+)");
        Match  m          = regex.Match((string)buttonProps.Tag);
        int    movieIndex = Convert.ToInt32(m.Groups["PosterIndex"].Value);
        string movieName  = "";

        for (int i = 0; i < movieIndexes.Count; i++)
        {
            if (((ArrayList)movieIndexes[i])[0].ToString() == selectCinemaComboBox.Data[Convert.ToInt32(selectCinemaComboBox.SelectedID)].ToString())
            {
                movieName = ((ArrayList)((ArrayList)movieIndexes[i])[1])[movieIndex].ToString();
            }
        }
        parameters.Add("The payment was successful.  You have " + textbox.UserInputText + " tickets to see " + movieName + " at " + selectCinemaComboBox.Data[Convert.ToInt32(selectCinemaComboBox.SelectedID)].ToString() +
                       " showing at time " + lp.Text + ".");
    }