Inheritance: MonoBehaviour
Esempio n. 1
0
    //creates an item in the list
    private void createEntryForSession(UdpKit.UdpSession session)
    {
        GameObject obj = Instantiate <GameObject>(listEntryPrefab);

        listEntries.Add(obj);
        obj.transform.SetParent(scrollPanel, false);
        EntryPanel entry = obj.GetComponent <EntryPanel>();

        entry.session       = session;
        entry.passwordPanel = passwordPanel;
    }
Esempio n. 2
0
 /// <summary>
 /// Performs the add, save and delete actions for the current data based
 /// on the data entry type.
 /// </summary>
 ///
 /// <remarks>
 /// If the current action is successful, a DialogResult of OK is returned
 /// from the ShowDialog method.  If not, the Cancel value is returned.
 /// </remarks>
 ///
 private void DoCurrentAction()
 {
     if (DataEntryType == EntryType.Delete)
     {
         if (MessageBox.Show(this,
                             "Are you sure you want to delete this information?",
                             "Confirmation",
                             MessageBoxButtons.YesNo,
                             MessageBoxIcon.Question,
                             MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             if (EntryPanel.DeleteData())
             {
                 DialogResult = DialogResult.OK;
                 Close();
             }
             else
             {
                 ShowError(EntryPanel.ActionError);
             }
         }
         else
         {
             DialogResult = DialogResult.Cancel;
             Close();
         }
     }
     else if (EntryPanel.VerifyInput())
     {
         if (EntryPanel.SaveData())
         {
             DialogResult = DialogResult.OK;
             Close();
         }
         else
         {
             ShowError(EntryPanel.ActionError);
         }
     }
     else
     {
         ShowError(EntryPanel.EntryError);
     }
 }
Esempio n. 3
0
 public GitPanel(EntryPanel entryPanel)
 {
     this.entryPanel = entryPanel;
 }