public Record(string name, int val, EOptions opt) { Name = name; Value = val; Option = opt; FValue = val * 6.28f; Checked = (val % 2) == 1; }
public void ShowOptions(EOptions options, string notice) { }
public void ShowOptions(EOptions options, string notice) { SetNoticeText(notice); if (_ucList == null) { _ucList = new Dictionary<EOptions, IOptions>(); } IOptions control; if (_ucList.ContainsKey(options)) { control = _ucList[options]; } else { switch (options) { case EOptions.Default: control = new BaseInfo(this, _DataModel); _ucList[options] = control; break; case EOptions.Opinions: control = new Opinions(this); _ucList[options] = control; break; case EOptions.RateInfo: control = new RateInfo(this); _ucList[options] = control; break; case EOptions.AppendQuestion: control = new Question(this); _ucList[options] = control; _ucList[EOptions.UpdateQuestion] = control; break; case EOptions.UpdateQuestion: control = new Question(this); _ucList[options] = control; _ucList[EOptions.AppendQuestion] = control; break; case EOptions.AppendResponse: control = new Response(this); _ucList[options] = control; _ucList[EOptions.UpdateResponse] = control; break; case EOptions.UpdateResponse: control = new Response(this); _ucList[options] = control; _ucList[EOptions.AppendResponse] = control; break; case EOptions.UpdateCategory: control = new Category(this, _DataModel); _ucList[options] = control; break; default: return; } control.Init(); } _Options = options; ShowControl(control); MSentence question = _Session.Question.Count > 0 ? _Session.Question[_Session.QIndex] : null; MSentence response = _Session.Response.Count > 0 ? _Session.Response[_Session.RIndex] : null; control.ReInit(question, response); if (options == EOptions.Default) { TbText.Text = ""; return; } if (options == EOptions.UpdateQuestion) { TbText.Text = question != null ? question.P3100105 : ""; return; } if (options == EOptions.UpdateResponse) { TbText.Text = response != null ? response.P3100105 : ""; return; } }