Пример #1
0
        private NSerializationFilter GetSeriazliationFilter()
        {
            PersistencyFormat format = (PersistencyFormat)SerializationFormatComboBox.SelectedIndex;

            if (format.Equals(PersistencyFormat.Binary) || format.Equals(PersistencyFormat.XML) || format.Equals(PersistencyFormat.SOAP))
            {
                return(null);
            }

            NSerializationFilter filter = null;

            switch (SerializationContentComboBox.SelectedIndex)
            {
            case 0:                     // All
                filter = null;
                break;

            case 1:                     // Data
                filter = new NDataSerializationFilter();
                break;

            case 2:                     // Appearance
                filter = new NAppearanceSerializationFilter();
                break;
            }

            return(filter);
        }
Пример #2
0
        private void SerializationFormatComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            PersistencyFormat format = (PersistencyFormat)SerializationFormatComboBox.SelectedIndex;

            if (format.Equals(PersistencyFormat.Binary) || format.Equals(PersistencyFormat.XML) || format.Equals(PersistencyFormat.SOAP))
            {
                SerializationContentComboBox.Enabled = false;
            }
            else
            {
                SerializationContentComboBox.Enabled = true;
            }
        }