private void pictureBox_controlData_Click(object sender, EventArgs e) { if (nowEditItem == null) { MessageBox.Show("can not find edit Parameter Data", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } IRunTimeStaticData editRunTimeStaticData = (IRunTimeStaticData)nowEditItem.Tag; if (sender == pb_edit) { if (!editRunTimeStaticData.DataSet(tb_valueAdd.Text)) { MessageBox.Show(string.Format("{0} is illegal for this RunTimeStaticData", tb_valueAdd.Text), "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } else if (sender == pb_next) { editRunTimeStaticData.DataMoveNext(); } else if (sender == pb_reset) { editRunTimeStaticData.DataReset(); } else { MessageBox.Show("can not find edit data", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop); } FreeHttpWindow.MarkRuleItem(nowEditItem); nowEditItem.SubItems[2].Text = tb_valueAdd.Text = editRunTimeStaticData.DataCurrent(); }
public GetRemoteRuleWindow(FreeHttpWindow freeHttpWindow) { InitializeComponent(); mainWindow = freeHttpWindow; lv_remote_requestRuleList.SmallImageList = mainWindow.imageList_forTab; lv_remote_responseRuleList.SmallImageList = mainWindow.imageList_forTab; }
private void pb_confirm_Click(object sender, EventArgs e) { if (tb_key.Text == "" || tb_value.Text == "") { MessageBox.Show("the key or the value is empty ,please set it", "stop", MessageBoxButtons.OK, MessageBoxIcon.Information); FreeHttpWindow.MarkWarnControl(tb_key); FreeHttpWindow.MarkWarnControl(tb_value); return; } if (actuatorStaticDataCollection.IsHaveSameKey(tb_key.Text)) { //DialogResult tempDs; if (MessageBox.Show(string.Format("find the same data name in your data list ,do you want delete that repetitive data [{0}] fist", tb_key.Text), "Same Name", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Cancel) { return; } actuatorStaticDataCollection.RemoveStaticData(tb_key.Text, false); } string errMes = null; if (!RunTimeStaticDataHelper.AddStaticDataToCollection(actuatorStaticDataCollection, (CaseStaticDataType)comboBox_CaseStaticDataType.SelectedItem, tb_key.Text, tb_value.Text, out errMes)) { MessageBox.Show(string.Format("add static data fail \r\n{0}", string.IsNullOrEmpty(errMes)?"unknow error":errMes), "stop", MessageBoxButtons.OK, MessageBoxIcon.Information); FreeHttpWindow.MarkWarnControl(tb_value); return; } if (ShowInfoChange != null) { ShowInfoChange((FreeHttp.FreeHttpControl.StaticDataManageWindow.ShowRunTimeParameterType)(comboBox_CaseStaticDataClass.SelectedIndex)); } this.Close(); }
public GetRemoteRuleWindow(FreeHttpWindow freeHttpWindow, ShowRuleCollectionType expectType = ShowRuleCollectionType.RemoteRule) { InitializeComponent(); nowShowType = expectType; mainWindow = freeHttpWindow; lv_remote_requestRuleList.SmallImageList = mainWindow.imageList_forTab; lv_remote_responseRuleList.SmallImageList = mainWindow.imageList_forTab; loadWindowService = new LoadWindowService(); }
public UserFeedbackWindow(FreeHttpWindow freeHttpWindow) { InitializeComponent(); mainWindow = freeHttpWindow; }