mirror of
https://github.com/aluxnimm/outlookcaldavsynchronizer.git
synced 2025-10-06 00:12:52 +02:00
Add Aruba Profile and areSyncSettingsVisibleInAdvancedSettings flag.
This commit is contained in:
@@ -158,7 +158,7 @@ namespace CalDavSynchronizer.UnitTest.Ui.Options.ViewModels
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, true, true, "DAV Url", true, true, true);
|
||||
public ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, true, true, "DAV Url", true, true, true, true);
|
||||
|
||||
public string ImageUrl { get; } = string.Empty;
|
||||
|
||||
|
@@ -374,6 +374,7 @@
|
||||
<Compile Include="IOutlookSession.cs" />
|
||||
<Compile Include="IProfileExportProcessor.cs" />
|
||||
<Compile Include="OutlookCategory.cs" />
|
||||
<Compile Include="ProfileTypes\ConcreteTypes\ArubaProfile.cs" />
|
||||
<Compile Include="ProfileTypes\ConcreteTypes\CalendariCloudProfile.cs" />
|
||||
<Compile Include="ProfileTypes\ConcreteTypes\FastMailProfile.cs" />
|
||||
<Compile Include="ProfileTypes\ConcreteTypes\Open-XchangeProfile.cs" />
|
||||
@@ -468,6 +469,7 @@
|
||||
<Compile Include="Ui\Options\Views\GeneralOptionsWindow.xaml.cs">
|
||||
<DependentUpon>GeneralOptionsWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Ui\Options\Views\MultiValueToVisibilityConverter.cs" />
|
||||
<Compile Include="Ui\Options\Views\OXInfoDialog.xaml.cs">
|
||||
<DependentUpon>OXInfoDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -839,6 +841,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="LICENSE.txt" />
|
||||
<Resource Include="Resources\ProfileLogos\logo_aruba.png" />
|
||||
<Resource Include="Resources\ProfileLogos\logo_untermStrich.png" />
|
||||
<Resource Include="Resources\ProfileLogos\logo_ox_with_claim.png" />
|
||||
<Resource Include="Resources\ProfileLogos\logo_fuago.png" />
|
||||
|
@@ -0,0 +1,67 @@
|
||||
// This file is Part of CalDavSynchronizer (http://outlookcaldavsynchronizer.sourceforge.net/)
|
||||
// Copyright (c) 2015 Gerhard Zehetbauer
|
||||
// Copyright (c) 2015 Alexander Nimmervoll
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalDavSynchronizer.Contracts;
|
||||
using CalDavSynchronizer.Globalization;
|
||||
using CalDavSynchronizer.Ui.Options;
|
||||
using CalDavSynchronizer.Ui.Options.Models;
|
||||
using CalDavSynchronizer.Ui.Options.ViewModels;
|
||||
|
||||
namespace CalDavSynchronizer.ProfileTypes.ConcreteTypes
|
||||
{
|
||||
class ArubaProfile : ProfileTypeBase
|
||||
{
|
||||
public override string Name => "Aruba";
|
||||
public override string ImageUrl { get; } = "pack://application:,,,/CalDavSynchronizer;component/Resources/ProfileLogos/logo_aruba.png";
|
||||
|
||||
public override IProfileModelFactory CreateModelFactory(IOptionsViewModelParent optionsViewModelParent, IOutlookAccountPasswordProvider outlookAccountPasswordProvider, IReadOnlyList<string> availableCategories, IOptionTasks optionTasks, GeneralOptions generalOptions, IViewOptions viewOptions, OptionModelSessionData sessionData)
|
||||
{
|
||||
return new ProfileModelFactory(this, optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, generalOptions, viewOptions, sessionData);
|
||||
}
|
||||
|
||||
public override Contracts.Options CreateOptions()
|
||||
{
|
||||
var data = base.CreateOptions();
|
||||
data.CalenderUrl = "https://syncdav.aruba.it/";
|
||||
data.EnableChangeTriggeredSynchronization = true;
|
||||
data.SynchronizationIntervalInMinutes = 15;
|
||||
data.MappingConfiguration = CreateEventMappingConfiguration();
|
||||
return data;
|
||||
}
|
||||
|
||||
public override EventMappingConfiguration CreateEventMappingConfiguration()
|
||||
{
|
||||
var data = base.CreateEventMappingConfiguration();
|
||||
data.UseGlobalAppointmentID = true;
|
||||
data.CleanupDuplicateEvents = true;
|
||||
return data;
|
||||
}
|
||||
class ProfileModelFactory : ProfileModelFactoryBase
|
||||
{
|
||||
public ProfileModelFactory(IProfileType profileType, IOptionsViewModelParent optionsViewModelParent, IOutlookAccountPasswordProvider outlookAccountPasswordProvider, IReadOnlyList<string> availableCategories, IOptionTasks optionTasks, GeneralOptions generalOptions, IViewOptions viewOptions, OptionModelSessionData sessionData)
|
||||
: base(profileType, optionsViewModelParent, outlookAccountPasswordProvider, availableCategories, optionTasks, generalOptions, viewOptions, sessionData)
|
||||
{
|
||||
}
|
||||
|
||||
public override ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, true, true, Strings.Get($"DAV URL"), true, false, true, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@@ -83,7 +83,7 @@ namespace CalDavSynchronizer.ProfileTypes.ConcreteTypes
|
||||
ViewOptions);
|
||||
}
|
||||
|
||||
public override ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, false, true, Strings.Get($"DAV URL"), true, true, true);
|
||||
public override ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, false, true, Strings.Get($"DAV URL"), true, true, true, true);
|
||||
|
||||
public override IOptionsViewModel CreateViewModel(OptionsModel model)
|
||||
{
|
||||
|
@@ -78,7 +78,7 @@ namespace CalDavSynchronizer.ProfileTypes.ConcreteTypes
|
||||
ViewOptions);
|
||||
}
|
||||
|
||||
public override ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, true, true, Strings.Get($"Kolab URL"), true, true, true);
|
||||
public override ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, true, true, Strings.Get($"Kolab URL"), true, true, true, true);
|
||||
}
|
||||
}
|
||||
}
|
@@ -67,7 +67,7 @@ namespace CalDavSynchronizer.ProfileTypes.ConcreteTypes.Swisscom
|
||||
return new SwisscomServerSettingsDetector();
|
||||
}
|
||||
|
||||
public override ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(false, false, false, false, Strings.Get($"Detected URL"), false, false, false);
|
||||
public override ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(false, false, false, false, Strings.Get($"Detected URL"), false, false, false, false);
|
||||
}
|
||||
}
|
||||
}
|
@@ -29,6 +29,6 @@ namespace CalDavSynchronizer.ProfileTypes
|
||||
return GenericOptionsViewModel.DesignInstance;
|
||||
}
|
||||
|
||||
public ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(false, false, false, false, Strings.Get($"DAV URL"), false, true, true);
|
||||
public ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(false, false, false, false, Strings.Get($"DAV URL"), false, true, true, true);
|
||||
}
|
||||
}
|
@@ -106,7 +106,7 @@ namespace CalDavSynchronizer.ProfileTypes
|
||||
return optionsViewModel;
|
||||
}
|
||||
|
||||
public virtual ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, true, true, Strings.Get($"DAV URL"), true, true, true);
|
||||
public virtual ProfileModelOptions ModelOptions { get; } = new ProfileModelOptions(true, true, true, true, Strings.Get($"DAV URL"), true, true, true, true);
|
||||
|
||||
protected virtual IOptionsViewModel CreateTemplateViewModel(OptionsModel prototypeModel)
|
||||
{
|
||||
|
@@ -21,7 +21,7 @@ namespace CalDavSynchronizer.ProfileTypes
|
||||
{
|
||||
public class ProfileModelOptions
|
||||
{
|
||||
public ProfileModelOptions(bool areAdvancedNetWorkSettingsEnabled, bool isEnableChangeTriggeredSynchronizationEnabled, bool isTaskMappingConfigurationEnabled, bool isContactMappingConfigurationEnabled, string davUrlLabelText, bool areSyncSettingsEnabled, bool areSyncSettingsVisible, bool isEnableChangeTriggeredSynchronizationVisible)
|
||||
public ProfileModelOptions(bool areAdvancedNetWorkSettingsEnabled, bool isEnableChangeTriggeredSynchronizationEnabled, bool isTaskMappingConfigurationEnabled, bool isContactMappingConfigurationEnabled, string davUrlLabelText, bool areSyncSettingsEnabled, bool areSyncSettingsVisible, bool areSyncSettingsVisibleInAdvancedSettings, bool isEnableChangeTriggeredSynchronizationVisible)
|
||||
{
|
||||
AreAdvancedNetWorkSettingsEnabled = areAdvancedNetWorkSettingsEnabled;
|
||||
IsEnableChangeTriggeredSynchronizationEnabled = isEnableChangeTriggeredSynchronizationEnabled;
|
||||
@@ -30,10 +30,12 @@ namespace CalDavSynchronizer.ProfileTypes
|
||||
DavUrlLabelText = davUrlLabelText;
|
||||
AreSyncSettingsEnabled = areSyncSettingsEnabled;
|
||||
AreSyncSettingsVisible = areSyncSettingsVisible;
|
||||
AreSyncSettingsVisibleInAdvancedSettings = areSyncSettingsVisibleInAdvancedSettings;
|
||||
IsEnableChangeTriggeredSynchronizationVisible = isEnableChangeTriggeredSynchronizationVisible;
|
||||
}
|
||||
|
||||
public bool AreSyncSettingsVisible { get; }
|
||||
public bool AreSyncSettingsVisibleInAdvancedSettings { get; }
|
||||
public bool AreSyncSettingsEnabled { get; }
|
||||
public bool AreAdvancedNetWorkSettingsEnabled { get; }
|
||||
public bool IsEnableChangeTriggeredSynchronizationVisible { get; }
|
||||
|
@@ -69,6 +69,7 @@ namespace CalDavSynchronizer.ProfileTypes
|
||||
all.Add(new EGroupwareProfile());
|
||||
all.Add(new FastMailProfile());
|
||||
all.Add(new untermStrichProfile());
|
||||
all.Add(new ArubaProfile());
|
||||
|
||||
return new ProfileTypeRegistry(all, generic, google);
|
||||
}
|
||||
|
BIN
CalDavSynchronizer/Resources/ProfileLogos/logo_aruba.png
Normal file
BIN
CalDavSynchronizer/Resources/ProfileLogos/logo_aruba.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
@@ -157,7 +157,7 @@ namespace CalDavSynchronizer.Ui.Options.BulkOptions.ViewModels
|
||||
}
|
||||
|
||||
|
||||
public static ServerSettingsTemplateViewModel DesignInstance = new ServerSettingsTemplateViewModel(NullOutlookAccountPasswordProvider.Instance, OptionsModel.DesignInstance, new ProfileModelOptions(false, false, false, false, "DAV Url", false, true, true))
|
||||
public static ServerSettingsTemplateViewModel DesignInstance = new ServerSettingsTemplateViewModel(NullOutlookAccountPasswordProvider.Instance, OptionsModel.DesignInstance, new ProfileModelOptions(false, false, false, false, "DAV Url", false, true, true, true))
|
||||
{
|
||||
CalenderUrl = "http://bulkurl",
|
||||
EmailAddress = "bulkemail",
|
||||
|
@@ -0,0 +1,41 @@
|
||||
// This file is Part of CalDavSynchronizer (http://outlookcaldavsynchronizer.sourceforge.net/)
|
||||
// Copyright (c) 2015 Gerhard Zehetbauer
|
||||
// Copyright (c) 2015 Alexander Nimmervoll
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CalDavSynchronizer.Ui.Options.Views
|
||||
{
|
||||
public class MultiValueToVisibilityConverter : IMultiValueConverter
|
||||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
bool a = (bool)values[0];
|
||||
bool b = (bool)values[1];
|
||||
bool c = (bool)values[2];
|
||||
|
||||
return a || (b && c) ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@@ -5,13 +5,22 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:viewModels="clr-namespace:CalDavSynchronizer.Ui.Options.ViewModels"
|
||||
xmlns:g="clr-namespace:CalDavSynchronizer.Globalization"
|
||||
xmlns:views="clr-namespace:CalDavSynchronizer.Ui.Options.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{x:Static viewModels:SyncSettingsViewModel.DesignInstance}">
|
||||
<UserControl.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<views:MultiValueToVisibilityConverter x:Key="MultiValueToVisibilityConverter" />
|
||||
</UserControl.Resources>
|
||||
<GroupBox Header="{g:Localize Sync Settings}" IsEnabled="{Binding ModelOptions.AreSyncSettingsEnabled}" Visibility="{Binding ModelOptions.AreSyncSettingsVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<Grid DockPanel.Dock="Top">
|
||||
<GroupBox Header="{g:Localize Sync Settings}" IsEnabled="{Binding ModelOptions.AreSyncSettingsEnabled}">
|
||||
<GroupBox.Visibility>
|
||||
<MultiBinding Converter="{StaticResource MultiValueToVisibilityConverter}">
|
||||
<Binding Path="ModelOptions.AreSyncSettingsVisible" />
|
||||
<Binding Path="ViewOptions.IsAdvancedViewEnabled" />
|
||||
<Binding Path="ModelOptions.AreSyncSettingsVisibleInAdvancedSettings" />
|
||||
</MultiBinding>
|
||||
</GroupBox.Visibility>
|
||||
<Grid DockPanel.Dock="Top">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
Reference in New Issue
Block a user