void Start()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
     editUserView = this.GetComponent <EditUserView>();
 }
예제 #2
0
        public EditUsersView(Users data)
        {
            InitializeComponent();
            EditUserController controller = new EditUserController(data, rolesComboBox, nameTextBox, phoneMaskedTextBox);

            Load += controller.EditUsersView_Load;
            applyButton.Click  += controller.applyButton_Click;
            cancelButton.Click += controller.cancelButton_Click;

            applyButton.DialogResult  = DialogResult.OK;
            cancelButton.DialogResult = DialogResult.Cancel;
        }