private void BindFirstView() { FirstView.GridLines = true; FirstView.View = View.Details; FirstView.Clear(); FirstView.Columns.Add("终结符", 60); FirstView.Columns.Add("First集", 200); int c = Analysis.FirstSets.Count, i = 0; ListViewItem[] p = new ListViewItem[c]; foreach (char ch in Analysis.FirstSets.Keys) { string[] a = new string[2]; a[0] = ch.ToString(); //a[1] = Analysis.FirstSets[ch].Count.ToString(); HashSet <char> set = Analysis.FirstSets[ch]; foreach (char cr in set) { a[1] += cr.ToString() + ","; } a[1] = a[1].Substring(0, a[1].Length - 1); p[i] = new ListViewItem(a); ++i; } FirstView.Items.AddRange(p); }
/// <summary> /// button click events for create views /// check whether controller and model are created or not /// if not display error message /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_views_Click(object sender, EventArgs e) { if (theController == null) { MessageBox.Show("Please Make the Controller First by clicking on 'Create Controller'. "); } else { if (theModel == null) { MessageBox.Show("Please Make the Model by clicking on 'Create Model' button"); } else { isViewCreated = true; view2 = new SecondView(); view1 = new FirstView(); view3 = new ThirdView(); view2.MyModel = theModel; view1.MyModel = theModel; view3.MyModel = theModel; theController.addView(view2); theController.addView(view1); theController.addView(view3); } } }
private void Init() { ProductionView.Clear(); FirstView.Clear(); VnBox.Text = ""; VtBox.Text = ""; ItemSetView.Clear(); TableView.Clear(); InBox.Text = ""; ProcessView.Clear(); }
void ReleaseDesignerOutlets() { if (SecondView != null) { SecondView.Dispose(); SecondView = null; } if (FirstView != null) { FirstView.Dispose(); FirstView = null; } }
public override void Show(Cirrious.MvvmCross.Touch.Views.IMvxTouchView view) { if (view is FirstView) { _firstView = view as FirstView; } if (view is GrandChildView) { if (_firstView != null) { _firstView.ShowGrandChild(view); } return; } base.Show(view); }
/// <summary> /// intialize controller, model, views and display views /// </summary> private void CompleteSetUp() { theController = new PersonControllers(); theModel = new PersonModels(theController); view2 = new SecondView(); view1 = new FirstView(); view3 = new ThirdView(); view2.MyModel = theModel; view1.MyModel = theModel; view3.MyModel = theModel; theController.addView(view2); theController.addView(view1); theController.addView(view3); view2.Show(); view1.Show(); view3.Show(); isViewCreated = true; }
public void SwitchView(string viewName) { switch (viewName) { case "FirstView": ContentControlView = new FirstView(); ContentControlView.DataContext = new FirstViewModel() { Text = "This is the first View" }; break; default: ContentControlView = new SecondView(); ContentControlView.DataContext = new SecondViewModel() { Text = "This is the second View" }; break; } }
public NavigationModel(ContentWindow contentWindow, Storage storage) { _contentWindow = contentWindow; _firstView = new FirstView(storage); _mainView = new MainView(storage); }