diff --git a/zaaReloaded2/Properties/Settings.Designer.cs b/zaaReloaded2/Properties/Settings.Designer.cs
index 6eb64bf..dcdaf95 100755
--- a/zaaReloaded2/Properties/Settings.Designer.cs
+++ b/zaaReloaded2/Properties/Settings.Designer.cs
@@ -234,5 +234,17 @@ namespace zaaReloaded2.Properties {
this["SuppressItemCommentInteraction"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool FirstRunWizardShown {
+ get {
+ return ((bool)(this["FirstRunWizardShown"]));
+ }
+ set {
+ this["FirstRunWizardShown"] = value;
+ }
+ }
}
}
diff --git a/zaaReloaded2/Properties/Settings.settings b/zaaReloaded2/Properties/Settings.settings
index 7a1c310..559ef0f 100755
--- a/zaaReloaded2/Properties/Settings.settings
+++ b/zaaReloaded2/Properties/Settings.settings
@@ -68,5 +68,8 @@
False
+
+ False
+
\ No newline at end of file
diff --git a/zaaReloaded2/ThisAddIn.cs b/zaaReloaded2/ThisAddIn.cs
index 297b63d..ab47a4b 100755
--- a/zaaReloaded2/ThisAddIn.cs
+++ b/zaaReloaded2/ThisAddIn.cs
@@ -16,14 +16,7 @@
* limitations under the License.
*/
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Xml.Linq;
using System.IO;
-using Word = Microsoft.Office.Interop.Word;
-using Office = Microsoft.Office.Core;
-using Microsoft.Office.Tools.Word;
using Bovender.Versioning;
using Bovender.Mvvm.Messaging;
using zaaReloaded2.ExceptionHandler;
@@ -62,6 +55,7 @@ namespace zaaReloaded2
Properties.Settings.Default.AddinName,
Updater.Version.CurrentVersion().ToString()
);
+ ViewModels.FirstRunViewModel.InjectIntoIfNeeded();
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
diff --git a/zaaReloaded2/ViewModels/FirstRunViewModel.cs b/zaaReloaded2/ViewModels/FirstRunViewModel.cs
new file mode 100755
index 0000000..02b0f4b
--- /dev/null
+++ b/zaaReloaded2/ViewModels/FirstRunViewModel.cs
@@ -0,0 +1,140 @@
+/* FirstRunViewModel.cs
+ * part of zaaReloaded2
+ *
+ * Copyright 2015 Daniel Kraus
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bovender.Mvvm;
+using Bovender.Mvvm.ViewModels;
+
+namespace zaaReloaded2.ViewModels
+{
+ ///
+ /// View model for the first-run wizard
+ ///
+ class FirstRunViewModel : ViewModelBase
+ {
+ #region Static method
+
+ ///
+ /// If the first-run wizard hasn't been shown to this user
+ /// yet, creates a new instance of FirstRunViewModel,
+ /// injects it into the view T and shows the view.
+ ///
+ /// Window to inject the view model into.
+ public static void InjectIntoIfNeeded()
+ where T: System.Windows.Window, new()
+ {
+ if (!Properties.Settings.Default.FirstRunWizardShown)
+ {
+ FirstRunViewModel vm = new FirstRunViewModel();
+ vm.InjectInto().Show();
+ }
+ }
+
+ #endregion
+
+ #region Commands
+
+ public DelegatingCommand SelectDoctorsModeCommand
+ {
+ get
+ {
+ if (_selectDoctorsModeCommand == null)
+ {
+ _selectDoctorsModeCommand = new DelegatingCommand(
+ param => DoSelectDoctorsMode());
+ }
+ return _selectDoctorsModeCommand;
+ }
+ }
+
+ public DelegatingCommand SelectTypistsModeCommand
+ {
+ get
+ {
+ if (_selectTypistsModeCommand == null)
+ {
+ _selectTypistsModeCommand = new DelegatingCommand(
+ param => DoSelectTypistsMode());
+ }
+ return _selectTypistsModeCommand;
+ }
+ }
+
+ #endregion
+
+ #region Constructor
+
+ ///
+ /// Private constructor to enforce using the static
+ ///
+ private FirstRunViewModel() : base() { }
+
+ #endregion
+
+ #region Private methods
+
+ void DoSelectDoctorsMode()
+ {
+ // Properties will be saved by the DoCloseView override.
+ Properties.Settings.Default.SuppressItemCommentInteraction = false;
+ CloseViewCommand.Execute(null);
+ }
+
+ void DoSelectTypistsMode()
+ {
+ // Properties will be saved by the DoCloseView override.
+ Properties.Settings.Default.SuppressItemCommentInteraction = true;
+ CloseViewCommand.Execute(null);
+ }
+
+ #endregion
+
+ #region Overrides
+
+ ///
+ /// Sets the FirstRunWizardShown property of the assembly properties
+ /// to true and calls the base function to close the associated view.
+ ///
+ protected override void DoCloseView()
+ {
+ Properties.Settings.Default.FirstRunWizardShown = true;
+ Properties.Settings.Default.Save();
+ base.DoCloseView();
+ }
+
+ #endregion
+
+ #region Implementation of ViewModelBase
+
+ public override object RevealModelObject()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+
+ #region Fields
+
+ DelegatingCommand _selectDoctorsModeCommand;
+ DelegatingCommand _selectTypistsModeCommand;
+
+ #endregion
+ }
+}
diff --git a/zaaReloaded2/Views/FirstRunView.xaml b/zaaReloaded2/Views/FirstRunView.xaml
new file mode 100755
index 0000000..ec6e0f2
--- /dev/null
+++ b/zaaReloaded2/Views/FirstRunView.xaml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+ Willkommen bei zaaReloaded
+
+
+
+ Bitte den Arbeitsmodus auswählen:
+
+
+
+
+ Im Ärztemodus werden beim Formatieren bei Bedarf Zusatzinformationen zu Laborparametern
+ abgefragt (z.B. Medikamenten-Zielspiegel).
+
+
+
+
+
+ Im Ärztemodus werden beim Formatieren grundsätzlich keine Zusatzinformationen abgefragt.
+
+
+
+ Die Einstellungen können jederzeit unter "Einstellungen" wieder geändert werden.
+
+
+
diff --git a/zaaReloaded2/Views/FirstRunView.xaml.cs b/zaaReloaded2/Views/FirstRunView.xaml.cs
new file mode 100755
index 0000000..e6dd912
--- /dev/null
+++ b/zaaReloaded2/Views/FirstRunView.xaml.cs
@@ -0,0 +1,33 @@
+/* FirstRunView.xaml.cs
+ * part of zaaReloaded2
+ *
+ * Copyright 2015 Daniel Kraus
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Windows;
+
+namespace zaaReloaded2.Views
+{
+ ///
+ /// Interaction logic for FirstRunView.xaml
+ ///
+ public partial class FirstRunView : Window
+ {
+ public FirstRunView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/zaaReloaded2/app.config b/zaaReloaded2/app.config
index 182c02d..4bd15ae 100755
--- a/zaaReloaded2/app.config
+++ b/zaaReloaded2/app.config
@@ -99,6 +99,9 @@
False
+
+ False
+
\ No newline at end of file
diff --git a/zaaReloaded2/zaaReloaded2.csproj b/zaaReloaded2/zaaReloaded2.csproj
index 55af2f7..8d6d2bd 100755
--- a/zaaReloaded2/zaaReloaded2.csproj
+++ b/zaaReloaded2/zaaReloaded2.csproj
@@ -256,6 +256,7 @@
+
@@ -274,6 +275,9 @@
ElementView.xaml
+
+ FirstRunView.xaml
+ PreferencesView.xaml
@@ -369,6 +373,10 @@
MSBuild:CompileDesigner
+
+ MSBuild:Compile
+ Designer
+ MSBuild:CompileDesigner
@@ -470,4 +478,4 @@
-
+
\ No newline at end of file