/// <summary> /// 页面跳转器 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_Click_2(object sender, RoutedEventArgs e) { var tag = Convert.ToInt32(((Button)sender).Tag); switch (tag) { case 0: HomeControl.Display(); EncoderControl.Display(false); DecoderControl.Display(false); break; case 1: HomeControl.Display(false); EncoderControl.Display(); DecoderControl.Display(false); break; case 2: HomeControl.Display(false); EncoderControl.Display(false); DecoderControl.Display(); break; } }
private void btnHome_Click(object sender, EventArgs e) { HomeControl home = new HomeControl(this); home.Dock = DockStyle.Fill; DisPanel(); this.Container.Panel2.Controls.Add(home); }
private void HomeButton_Click(object sender, EventArgs e) { Button ButtonObject = (Button)sender; AnimateIndicator(ButtonObject); HomeControl.BringToFront(); HomeControl.GenerateCon(); }
public void Setup() { //creating the fake stubs and mocks _fakeHeater = new FakeHeater(); _fakeTempSensor = new FakeTempSensor(); //injecting them into the uut via the constructor _uut = new HomeControl(_fakeHeater, _fakeTempSensor); }
/// <summary> /// ResetWindow() - A Void method that ensures that the MainWindow is ready to populate user specific /// content by emptying the controlPanel section, and the contentPanel section of the window. /// It also sets the Home Control as the initial content. /// </summary> private void ResetWindow() { // Set the ContentPanel's Content to the Control Control homeControl = new HomeControl(); this.contentPanel.Content = homeControl; // Clear the Controls this.controlPanel.Children.Clear(); }
private void Awake() { if (home == null) { home = this; } else { Destroy(this); } }
private void mnHome_Click(object sender, EventArgs e) { MenuSelected((sender as ToolStripMenuItem).Name); if (homeCtr == null) { homeCtr = new HomeControl(); homeCtr.Dock = DockStyle.Fill; pnlMain.Controls.Add(homeCtr); } homeCtr.BringToFront(); }
public MaintenanceMenuControl(HomeControl form) { InitializeComponent(); this.form = form; equimentType = new EquipmentTypeControl(); user = new UsersControl(); brand = new BrandControl(); model = new ModelsControl(); technologies = new TechnologiesConnectionControl(); equipo = new EquimentControl(); employeesControl = new EmployeesControl(); rentReturnsControl = new RentReturnsControl(); }
private void btnHome_Click(object sender, EventArgs e) { cardsPanel1.Controls.Clear(); var kont = new HomeControl(); cardsPanel1.Controls.Add(kont); AddToControlHistory(kont); SetSideMenuPosition((Control)sender); //menu(menu) -> uredi //SwitchActiveControls(firstCustomControl1); //dodajProizvod.Visible = false; }
private void CreateWelcomeTab() { var newTab = new TabPage("Welcome"); var newControl = new HomeControl { Dock = DockStyle.Fill, ParentForm = this, ParentTab = newTab }; newTab.Controls.Add(newControl); tabControl.TabPages.Add(newTab); tabControl.SelectTab(newTab); newControl.OnShow(); }
private void InitUserControls(IntegrationTestsRunner runner) { _home = new HomeControl(runner); formFunctionPointer += new functioncall(RenameDB); editTablePointer += new functioncall2(EditTable); _home.userFunctionPointer = formFunctionPointer; _home.tableEditPointer = editTablePointer; //------------------------------------------------------------ _renameDBControl = new RenameDBControl(runner); renameDbNamePointer += new renamecall(HomePage); _renameDBControl.userSaveControl = renameDbNamePointer; //------------------------------------------------------------ _tableControl = new TableControl(runner); tablePointer += new renamecall(HomePage); _tableControl.tablePointer = tablePointer; //------------------------------------------------------------ _queryControl = new QueryControl(runner); queryPointer += new queryResultcall(ShowResult); _queryControl.queryPointer = queryPointer; //------------------------------------------------------------ _resultControl = new ResultControl(runner); }
private void MainMenu_Load(object sender, EventArgs e) { HomeControl.BringToFront(); //Brings Vendor List Control to Front Button[] MenuButtonArray = new Button[] { HomeButton, SearchButton, OrdersButton, adminButton }; //Everything written Below can be easily edited using the Designer but Coding it in below ensure that if i edit the Menu Bar in the future //It will still function correctly and any new buttons or sizes i add will also work. //Setting MenuIndicator Height & Location MenuIndicatorPanel.Height = HomeButton.Height; MenuIndicatorPanel.Location = new Point(0, HomeButton.Location.Y); int IterationLength = MenuButtonArray.Length; for (int i = 0; i < IterationLength; i++) { //Set Each Buttons Location Manually MenuButtonArray[i].Location = new Point(MenuIndicatorPanel.Location.X + MenuIndicatorPanel.Width, MenuButtonArray[i].Location.Y); MenuButtonNames[i] = MenuButtonArray[i].Text; } //Set Width Of Bar Panel SideMenuPanel.Width = MenuIndicatorPanel.Width + HomeButton.Width + 1; }
private void SpringField_Click(object sender, EventArgs e) { SidePanel.Top = SpringField.Top; HomeControl.BringToFront(); }
private void homeController_OnPersonLeft(object sender, HomeControl.PersonPresenceChangedEventArgs e) { Notify(this.OnPersonLeft, e); }
private void Form1_Load(object sender, EventArgs e) { //当前设备编码 RobotInfo.DeviceCode = ConfigurationManager.AppSettings["devicecode"]; this.Text = this.Text + RobotInfo.DeviceCode;//当前编码 SystemInfo.ClientInfoList = new List <ClientInfo>(); SystemInfo.clientRequestCQ = new ConcurrentQueue <ClientRquestInfo>(); List <ClientIpInfoModel> list = new List <ClientIpInfoModel>(); DataTable dt = new ClientInfoDal().GetDS(); if (dt != null && dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { ClientIpInfoModel model = new ClientIpInfoModel(); model.Id = Convert.ToInt32(dt.Rows[i]["id"].ToString()); model.Code = dt.Rows[i]["code"].ToString(); model.Name = dt.Rows[i]["name"].ToString(); model.IP = dt.Rows[i]["ip"].ToString(); model.Port = dt.Rows[i]["port"].ToString(); model.Timeouts = Convert.ToInt32(dt.Rows[i]["timeouts"].ToString()); model.Status = Convert.ToInt32(dt.Rows[i]["status"].ToString()); list.Add(model); ClientInfo info = new ClientInfo(); info.Code = dt.Rows[i]["code"].ToString(); info.Name = dt.Rows[i]["name"].ToString(); info.Ip = dt.Rows[i]["ip"].ToString(); SystemInfo.ClientInfoList.Add(info); } } AppInfo.ClientInfoList = list; LoadFctPos(); LoadIOPos(); SystemInfo.FctPosList = fctPosList; SystemInfo.IoInfoList = ioInfoList; try { button1_Click(null, null); } catch (Exception ex) { LogHelper.Log("服务端启动失败" + ex.Message); MessageBox.Show("服务端启动失败" + ex.Message); return; } u1 = new UcFlow(); tabPage5.Controls.Add(u1); ioCard = RobotApp.IoCard; homeControl = new HomeControl(); homeControl.Dock = DockStyle.Fill; panel2.Controls.Add(homeControl); TaskContinue.Start(delegate { if (!RobotApp.BRun) { return(false); } bool b = true; if (bRefresh) { b = ioCard.RefreshDI(); } return(b); }, 100, "IoCard"); u1.ConsoleMsgEvent += u1_ConsoleMsgEvent; u1.SendMessageEvent += u1_SendMessageEvent; u1.RobotStatusEvent += u1_RobotStatusEvent; homeControl.SendMessageEvent += u1_SendMessageEvent; Task.Factory.StartNew(() => { WriteLog(); }); //日志处理 }
private void Notify(EventHandler<Contracts.PersonPresenceChangedEventArgs> handler, HomeControl.PersonPresenceChangedEventArgs e) { var tmp = handler; var eventArgs = new Contracts.PersonPresenceChangedEventArgs(e); if (tmp != null) tmp(this, eventArgs); var personState = this.State.FirstOrDefault(ps => ps.name == e.Name); if (personState != null) { Parallel.ForEach(reporters, reporter => { try { log.DebugFormat("Reporting person state for {0} with {1}", personState.name, reporter); reporter.ReportPersonState(personState); } catch (Exception ex) { log.Error(string.Format("Error reporting presence for {0} with reporter {1}", personState.name, reporter.ToString()), ex); } }); } }
public PersonPresenceChangedEventArgs(HomeControl.PersonPresenceChangedEventArgs e) { this.ChangeTimeUtc = e.ChangeTimeUtc; this.Name = e.Name; }
public HomeConnector(string tag, MainConnector parent, HomeControl control) : base(parent, control) { this.Tag = tag; }
public Form1() { InitializeComponent(); SidePanel.Top = SpringField.Top; HomeControl.BringToFront(); }