Exemple #1
0
        private void LoadConfiguration()
        {
            WindowSettings winConfig = this.GetWindowsSettings();

            {
                var categoryValue = winConfig.GetValueInt(paramComponentType);

                if (categoryValue != -1)
                {
                    var item = cmBComponentType.Items.OfType <ComponentType?>().FirstOrDefault(e => (int)e == categoryValue);
                    if (item.HasValue)
                    {
                        cmBComponentType.SelectedItem = item.Value;
                    }
                }
            }

            {
                var categoryValue = winConfig.GetValueInt(paramComponentLocation);

                if (categoryValue.HasValue && 0 <= categoryValue && categoryValue < cmBComponentLocation.Items.Count)
                {
                    cmBComponentLocation.SelectedIndex = categoryValue.Value;
                }
            }
        }
        private void LoadFormSettings(WindowSettings winConfig)
        {
            {
                var filterResultsValue = winConfig.GetValueInt(paramFilterResults);

                if (filterResultsValue.HasValue && 0 <= filterResultsValue && filterResultsValue < cmBFilterResults.Items.Count)
                {
                    cmBFilterResults.SelectedIndex = filterResultsValue.Value;
                }
            }
        }
Exemple #3
0
        private void LoadFormSettings(WindowSettings winConfig)
        {
            if (winConfig.DictDouble.ContainsKey(paramColumnEntityWidth))
            {
                columnEntity.Width = new GridLength(winConfig.DictDouble[paramColumnEntityWidth]);
            }

            {
                var categoryValue = winConfig.GetValueInt(paramRelationType);

                if (categoryValue.HasValue && 0 <= categoryValue && categoryValue < cmBRelationType.Items.Count)
                {
                    cmBRelationType.SelectedIndex = categoryValue.Value;
                }
            }
        }