// Use this for initialization void Start () { memoryObj = GameObject.Find ("MemoryObject"); if (memoryObj != null) { memorize = memoryObj.GetComponent<Memorize> (); stagename = memorize.fGetStageName (); } }
void OnReceiveMemorize(object sender, Memorize e) { if (e.SPrevNext != null) { if (e.SPrevNext.Equals("Clear") == false) { SetStorage(e.Code, Temp.ToString().Split(';')); } Temp = new StringBuilder(1024); return; } Temp.Append(string.Concat(e.Date, ",", e.Price, ",", e.Volume)).Append(';'); }
private void OnReceiveMemorize(object sender, Memorize e) { if (e.SPrevNext != null) { new Task(() => Save(e.Code, GetDistinctDate(CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(DateTime.Now, CalendarWeekRule.FirstDay, DayOfWeek.Sunday) - CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(DateTime.Now.AddDays(1 - DateTime.Now.Day), CalendarWeekRule.FirstDay, DayOfWeek.Sunday) + 1))).Start(); return; } if (memo.Count > 0) { memo.Insert(0, string.Concat(e.Date, ",", e.Price, ",", e.Volume)); return; } memo.Add(string.Concat(e.Date, ",", e.Price, ",", e.Volume)); }
//public GameObject retryConfirmBtn; //public GameObject cancelBtn; // Use this for initialization void Start() { print ("StartBtn.Start() called"); gameObject.SetActive (true); playerObj = GameObject.Find("Boxs2nd2"); playercontroll = playerObj.GetComponent<PlayerControll>(); //retryBtn = GameObject.Find ("ButtonRetry"); confirmPanel.SetActive (false); retryBtn.SetActive (false); startCube = GameObject.Find ("StartCube"); startcubeanim = startCube.GetComponent<startCubeAnim> (); memoryObj = GameObject.Find ("MemoryObject"); memorize = memoryObj.GetComponent<Memorize> (); memorize.fMemoryStageName (); }
private void OnReceiveMemorize(object sender, Memorize e) { if (memo.Count > 0 && e.SPrevNext == null) { memo.Insert(0, string.Concat(e.Date, ",", e.Price, ",", e.Volume)); return; } if (memo.Count == 0 && e.SPrevNext == null) { memo.Add(string.Concat(e.Date, ",", e.Price, ",", e.Volume)); return; } if (e.SPrevNext.Equals("0")) { act.BeginInvoke(act.EndInvoke, null); } }
private void OnReceiveMemorize(object sender, Memorize e) { new Task(() => { if (e.Date.Equals(Date)) { Count--; } else { Count = 99; Date = e.Date; } string date = string.Concat(e.Date, Count.ToString("D2")), table = e.Code.Contains("101") ? "Futures" : "Options"; var command = sql.CreateCommand(); command.CommandText = string.Concat("BEGIN IF NOT EXISTS ( SELECT Date FROM dbo.", table, " WHERE Date= ", date, " ) BEGIN INSERT INTO dbo.", table, " VALUES ( '", e.Code, "', ", date, ", ", e.Price, ", ", e.Volume, ") END END"); command.CommandTimeout = 0; command.CommandType = CommandType.Text; command.ExecuteNonQuery(); }).Start(); }
//Initialize the guest container to create a pool of connected guest public ChatController() { container = Memorize.GetInstance(); }
private void GoToScreen(Constants.Screen screen) { UserControl newControl = null; switch (screen) { case Constants.Screen.StartScreen: newControl = new ParticipantNumberControl(this); this.tsbOptions.Enabled = true; break; case Constants.Screen.ReadyScreen: this.tsbOptions.Enabled = false; ParticipantNumberControl c = currentControl as ParticipantNumberControl; participantNumber = c.ParticipantNumber; ReadyScreenControl temp = new ReadyScreenControl(this); temp.ParticipantNumber = participantNumber; newControl = temp; break; case Constants.Screen.Proficiency: this.tsbOptions.Enabled = false; Session.Instance.start(participantNumber); ProficiencyControl pc = new ProficiencyControl(this); newControl = pc; break; case Constants.Screen.Instructions: this.tsbOptions.Enabled = false; newControl = new Instructions(this); break; case Constants.Screen.Memorize: this.tsbOptions.Enabled = false; newControl = new Memorize(this); break; case Constants.Screen.ForcedPractice: this.tsbOptions.Enabled = false; newControl = new ForcedPractice(this); break; case Constants.Screen.Verify: this.tsbOptions.Enabled = false; newControl = new Verify(this); break; case Constants.Screen.Entry: this.tsbOptions.Enabled = false; newControl = new Entry(this); break; case Constants.Screen.Recall: this.tsbOptions.Enabled = false; newControl = new Recall(this); break; case Constants.Screen.ThankYou: this.tsbOptions.Enabled = false; newControl = new Thankyou(this); break; case Constants.Screen.Settings: this.tsbOptions.Enabled = false; newControl = new Settings(this); break; default: this.tsbOptions.Enabled = false; newControl = null; break; } if (newControl != null) { BaseControl bc = currentControl as BaseControl; if (bc != null) { bc.ExitControl(); } newControl.Dock = DockStyle.Fill; if (mainPanel.Controls.Count != 0) { mainPanel.Controls.Clear(); } mainPanel.Controls.Add(newControl); _currentScreen = screen; currentControl = newControl; } else { MessageBox.Show("Attempt to add null control to main panel.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public ChatHub() { container = Memorize.GetInstance(); }
internal void OnReceiveText(object sender, Memorize e) { string.Concat(rb, Count++).FindByName<RadioButton>(this).Text = e.SPrevNext; }
IEnumerator Start() { yield return new WaitForSeconds (1); memoryObj = GameObject.Find ("MemoryObject"); if (memoryObj != null) { print (memoryObj); memorize = memoryObj.GetComponent<Memorize> (); stageName = memorize.fGetStageName (); print(memorize.fGetStageName ()); } print (stageName); saveName = pathT + "/" + stageName; /* if (saveType == 3) { int ln = saveName.Length; GameObject.Find ("saveFolderText").GetComponent<Text> ().text = ""; } */ }
IEnumerator Start() { yield return new WaitForSeconds (1); memoryObj = GameObject.Find ("MemoryObject"); if (memoryObj != null) { print (memoryObj); memorize = memoryObj.GetComponent<Memorize> (); stageName = memorize.fGetStageName (); print(memorize.fGetStageName ()); } print (stageName); saveName = pathT + "/" + stageName; if (saveType == 3) { int ln = saveName.Length; GameObject.Find ("saveFolderText").GetComponent<Text> ().text = "all system green "; } createstagecontroll = GameObject.Find ("Main").GetComponent<CreateStageControll> (); sendmail = GameObject.Find ("Main").GetComponent<SendMail> (); }