public void Work() { ISystem1 system1 = new System1(); ISystem2 system2 = new System2(); var facade = new SystemFacade(system1, system2); facade.RunAllTasks(); }
// Use this for initialization void Start() { Mediator mediator = new Mediator(); System1 system1 = new System1(mediator); System2 system2 = new System2(mediator); mediator.Initial(system1, system2); system1.Operation1(); }
/*如果用户登录,那么就展示全部课程*/ private void InitData() { string strCon = "Integrated Security=SSPI;Initial Catalog='NetDesign';Data Source='DESKTOP-HJQH3C9';User ID='sa'; Password = '******'; Connect Timeout = 30"; SqlConnection conn = new SqlConnection(strCon); DataSet ds = new DataSet(); string str = "SELECT s.s_id AS 系部编号, s.s_name AS 系部名称, c.c_name AS 所属院 FROM System s LEFT JOIN College c ON s.c_id = c.c_id"; SqlDataAdapter da = new SqlDataAdapter(str, conn); conn.Open(); da.Fill(ds); conn.Close(); System1.DataSource = ds; System1.DataBind(); }
public void Reset_tableTest() { try { Boolean result = false; System1 post = new System1(); post.Table_Name = "Request"; result = post.Reset_table(); Assert.AreEqual("true", result); } catch (Exception ex) { Console.WriteLine("Somethig wrong " + ex); } }
/// <summary> /// by flipping the states of the various objects active/inactive in the scene, I can simulate the loading of the original assets, but under /// the desired stereoscopic and monoscopic states /// </summary> public void StereoSwitch() { //activate or deactivate mono assets Emulator1.SetActive(!Emulator1.activeSelf); System1.SetActive(!System1.activeSelf); reticleM.SetActive(!reticleM.activeSelf); //activate or deactivate stereo assets Emulator2.SetActive(!Emulator2.activeSelf); System2.SetActive(!System2.activeSelf); reticleL.SetActive(!reticleL.activeSelf); reticleR.SetActive(!reticleR.activeSelf); //Inititate blocker to reset/begin GVR interaction StartCoroutine(Block()); }
public void Initial(System1 system1, System2 system2) { this.system1 = system1; this.system2 = system2; }