Ejemplo n.º 1
0
        public MainForm(MasterController c)
        {
            InitializeComponent();

            _masterController = c;
            c._picMinePlan    = picMinePlan;
        }
Ejemplo n.º 2
0
        public MemberAddEditForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            LoadMembersList();
            LoadTagsList();

            if (cboTags.Items.Count > 0)
            {
                cboTags.SelectedItem = cboTags.Items.IndexOf(0);
            }
            else
            {
                DialogResult result = MessageBox.Show("There are no free End Device tags. \nCreate a new tag ID from the Tag menu?", "No tags", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);

                if (result == DialogResult.Yes)
                {
                    _controller.OpenCreateTag();
                    Close();
                }
            }

            rbNew.Checked = true;
        }
Ejemplo n.º 3
0
        public MineSiteEditForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            LoadAllInfo();
        }
Ejemplo n.º 4
0
        public SensorAddEditForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            LoadAllSensors();
        }
Ejemplo n.º 5
0
        public UserAddForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            allUsernames = _controller.GetAllUsernames();
        }
Ejemplo n.º 6
0
        public TagAddEditForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            LoadAllTags();
        }
Ejemplo n.º 7
0
        public RouterAddEditForm(MasterController mc)
        {
            InitializeComponent();

            _controller = mc;

            LoadRouterIDs();

            btnEnter.Click += NewRouter;
        }
Ejemplo n.º 8
0
        public UserEditForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            lblUsername.Text = User.GetInstance().username + " - " + (User.GetInstance().isAdmin ? "Administrator" : "Regular User");
            txtFName.Text    = User.GetInstance().fName;
            txtLName.Text    = User.GetInstance().lName;
        }
Ejemplo n.º 9
0
        public RouterAddEditForm(MasterController mc, Router r) : this(mc)
        {
            router = r;

            // Set to update mode with the router selected
            rbUpdate.Checked         = true;
            lstRouters.SelectedIndex = lstRouters.Items.IndexOf(r);

            btnEnter.Click -= NewRouter;
            btnEnter.Click += UpdateRouter;
        }
Ejemplo n.º 10
0
        public LoginForm()
        {
            InitializeComponent();
            _controller = new MasterController(this);

            if (Properties.Settings.Default.ShouldRemember)
            {
                chkRemember.CheckState = CheckState.Checked;
                txtUsername.Text       = Properties.Settings.Default.Username;

                cboMineSites.SelectedIndex = cboMineSites.Items.IndexOf(Properties.Settings.Default.MineSite);
            }
        }
Ejemplo n.º 11
0
        public ShiftAddEditForm(MasterController c, Member m)
        {
            InitializeComponent();

            _controller = c;
            member      = m;

            Text = "Shift for " + (member.lName + ", " + member.fName);

            if (member.assignedShifts.Count == 3)
            {
                dtpStart1.Value = member.assignedShifts[0].startTime;
                dtpEnd1.Value   = member.assignedShifts[0].endTime;

                dtpStart2.Value = member.assignedShifts[1].startTime;
                dtpEnd2.Value   = member.assignedShifts[1].endTime;

                dtpStart3.Value = member.assignedShifts[2].startTime;
                dtpEnd3.Value   = member.assignedShifts[2].endTime;
            }
        }
Ejemplo n.º 12
0
 public void SetController(MasterController c)
 {
     _controller = c;
 }