using IntelligentControlForsx.ChildForms; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using IntelligentControlForsx.MyControls; using IntelligentControlForsx.Service; using IntelligentControlForsx.Start; using IntelligentControlForsx.Template; namespace IntelligentControlForsx { public partial class MainWindow : Form { private int childFormNumber = 0; private NavService navSvc; public MainWindow() { InitializeComponent(); navSvc = NavService.Instance; this.title1.MyClick += Title1_MyClick; this.bottom1.MyClick += Bottom1_MyClick; ShowNewForm(this, new EventArgs()); NavService.title = this.title1; NavService.projectBottom2 = this.bottom1; } private void Title1_MyClick(object sender, EventArgs e) { navSvc.Nav(sender.ToString(), this); } public string SelectStationId { get; set; } private void Bottom1_MyClick(object sender, EventArgs e) { string stId = sender.ToString(); if (stId.EndsWith("_FDC") || stId.Equals("0") || stId.Equals("-1")) { SelectStationId = stId; navSvc.StationSelectedChanged(stId); } } private void ShowNewForm(object sender, EventArgs e) { navSvc.Nav("pictureBoxHome", this); } } }