public SPCreator(MainWindowControl mainWindowControl) { this.main = mainWindowControl; InitializeComponent(); this.ConnectionString = this.main.TB_Setup_ConnStr.Text; if (String.IsNullOrWhiteSpace(this.ConnectionString)) { MessageBox.Show("접속정보가 설정되지 않았습니다.\r\n먼저 Setup창에 접속 정보를 입력해 주세요."); this.Close(); } else { CB_TYPE.SelectedIndex = 0; string query = "select [name] from sys.procedures order by [name] asc"; using (var conn = new SqlConnection(this.ConnectionString)) using (var cmd = new SqlCommand(query, conn)) { conn.Open(); DataTable dt = cmd.ExecuteTable(); LB_SP.Items.Clear(); if (dt != null && dt.Rows != null && dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { LB_SP.Items.Add(Convert.ToString(row[0])); } } conn.Close(); } } }
private void InitMenu() { if (menus == null) { menus = new List <StepMenuControl>(); } if (logic.AnglePos == null) { logic.AnglePos = new UnsMachineLogic.AnglePosition(); } if (mainControl == null) { if (logic.Main == null) { logic.Main = new UnsMachineLogic.MachineLogicMainInfo(); } mainControl = new MainWindowControl(logic, "初始界面操作", ModelType.Explode); menus.Add(mainControl); } if (infomationControl == null) { if (logic.Infomation == null) { logic.Infomation = new UnsMachineLogic.MachineLogicInfomation(); } infomationControl = new InfomationWindowControl(logic, "参数信息操作", ModelType.Explode); menus.Add(infomationControl); } if (processControl == null) { if (logic.Process == null) { logic.Process = new UnsMachineLogic.MachineLogicProcess(); } processControl = new ProcessWindowControl(logic, "加工动画操作", ModelType.Process); menus.Add(processControl); } if (matchControl == null) { if (logic.Match == null) { logic.Match = new UnsMachineLogic.MachineLogicMatch(); } matchControl = new MatchWindowControl(logic, "选配操作", ModelType.Match); menus.Add(matchControl); } }
public EntityCreator(MainWindowControl mainWindowControl) { this.main = mainWindowControl; InitializeComponent(); this.ConnectionString = this.main.TB_Setup_ConnStr.Text; if (String.IsNullOrWhiteSpace(this.ConnectionString)) { MessageBox.Show("접속정보가 설정되지 않았습니다.\r\n먼저 Setup창에 접속 정보를 입력해 주세요."); this.Close(); } else { CB_Type.SelectedIndex = 0; } }
public DbConnTool(MainWindowControl _main) { InitializeComponent(); this.main = _main; CB_DBTYPE.SelectedIndex = 0; }
public MainWindowViewModel(MainWindowControl mainWindow) { _mainWindow = mainWindow; _loginState = false; }
public NotificationTimer(MainWindowControl main) { this.main = main; notifyTimer.Elapsed += new ElapsedEventHandler(Timer_notify); }