public FLWebNavigatorStateCollectionEditorDialog(FLWebNavigatorStateCollection collection)
        {
            InitializeComponent();

            Collection = new FLWebNavigatorStateCollection(collection.Owner, collection.ItemType);
            foreach (FLWebNavigatorStateItem stateItem in collection)
            {
                if (stateItem.StateText == "Approve"
                    || stateItem.StateText == "Continue"
                    || stateItem.StateText == "Inquery"
                    || stateItem.StateText == "Notify"
                    || stateItem.StateText == "Return"
                    || stateItem.StateText == "Submit"
                    || stateItem.StateText == "None"
                    || stateItem.StateText == "Plus"
                    || stateItem.StateText == "Lock"
                    || stateItem.StateText == "FSubmit"
                    || stateItem.StateText == "RSubmit")
                {
                    foreach (FLWebNavigatorStateItem item in Collection)
                    {
                        if (item.StateText == stateItem.StateText)
                        {
                            item.Collection = Collection;
                            //foreach (string ctrlName in stateItem.VisibleControls)
                            //{
                            //    item.VisibleControls.Add(ctrlName);
                            //}
                            item.VisibleControls = stateItem.VisibleControls;
                            item.Name = stateItem.Name;
                            item.Description = stateItem.Description;
                            break;
                        }
                    }
                }
                else
                {
                    FLWebNavigatorStateItem item = new FLWebNavigatorStateItem();
                    Collection.Add(item);

                    item.Collection = Collection;
                    //foreach (string ctrlName in stateItem.VisibleControls)
                    //{
                    //    item.VisibleControls.Add(ctrlName);
                    //}
                    item.VisibleControls = stateItem.VisibleControls;
                    item.Name = stateItem.Name;
                    item.StateText = stateItem.StateText;
                    item.Description = stateItem.Description;
                }
            }
        }
Exemple #2
0
 public FLWebNavigator()
 {
     _flStates = new FLWebNavigatorStateCollection(this, typeof(FLWebNavigatorStateItem));
 }