コード例 #1
0
ファイル: WatchInputDialog.cs プロジェクト: cyecp/moonsharp
		public static string GetNewWatchName()
		{
			WatchInputDialog dlg = new WatchInputDialog();
			var res = dlg.ShowDialog();

			if (res == DialogResult.OK)
				return dlg.txtWatch.Text;

			return null;
		}
コード例 #2
0
        public static string GetNewWatchName()
        {
            WatchInputDialog dlg = new WatchInputDialog();
            var res = dlg.ShowDialog();

            if (res == DialogResult.OK)
            {
                return(dlg.txtWatch.Text);
            }

            return(null);
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: liyonghelpme/moonsharp
        private void btnAddWatch_Click(object sender, EventArgs e)
        {
            string text = WatchInputDialog.GetNewWatchName();

            if (!string.IsNullOrEmpty(text))
            {
                string[] codeToAdd = text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

                m_Watches.AddRange(codeToAdd.Select(code => m_Script.CreateDynamicExpression(code)));
                DebugAction(new DebuggerAction()
                {
                    Action = DebuggerAction.ActionType.Refresh
                });
            }
        }