protected void OnButtonEditPatternsClicked(object sender, EventArgs e)
        {
            PatternDialog.ShowForm(DataModel, SelectedPattern);
            Pattern selectedPattern = SelectedPattern;

            LoadPatterns(selectedPattern);
        }
Exemplo n.º 2
0
        public static void ShowForm(ApplicationDataModel dataModel, Pattern selectPattern = null)
        {
            PatternDialog dialog = new PatternDialog ();
            dialog.patternEditorWidget.PreselectedPattern = selectPattern;
            dialog.patternEditorWidget.DataModel = dataModel;

            dialog.Run ();

            //Required to unbind events
            dialog.patternEditorWidget.DataModel = null;
            dialog.Destroy();

            dataModel.OnPatternsUpdated();
        }