static void Main(string[] args) { StartCheck ins = new StartCheck(); Netvim insa = new Netvim("", ""); Console.Read(); }
void ReleaseDesignerOutlets() { if (TutorialText != null) { TutorialText.Dispose(); TutorialText = null; } if (TutorialView != null) { TutorialView.Dispose(); TutorialView = null; } if (StartCheck != null) { StartCheck.Dispose(); StartCheck = null; } if (FinishButton != null) { FinishButton.Dispose(); FinishButton = null; } }
public Launch() { InitializeComponent(); configManager = new ConfigManager(); startCheck = new StartCheck(configManager); startModeSet.IsChecked = startCheck.ifStart(); }
public ActionResult stateChange(string collectMark, int StartID, int startYear) { if (collectMark == "進入健檢收集") { StartCheck data = db.StartCheck.Find(StartID); data.start_state = "健檢收集"; data.start_startDate = DateTime.Now; db.SaveChanges(); } if (collectMark == "進入結案") { StartCheck data = db.StartCheck.Find(StartID); data.start_state = "結案"; data.start_CheckEndDate = DateTime.Now; db.SaveChanges(); } return(RedirectToAction("checkCollectMaster", "healthSystem")); }
private void startCheck() { Task updateTask = new Task(() => { startConfigBean = StartCheck.doCheck(); this.Dispatcher.BeginInvoke(new Action(() => { if (startConfigBean != null) { HelperHandler handler = new HelperHandler("null"); bool show = false; if (startConfigBean.Enable.Equals("0")) { //弹窗暂停使用 handler = new HelperHandler("enable"); show = true; } else if (startConfigBean.Verify.Equals("1")) { //弹窗提示用户输入密码 handler = new HelperHandler("verify"); show = true; } else if (startConfigBean.Version.CompareTo("1.0") > 0) { //弹窗提示更新 handler = new HelperHandler("update"); show = true; } if (show) { HelpWindow helpWindow = new HelpWindow(startConfigBean.Title, startConfigBean.Notice, handler); helpWindow.Show(); } } else { } })); }); updateTask.Start(); }
static void Main(string[] args) { StartCheck start = new StartCheck(); try { switch (args[0]) { case "add_config": start.Addconfig(args); break; case "connect": Console.WriteLine(start.Connect(args)); break; case "connect_with_config": Console.WriteLine(start.Connect_with_config()); break; case "disconnect": Console.WriteLine(start.disconnector()); break; case "manual_connect": Console.WriteLine(start.Manual_connect(args)); break; case "help": Console.WriteLine(start.ask_for_help()); break; default: Console.WriteLine("nothing happend ,please add 'help' for help"); break; } } catch { Console.WriteLine("nothing happend ,please add 'help' for help"); } }
public ActionResult StartCheckMaster(StartCheck data) { if (string.IsNullOrEmpty(data.start_state)) { data.start_state = ""; } healthSystemStartCheckMaster viewData = new healthSystemStartCheckMaster(); //查詢存在的年度,Distinct()可以去除掉查詢出來後重複的值 var query = from o in db.StartCheck select o.start_year; viewData.year = query.Distinct().ToList(); //查詢後給StartCheck var query1 = from o in db.StartCheck where o.start_year == data.start_year && o.start_state.Contains(data.start_state) select o; viewData.startCheck = query1.ToList(); return(View(viewData)); }
public ActionResult newStartCheck(StartCheck data, string noteText) //啟動健檢 { StartCheck newStartCheck = new StartCheck() { start_year = data.start_year, start_principal = data.start_principal, start_state = data.start_state }; db.StartCheck.Add(newStartCheck); db.SaveChanges(); //找出剛剛新增的啟動健檢的ID var query = from o in db.StartCheck orderby o.Start_id descending select o.Start_id; int newid = query.First(); string NewID = newid.ToString(); //補上start_note的值 StartCheck edit = db.StartCheck.Find(newid); edit.start_note = "note" + NewID + ".txt"; db.SaveChanges(); string path = "~/txt/note" + NewID + ".txt"; FileStream fileStream = new FileStream(Server.MapPath(path), FileMode.Create); fileStream.Close(); //切記開了要關,不然會被佔用而無法修改喔!!! using (StreamWriter sw = new StreamWriter(Server.MapPath(path))) { // 欲寫入的文字資料 ~ sw.Write(noteText); } return(RedirectToAction("StartCheckMaster", "healthSystem")); }