Ejemplo n.º 1
0
        /// <summary>
        /// Sends a confirmation email to the <see cref="Patient"/> linked to the <see cref="Appointment"/> given.
        /// </summary>
        /// <param name="a">The <see cref="Appointment"/> to notify the <see cref="Appointment"/> about.</param>
        private void SendConfirmationEmail(Appointment a)
        {
            StaffFactory   sf    = new StaffFactory(dbCon);
            PatientFactory pf    = new PatientFactory(dbCon);
            Staff          staff = sf.GetStaffByID(a.StaffId)[0];
            DateTime       date  = a.AppointmentDate;
            DateTime       time  = a.AppointmentTime;
            string         email = pf.GetPatientsByID(a.PatientId)[0].Email;
            string         phone = pf.GetPatientsByID(a.PatientId)[0].Phone;

            Emailer.SendAppointmentEmail(email, staff, date, time);
            Texter.SendAppointmentText(phone, staff, date, time);
        }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        //sprites
        string[] spriteNames = { "Celebi", "Gardevoir", "Name", "Wood Robot", "The Piston Claw Pummeler", "The Calculating Mech" };
        spritesDict = new Dictionary <string, Sprite> ();
        foreach (string spriteName in spriteNames)
        {
            spritesDict [spriteName] = Resources.Load <Sprite> ("Images/" + spriteName);
        }

        //set up Player 1 and player 2 using strings passed from previous scene
        CreatePokemonFromName(1, player1PokemonSelection);
        CreatePokemonFromName(2, player2PokemonSelection);
        player1.Init();
        player2.Init();

        texter = new Texter(textingPanel.GetComponentInChildren <Text> ());

        //Set up the applied Moves lists
        player1AppliedEffects = new List <Effect> ();
        player2AppliedEffects = new List <Effect> ();

        //both players have not selected a move
        player1SelectedMove = player2SelectedMove = -1;

        //At first, player 1 is selecting a move
        currState = GameState.Player1StartSelect;

        //setting up the buttons to tell us which move was pressed

        selectMoveButtons [0].onClick.AddListener(delegate() { SelectMove(0); });
        selectMoveButtons [1].onClick.AddListener(delegate() { SelectMove(1); });
        selectMoveButtons [2].onClick.AddListener(delegate() { SelectMove(2); });
        selectMoveButtons [3].onClick.AddListener(delegate() { SelectMove(3); });
        selectMoveButtons [4].onClick.AddListener(delegate() { SelectMove(4); });
        selectMoveButtons [5].onClick.AddListener(delegate() { SelectMove(5); });

        //show UI for player 1
        showMoves(1);
    }
Ejemplo n.º 3
0
 public void Awake()
 {
     instance = this;
 }
Ejemplo n.º 4
0
        public Settings()
        {
            InitializeComponent();
            this.DataContext = CurrentModel;


            if (debugCheck == 1)
            {
                Debug.IsChecked = true;
                Texter.Clear();
            }
            if (progressbarCheck == 1)
            {
                Pb.IsChecked = true;
                Texter.Clear();
            }

            if (autoCheck == 1)
            {
                Auto.IsChecked = true;
                Type.IsEnabled = false;
                Texter.Clear();
            }
            if (File.ReadAllText(@"EST.txt") != "")
            {
                int strings = System.IO.File.ReadAllLines("EST.txt").Length;
                int str     = 0;
                int data    = strings / 6;
                for (int path = 0; path < data; path++)
                {
                    if (File.ReadLines("EST.txt").Skip(str + path).First() == "")
                    {
                        continue;
                    }
                    else
                    {
                        WrapPanel   wrapPanel = new WrapPanel();
                        RadioButton rdn       = new RadioButton();
                        if (File.ReadLines("EST.txt").Skip(str + 3).First() != "")
                        {
                            ImageSource image = new ImageSourceConverter().ConvertFromString(File.ReadLines("EST.txt").Skip(str + 3).First()) as ImageSource;
                            wrapPanel.Children.Add(new Image {
                                Source = image, Width = 17, Height = 15
                            });
                        }
                        wrapPanel.Children.Add(new TextBlock {
                            Text = File.ReadLines("EST.txt").Skip(str + 1).First(), Foreground = Brushes.White
                        });
                        rdn.TabIndex = Int32.Parse(File.ReadLines("EST.txt").Skip(5).First());
                        rdn.Content  = wrapPanel;
                        rdn.Name     = File.ReadLines("EST.txt").Skip(str + 1).First();
                        Tsys.Items.Add(rdn);
                        str += 6;
                    }
                }
            }

            foreach (UIElement uI in Tsys.Items)
            {
                if (uI is RadioButton)
                {
                    ((RadioButton)uI).Checked += Sys_Checked;
                }
            }
            foreach (UIElement uI in Lang.Items)
            {
                if (uI is RadioButton)
                {
                    ((RadioButton)uI).Checked += Lang_Checked;
                }
            }
        }
Ejemplo n.º 5
0
 private void Auto_MouseLeave(object sender, MouseEventArgs e)
 {
     Texter.Clear();
 }
Ejemplo n.º 6
0
 private void Progressbar_MouseLeave(object sender, MouseEventArgs e)
 {
     Texter.Clear();
     Texter.Foreground = Brushes.White;
 }
Ejemplo n.º 7
0
 private void Fullscreen_MouseLeave(object sender, MouseEventArgs e)
 {
     Texter.Clear();
     Texter.Foreground = Brushes.White;
 }