Example #1
0
        public MainForm(MasterController c)
        {
            InitializeComponent();

            _masterController = c;
            c._picMinePlan    = picMinePlan;
        }
Example #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;
        }
Example #3
0
        public MineSiteEditForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            LoadAllInfo();
        }
Example #4
0
        public SensorAddEditForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            LoadAllSensors();
        }
Example #5
0
        public UserAddForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            allUsernames = _controller.GetAllUsernames();
        }
Example #6
0
        public TagAddEditForm(MasterController c)
        {
            InitializeComponent();

            _controller = c;

            LoadAllTags();
        }
Example #7
0
        public RouterAddEditForm(MasterController mc)
        {
            InitializeComponent();

            _controller = mc;

            LoadRouterIDs();

            btnEnter.Click += NewRouter;
        }
Example #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;
        }
Example #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;
        }
Example #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);
            }
        }
Example #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;
            }
        }
Example #12
0
 public void SetController(MasterController c)
 {
     _controller = c;
 }