Inheritance: MonoBehaviour
Exemple #1
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         const string url  = "http://localhost/comido/cgi_bin/fetch_cafeteria_details.php";
         var          requ = WebRequest.Create(url);
         requ.Timeout = 80000;
         var responses = requ.GetResponse();
         var stream    = responses.GetResponseStream();
         var xmlDoc    = XDocument.Load(stream);
         var response  = from status in xmlDoc.Descendants("status")
                         where status.Element("Name")?.Value == comboBox1.SelectedItem.ToString()
                         select new
         {
             Points = status.Element("CafID")?.Value
         };
         foreach (var status in response)
         {
             _cafid = status.Points;
             materialLabel2.Text = _cafid;
         }
     }
     catch (Exception ce)
     {
         InformationBox.Show(ce.Message);
     }
 }
 public void GetItemInformation(bool seed, Plant.Type seedType, Vector3 pos)
 {
     box = Instantiate(Resources.Load("Prefabs/UI/ItemInformation") as GameObject, pos, Quaternion.identity).GetComponent <InformationBox>();
     box.transform.SetParent(transform);
     box.transform.SetAsLastSibling();
     box.setInformation(GetInfo(seed, seedType));
 }
        private void OnInformationBoxChanges(InformationBox box)
        {
            ServerEntity.InformationBox = box;
            if (ServerEntity.InformationBox == null)
            {
                TileToolTip.IsOpen = false;
                return;
            }

            if (ServerEntity.InformationBox.Visible)
            {
                ToolTipText.Text = ServerEntity.InformationBox.Data;
                if (!TileToolTip.IsOpen)
                {
                    TileToolTip.IsOpen = true;
                }
                else
                {
                    UpdateTileTooltipPosition();
                }
            }
            else
            {
                TileToolTip.IsOpen = false;
                return;
            }
        }
Exemple #4
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                string     porterid = Form1.Logininfo.userid;
                string     url      = "http://localhost/Allocator/cgi-bin/fetch_supervisor_room_block.php?porterid=" + porterid + "";
                WebRequest requ     = WebRequest.Create(url);
                requ.Timeout = 40000;
                WebResponse responses = requ.GetResponse();
                Stream      stream    = responses.GetResponseStream();
                XDocument   xmlDoc    = XDocument.Load(stream);

                var response = from status in xmlDoc.Descendants("status")
                               where status.Element("BlockNum").Value == comboBox1.SelectedItem.ToString()
                               select new
                {
                    Points = status.Element("BlockID").Value,
                };

                foreach (var status in response)
                {
                    blockid = status.Points;
                    loadroomcombo();
                }
            }
            catch (Exception ce)
            {
                InformationBox.Show(ce.Message);
            }
        }
Exemple #5
0
 private void materialFlatButton1_Click(object sender, EventArgs e)
 {
     try
     {
         string     url  = "http://localhost/Allocator/cgi-bin/update_room_information.php?roomid=" + room_id + "&occupant=" + occupant + "";
         WebRequest requ = WebRequest.Create(url);
         requ.Timeout = 40000;
         WebResponse response  = requ.GetResponse();
         Stream      stream    = response.GetResponseStream();
         XmlDocument CompSpecs = new XmlDocument();
         CompSpecs.Load(stream);
         //Load the data from the file into the XmlDocument (CompSpecs) //
         XmlNodeList NodeList = CompSpecs.GetElementsByTagName("response");
         // Create a list of the nodes in the xml file //
         string confirmation = NodeList[0].FirstChild.ChildNodes[0].InnerText.Trim();;
         if (confirmation == "1")
         {
             InformationBox.Show("Room Information Has Been Changed", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
         }
         else
         {
             InformationBox.Show("Room Information Was Not Changed Successfully", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
         }
     }
     catch (Exception exec)
     {
         InformationBox.Show(exec.Message, "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Error);
     }
 }
Exemple #6
0
        private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            if (backgroundWorker1.CancellationPending)
            {
                return;
            }
            var obj = (MyWorkerClass)e.UserState;

            switch (obj.Access)
            {
            case "1":
                textBox1.Clear();
                bunifuTransition1.HideSync(homeButton1);
                var success = new SuccessAlert();
                success.ShowDialog();

                var homepage = new Activity();
                homepage.Show();
                Hide();
                break;

            case "0":
                textBox1.Clear();
                bunifuTransition1.HideSync(homeButton1);
                InformationBox.Show("Sorry Your Login ID Is Incorrect", "Comida",
                                    InformationBoxButtons.OK, InformationBoxIcon.Error);

                ActiveControl = textBox1;
                textBox1.Focus();
                break;
            }
        }
Exemple #7
0
 private void fetchstudentid()
 {
     try
     {
         string     matricnumber = textBox1.Text.Trim();
         string     url          = "http://localhost/Allocator/cgi-bin/fetch_student_id.php?matric=" + matricnumber + "";
         WebRequest requ         = WebRequest.Create(url);
         requ.Timeout = 40000;
         WebResponse response  = requ.GetResponse();
         Stream      stream    = response.GetResponseStream();
         XmlDocument CompSpecs = new XmlDocument();
         CompSpecs.Load(stream);
         //Load the data from the file into the XmlDocument (CompSpecs) //
         XmlNodeList NodeList = CompSpecs.GetElementsByTagName("response");
         // Create a list of the nodes in the xml file //
         string confirmation = NodeList[0].FirstChild.ChildNodes[0].InnerText.Trim();
         studentid = NodeList[0].ChildNodes[1].InnerText.Trim();
         if (confirmation == "1")
         {
             fetchstudentrecord();
         }
         else
         {
             InformationBox.Show("Sorry You Cannot Fill The Hostel Allocation Form At The Moment. Please Pay Your Student Association Fees.", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
         }
     }
     catch (Exception exec)
     {
         InformationBox.Show(exec.Message, "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Error);
         InformationBox.Show(exec.StackTrace);
     }
 }
Exemple #8
0
        private void fetch_personal_effects()
        {
            try
            {
                string     url  = "http://localhost/Allocator/cgi-bin/fetch_personal_effects.php?occupantid=" + studentid + "&sessionid=" + sessionid + "";
                WebRequest requ = WebRequest.Create(url);
                requ.Timeout = 40000;
                WebResponse response  = requ.GetResponse();
                Stream      stream    = response.GetResponseStream();
                XmlDocument CompSpecs = new XmlDocument();
                CompSpecs.Load(stream);
                //Load the data from the file into the XmlDocument (CompSpecs) //
                XmlNodeList NodeList = CompSpecs.GetElementsByTagName("response");
                // Create a list of the nodes in the xml file //
                string access = NodeList[0].FirstChild.ChildNodes[0].InnerText.Trim();

                if (access == "1")
                {
                    txtpersonaleffect.Text = NodeList[0].ChildNodes[1].InnerText;
                }
            }
            catch (Exception exec)
            {
                InformationBox.Show(exec.Message, "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Error);
                InformationBox.Show(exec.StackTrace);
            }
        }
Exemple #9
0
 private void submitsponsorinfo()
 {
     try
     {
         string     surname    = SponsorSurname.Text.Trim();
         string     othernames = SponsorOthernames.Text;
         string     address    = SponsorAddress.Text;
         string     phone      = SponsorPhone.Text;
         string     email      = SponsorEmail.Text;
         string     occupation = SponsorOccupation.Text;
         string     url        = "http://localhost/Allocator/cgi-bin/insert_kin_info.php?occupantid=" + studentid + "&kintype=" + sponsorid + "&firstname=" + othernames + "&lastname=" + surname + "&address=" + address + "&phone=" + phone + "&email=" + email + "&occupation=" + occupation + "&sessionid=" + sessionid + "";
         WebRequest requ       = WebRequest.Create(url);
         requ.Timeout = 40000;
         WebResponse response  = requ.GetResponse();
         Stream      stream    = response.GetResponseStream();
         XmlDocument CompSpecs = new XmlDocument();
         CompSpecs.Load(stream);
         //Load the data from the file into the XmlDocument (CompSpecs) //
         XmlNodeList NodeList = CompSpecs.GetElementsByTagName("response");
         // Create a list of the nodes in the xml file //
         fetch_personal_effects();
         materialTabControl2.SelectedTab = tabPage5;
     }
     catch (Exception exec)
     {
         InformationBox.Show(exec.Message, "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Error);
         InformationBox.Show(exec.StackTrace);
     }
 }
Exemple #10
0
        private void loadcombo()
        {
            comboBox1.Items.Clear();
            try
            {
                string     url  = "http://localhost/Allocator/cgi-bin/fetch_block_details.php?hostelid=" + hostelid + "";
                WebRequest requ = WebRequest.Create(url);
                requ.Timeout = 40000;
                WebResponse response = requ.GetResponse();
                Stream      stream   = response.GetResponseStream();
                XmlDocument doc      = new XmlDocument();
                doc.Load(stream);
                XmlNodeList nodeList = doc.SelectNodes("response/status");

                foreach (XmlNode node in nodeList)
                {
                    if (!comboBox1.Items.Contains(node.SelectSingleNode("Block").InnerText))
                    {
                        comboBox1.Items.Add(node.SelectSingleNode("Block").InnerText);
                    }
                }
            }
            catch (Exception ce)
            {
                InformationBox.Show(ce.Message);
            }
        }
Exemple #11
0
 private void viewAllocationInformationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     InformationBox.Show("Function Not Currently Available. Please Contact Administrator For Update", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
     //Form9 viewhostelinfo = new Form9();
     //viewhostelinfo.MdiParent = this;
     //viewhostelinfo.Show();
 }
Exemple #12
0
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                string     actname = comboBox1.Text;
                string     url     = "http://localhost/Allocator/cgi-bin/fetch_room_with_condition.php?blockid=" + block_id + "";
                WebRequest requ    = WebRequest.Create(url);
                requ.Timeout = 90000;
                WebResponse responses = requ.GetResponse();
                Stream      stream    = responses.GetResponseStream();
                XDocument   xmlDoc    = XDocument.Load(stream);

                var response = from status in xmlDoc.Descendants("status")
                               where status.Element("Room").Value == comboBox2.SelectedItem.ToString()
                               select new
                {
                    Points = status.Element("ID").Value,
                };

                foreach (var status in response)
                {
                    room_id = status.Points;
                }
            }
            catch (Exception ce)
            {
                InformationBox.Show(ce.Message);
                InformationBox.Show(ce.StackTrace);
            }
        }
Exemple #13
0
 private void submithabitableinformation()
 {
     try
     {
         string     roomnum = comboBox2.Text.Trim();
         string     url     = "http://localhost/Allocator/cgi-bin/update_room_habitable.php?blockid=" + blockid + "&roomnum=" + roomnum + "&habitable=" + habitable + "";
         WebRequest requ    = WebRequest.Create(url);
         requ.Timeout = 40000;
         WebResponse response  = requ.GetResponse();
         Stream      stream    = response.GetResponseStream();
         XmlDocument CompSpecs = new XmlDocument();
         CompSpecs.Load(stream);
         //Load the data from the file into the XmlDocument (CompSpecs) //
         XmlNodeList NodeList = CompSpecs.GetElementsByTagName("response");
         // Create a list of the nodes in the xml file //
         string confirmation = NodeList[0].FirstChild.ChildNodes[0].InnerText.Trim();;
         if (confirmation == "1")
         {
             InformationBox.Show("The Information Has Been Successfully Submitted", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
             metroload();
             loadcombo();
             metroToggle1.CheckState = CheckState.Checked;
         }
         else
         {
             InformationBox.Show("The Information Was Not Submitted Successfully", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
         }
     }
     catch (Exception exec)
     {
         InformationBox.Show(exec.Message, "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Error);
     }
 }
Exemple #14
0
        private void Loadroomcombo()
        {
            comboBox2.Items.Clear();
            try
            {
                string     url  = "http://localhost/Allocator/cgi-bin/fetch_room_with_condition.php?blockid=" + block_id + "";
                WebRequest requ = WebRequest.Create(url);
                requ.Timeout = 90000;
                WebResponse response = requ.GetResponse();
                Stream      stream   = response.GetResponseStream();
                XmlDocument doc      = new XmlDocument();
                doc.Load(stream);
                XmlNodeList nodeList = doc.SelectNodes("response/status");

                foreach (XmlNode node in nodeList)
                {
                    if (!comboBox2.Items.Contains(node.SelectSingleNode("Room").InnerText))
                    {
                        comboBox2.Items.Add(node.SelectSingleNode("Room").InnerText);
                    }
                }
            }
            catch (Exception ce)
            {
                InformationBox.Show(ce.Message);
                InformationBox.Show(ce.StackTrace);
            }
        }
Exemple #15
0
 private void materialRaisedButton1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         InformationBox.Show("Please Enter Matric/JAMB Number To Continue", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
         this.ActiveControl = textBox1;
         textBox1.Focus();
     }
     else
     {
         try
         {
             string     matric = textBox1.Text.Trim();
             string     url    = "http://localhost/get_stud_profile.php?mat=" + matric + "&pwd=" + matric + "";
             WebRequest requ   = WebRequest.Create(url);
             requ.Timeout = 30000;
             WebResponse response  = requ.GetResponse();
             Stream      stream    = response.GetResponseStream();
             XmlDocument CompSpecs = new XmlDocument();
             CompSpecs.Load(stream);
             XmlNodeList NodeList = CompSpecs.GetElementsByTagName("stud_profile"); // Create a list of the nodes in the xml file //
             materialLabel6.Text = "Matric Number: " + NodeList[0].FirstChild.ChildNodes[0].InnerText;
             materialLabel1.Text = "Surname: " + NodeList[0].ChildNodes[1].InnerText;
             materialLabel2.Text = "Othernames: " + NodeList[0].ChildNodes[2].InnerText.Trim() + " " + NodeList[0].ChildNodes[3].InnerText.Trim();
             materialLabel4.Text = "Sex: " + NodeList[0].ChildNodes[4].InnerText;
             materialLabel5.Text = "Level: " + NodeList[0].ChildNodes[8].InnerText;
             level = NodeList[0].ChildNodes[8].InnerText.Trim();
             materialLabel7.Text = "Please Note That An Email Has Been Sent To: " + NodeList[0].ChildNodes[16].InnerText.Trim();
             // pictureBox1.Load(folderPath + NodeList[0].ChildNodes[20].InnerText.Trim());
             materialLabel3.Text = "Programme: " + NodeList[0].ChildNodes[22].InnerText;
             if (pictureBox1.Image == null && NodeList[0].FirstChild.ChildNodes[0].InnerText.Trim() == "")
             {
                 InformationBox.Show("Sorry, The Matric Number Does Not Exist. Please Confirm.", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Error);
                 panel4.Visible = true;
                 panel1.Visible = false;
                 textBox1.Clear();
                 this.ActiveControl = textBox1;
                 textBox1.Focus();
             }
             else
             {
                 if (NodeList[0].ChildNodes[20].InnerText.Trim() == "")
                 {
                     generateroom();
                 }
                 else
                 {
                     pictureBox1.Load(folderPath + NodeList[0].ChildNodes[20].InnerText.Trim());
                     generateroom();
                 }
             }
         }
         catch (Exception exec)
         {
             InformationBox.Show(exec.Message, "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Error);
         }
     }
 }
Exemple #16
0
    void Start()
    {
        anim = GetComponent<Animator>();

        if (anim == null)
            enabled = false;

        instance = this;
    }
Exemple #17
0
 private void exitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (InformationBox.Show("Please Confirm Application Exit", "Project Administrator", InformationBoxButtons.YesNo, InformationBoxIcon.Question).ToString() == "No")
     {
     }
     else
     {
         Application.Exit();
     }
 }
Exemple #18
0
 private void materialFlatButton5_Click(object sender, EventArgs e)
 {
     if (materialCheckBox2.Checked == true && txtpersonaleffect.Text == "")
     {
         InformationBox.Show("Personal Effects Cannot Be Empty", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
     }
     else
     {
         submitpersonaleffects();
     }
 }
Exemple #19
0
 private void materialFlatButton4_Click(object sender, EventArgs e)
 {
     if (materialRadioButton1.Checked == false || materialCheckBox2.Checked == false)
     {
         if (SponsorSurname.Text == "")
         {
             InformationBox.Show("Sponsor Surname Is Missing", "Project Administrator", InformationBoxIcon.Information, InformationBoxButtons.OK);
         }
         else
         if (SponsorOthernames.Text == "")
         {
             InformationBox.Show("Sponsor Othernames Is Missing", "Project Administrator", InformationBoxIcon.Information, InformationBoxButtons.OK);
         }
         else
         if (SponsorAddress.Text == "")
         {
             InformationBox.Show("Sponsor Address Is Missing", "Project Administrator", InformationBoxIcon.Information, InformationBoxButtons.OK);
         }
         else
         if (SponsorAddress.Text == "")
         {
             InformationBox.Show("Sponsor Address Is Missing", "Project Administrator", InformationBoxIcon.Information, InformationBoxButtons.OK);
         }
         else
         if (SponsorPhone.Text == "")
         {
             InformationBox.Show("Sponsor Phone Number Is Missing", "Project Administrator", InformationBoxIcon.Information, InformationBoxButtons.OK);
         }
         else
         if (SponsorEmail.Text == "")
         {
             InformationBox.Show("Sponsor Email Address Is Missing", "Project Administrator", InformationBoxIcon.Information, InformationBoxButtons.OK);
         }
         else
         if (SponsorOccupation.Text == "")
         {
             InformationBox.Show("Sponsor Occupation Is Missing", "Project Administrator", InformationBoxIcon.Information, InformationBoxButtons.OK);
         }
         else
         {
             if (InformationBox.Show("Please Confirm To Continue.", "Project Administrator", InformationBoxButtons.YesNo, InformationBoxIcon.Question).ToString() == "No")
             {
             }
             else
             {
                 submitsponsorinfo();
             }
         }
     }
     else
     {
         submitsponsorinfo();
     }
 }
Exemple #20
0
 private void materialFlatButton2_Click(object sender, EventArgs e)
 {
     if (InformationBox.Show(@"You Are About To Exit The Application. Please Confirm", "Project Administrator",
                             InformationBoxButtons.YesNo, InformationBoxIcon.Question).ToString() == "No")
     {
     }
     else
     {
         Application.Exit();
         Application.ExitThread();
     }
 }
Exemple #21
0
 private void logoutToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (InformationBox.Show("Please Confirm User Logout", "Project Administrator", InformationBoxButtons.YesNo, InformationBoxIcon.Question).ToString() == "No")
     {
     }
     else
     {
         Form1 homepage = new Form1();
         homepage.Show();
         this.Hide();
     }
 }
Exemple #22
0
 private void changeRoomDetailsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Form1.Logininfo.username == "USER")
     {
         InformationBox.Show("Sorry You Do Not Have Sufficient Permission To Perform This Task!!", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
     }
     else
     {
         Form10 changeroom = new Form10();
         changeroom.MdiParent = this;
         changeroom.Show();
     }
 }
Exemple #23
0
 private void materialRaisedButton1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         InformationBox.Show("Please Enter Matric/JAMB Number To Continue", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
         this.ActiveControl = textBox1;
         textBox1.Focus();
     }
     else
     {
         fetchstudentid();
     }
 }
Exemple #24
0
 private void roomClearanceToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Form1.Logininfo.username == "USER")
     {
         InformationBox.Show("Sorry You Do Not Have Sufficient Permission To Perform This Task!!", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Information);
     }
     else
     {
         Form5 Roomclearance = new Form5();
         Roomclearance.MdiParent = this;
         Roomclearance.Show();
     }
 }
 private void SaveButton_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem == null)
     {
         TranslationGrid.Hide();
         InformationBox.Text = "You need to select a list before you save";
         InformationBox.Show();
     }
     else
     {
         Save();
     }
 }
 private void PrintMethod()
 {
     try
     {
         var pd = new PrintDocument();
         pd.PrintPage      += pd_PrintPage;
         pd.PrintController = new StandardPrintController();
         pd.Print();
     }
     catch (Exception excep)
     {
         InformationBox.Show(excep.Message);
     }
 }
Exemple #27
0
        private void fetchstudentrecord()
        {
            string     matric  = textBox1.Text.Trim();
            string     urld    = "http://localhost/get_stud_profile.php?mat=" + matric + "&pwd=" + matric + "";
            WebRequest request = WebRequest.Create(urld);

            request.Timeout = 40000;
            WebResponse responses  = request.GetResponse();
            Stream      streams    = responses.GetResponseStream();
            XmlDocument CompsSpecs = new XmlDocument();

            CompsSpecs.Load(streams);
            XmlNodeList NodeLists = CompsSpecs.GetElementsByTagName("stud_profile"); // Create a list of the nodes in the xml file //

            materialLabel7.Text  = NodeLists[0].FirstChild.ChildNodes[0].InnerText;
            materialLabel1.Text  = "Surname: " + NodeLists[0].ChildNodes[1].InnerText;
            materialLabel2.Text  = "Othernames: " + NodeLists[0].ChildNodes[2].InnerText.Trim() + " " + NodeLists[0].ChildNodes[3].InnerText.Trim();
            materialLabel34.Text = NodeLists[0].ChildNodes[4].InnerText;
            materialLabel35.Text = NodeLists[0].ChildNodes[8].InnerText;
            email1 = NodeLists[0].ChildNodes[16].InnerText.Trim();
            email2 = NodeLists[0].ChildNodes[17].InnerText.Trim();
            materialLabel3.Text = "Programme: " + NodeLists[0].ChildNodes[22].InnerText;
            if (pictureBox1.Image == null && materialLabel7.Text == "")
            {
                InformationBox.Show("Sorry, The Matric Number Does Not Exist. Please Confirm.", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Error);
                panel4.Visible      = true;
                metroPanel1.Visible = false;
                textBox1.Clear();
                this.ActiveControl = textBox1;
                textBox1.Focus();
            }
            else
            {
                InformationBox.Show("By going further, you accept that the information entered is correct and valid. If by any chance the information provided is false, you accept to be called to face the disciplinary panel and punished for impersonation and provision of wrong information.", "Project Administrator", InformationBoxButtons.OK, InformationBoxIcon.Exclamation);
                if (NodeLists[0].ChildNodes[20].InnerText.Trim() == "")
                {
                    fetch_father_info();
                    panel4.Visible      = false;
                    metroPanel1.Visible = true;
                }
                else
                {
                    pictureBox1.Load(folderPath + NodeLists[0].ChildNodes[20].InnerText.Trim());
                    fetch_father_info();
                    panel4.Visible      = false;
                    metroPanel1.Visible = true;
                }
            }
        }
Exemple #28
0
 private void materialFlatButton1_Click(object sender, EventArgs e)
 {
     if (InformationBox.Show("Do You Really Want To Logout?", "Comida Administrator", InformationBoxButtons.YesNo,
                             InformationBoxIcon.Question).ToString() == "No")
     {
         ActiveControl = textBox1;
         textBox1.Focus();
     }
     else
     {
         var firstpage = new Firstpage();
         firstpage.Show();
         Hide();
     }
 }
Exemple #29
0
        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild != null)
            {
                InformationBox.Show("You Cannot Open Two Hostel Allocation Forms", "Project Administrator", InformationBoxButtons.OK);
            }

            else
            {
                Vitalinfo.sessionid = sessionid;
                Form3 hostelallocationform = new Form3();
                hostelallocationform.MdiParent = this;
                hostelallocationform.Show();
            }
        }
 private void DetailButton_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (DetailButton.Text == "显示详情")
     {
         DetailButton.Text = "关闭详情";
         InformationBox.Show();
         this.Height = 306;
     }
     else
     {
         DetailButton.Text = "显示详情";
         InformationBox.Hide();
         this.Height = 164;
     }
 }
Exemple #31
0
 private void materialFlatButton1_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text == "")
     {
         InformationBox.Show("Please Select Cafeteria Name", "Project Administrator", InformationBoxButtons.OK,
                             InformationBoxIcon.Information);
     }
     else
     {
         CafeteriaInfo.CafId   = materialLabel2.Text.Trim();
         CafeteriaInfo.Cafname = comboBox1.Text;
         var login = new Firstpage();
         login.Show();
         Hide();
     }
 }
Exemple #32
0
		private void OnInformationBoxChanged(object sender, InformationBoxChangedEventArgs e)
		{
			if (_currentInformationBox != null)
				_currentInformationBox.Updated -= new EventHandler(OnUpdateInformationBox);

			_currentInformationBox = e.InformationBox;

			_toolTip.Active = false;
			_toolTip.Hide(this);

			if (e.InformationBox != null)
				_currentInformationBox.Updated += new EventHandler(OnUpdateInformationBox);
		}
 void Start()
 {
     infoTxt = GameObject.Find("Item Information").GetComponentInChildren<InformationBox>();
 }