diff --git a/cmtviswpf.sln b/cmtviswpf.sln
new file mode 100644
index 0000000..935c553
--- /dev/null
+++ b/cmtviswpf.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cmtviswpf", "cmtviswpf\cmtviswpf.csproj", "{FD3934D0-7922-46CD-8F60-4BCCBBEAAEF8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FD3934D0-7922-46CD-8F60-4BCCBBEAAEF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FD3934D0-7922-46CD-8F60-4BCCBBEAAEF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FD3934D0-7922-46CD-8F60-4BCCBBEAAEF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FD3934D0-7922-46CD-8F60-4BCCBBEAAEF8}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/cmtviswpf.v11.suo b/cmtviswpf.v11.suo
new file mode 100644
index 0000000..1057334
Binary files /dev/null and b/cmtviswpf.v11.suo differ
diff --git a/cmtviswpf/.gitignore b/cmtviswpf/.gitignore
new file mode 100644
index 0000000..1746e32
--- /dev/null
+++ b/cmtviswpf/.gitignore
@@ -0,0 +1,2 @@
+bin
+obj
diff --git a/cmtviswpf/About.xaml b/cmtviswpf/About.xaml
new file mode 100644
index 0000000..3e943f0
--- /dev/null
+++ b/cmtviswpf/About.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmtviswpf/About.xaml.cs b/cmtviswpf/About.xaml.cs
new file mode 100644
index 0000000..a0bf743
--- /dev/null
+++ b/cmtviswpf/About.xaml.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace cmtviswpf
+{
+ ///
+ /// Interaktionslogik für About.xaml
+ ///
+ public partial class About : Window
+ {
+ public About()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+
+ private void Label_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
+ {
+ System.Diagnostics.Process.Start("http://wwwdb.inf.tu-dresden.de/cmtvis");
+ }
+
+ private void Label_TouchDown_1(object sender, TouchEventArgs e)
+ {
+ System.Diagnostics.Process.Start("http://wwwdb.inf.tu-dresden.de/cmtvis");
+ }
+ }
+}
diff --git a/cmtviswpf/Answer.cs b/cmtviswpf/Answer.cs
new file mode 100644
index 0000000..f93d544
--- /dev/null
+++ b/cmtviswpf/Answer.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Xml.Linq;
+
+namespace cmtviswpf
+{
+ public class Answer
+ {
+ const string PLACEHOLDER = "REPLACE THIS WITH YOUR ANSWER";
+
+ public List textboxes = new List();
+ public List radiobuttons = new List();
+ public List checkboxes = new List();
+ public XElement element = null;
+
+ public void setXML()
+ {
+ if (textboxes.Count > 0)
+ {
+ element.Value = textboxes[0].Text;
+ return;
+ }
+ if (checkboxes.Count > 0)
+ {
+ element.Value = checkboxes[0].IsChecked == true ? "Yes" : "No";
+ return;
+ }
+ bool found = false;
+ foreach (RadioButton cb in radiobuttons)
+ {
+ if (cb.IsChecked == true)
+ {
+ element.Value = (string)cb.Content;
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ {
+ element.Value = PLACEHOLDER;
+ }
+ }
+
+
+ public void setControl()
+ {
+ if (textboxes.Count > 0)
+ {
+ if (element.Value == PLACEHOLDER)
+ {
+ textboxes[0].Text = "";
+ }
+ else
+ {
+ textboxes[0].Text = element.Value;
+ }
+ return;
+ }
+ if (checkboxes.Count > 0)
+ {
+ checkboxes[0].IsChecked = element.Value == "Yes";
+ return;
+ }
+ foreach (RadioButton cb in radiobuttons)
+ {
+ if (element.Value == PLACEHOLDER)
+ {
+ cb.IsChecked = false;
+ }
+ else
+ {
+ cb.IsChecked = element.Value == (string) cb.Content;
+ }
+ }
+ }
+ }
+}
diff --git a/cmtviswpf/App.config b/cmtviswpf/App.config
new file mode 100644
index 0000000..d1428ad
--- /dev/null
+++ b/cmtviswpf/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/cmtviswpf/App.xaml b/cmtviswpf/App.xaml
new file mode 100644
index 0000000..c146383
--- /dev/null
+++ b/cmtviswpf/App.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/cmtviswpf/App.xaml.cs b/cmtviswpf/App.xaml.cs
new file mode 100644
index 0000000..1892704
--- /dev/null
+++ b/cmtviswpf/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace cmtviswpf
+{
+ ///
+ /// Interaktionslogik für "App.xaml"
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/cmtviswpf/FolderSelectDialog.cs b/cmtviswpf/FolderSelectDialog.cs
new file mode 100644
index 0000000..20a8234
--- /dev/null
+++ b/cmtviswpf/FolderSelectDialog.cs
@@ -0,0 +1,154 @@
+using System;
+using System.Windows.Forms;
+
+// ------------------------------------------------------------------
+// Wraps System.Windows.Forms.OpenFileDialog to make it present
+// a vista-style dialog.
+// ------------------------------------------------------------------
+
+namespace FolderSelect
+{
+ ///
+ /// Wraps System.Windows.Forms.OpenFileDialog to make it present
+ /// a vista-style dialog.
+ ///
+ public class FolderSelectDialog
+ {
+ // Wrapped dialog
+ System.Windows.Forms.OpenFileDialog ofd = null;
+
+ ///
+ /// Default constructor
+ ///
+ public FolderSelectDialog()
+ {
+ ofd = new System.Windows.Forms.OpenFileDialog();
+
+ ofd.Filter = "Folders|\n";
+ ofd.AddExtension = false;
+ ofd.CheckFileExists = false;
+ ofd.DereferenceLinks = true;
+ ofd.Multiselect = false;
+ }
+
+ #region Properties
+
+ ///
+ /// Gets/Sets the initial folder to be selected. A null value selects the current directory.
+ ///
+ public string InitialDirectory
+ {
+ get { return ofd.InitialDirectory; }
+ set { ofd.InitialDirectory = value == null || value.Length == 0 ? Environment.CurrentDirectory : value; }
+ }
+
+ ///
+ /// Gets/Sets the title to show in the dialog
+ ///
+ public string Title
+ {
+ get { return ofd.Title; }
+ set { ofd.Title = value == null ? "Select a folder" : value; }
+ }
+
+ ///
+ /// Gets the selected folder
+ ///
+ public string FileName
+ {
+ get { return ofd.FileName; }
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Shows the dialog
+ ///
+ /// True if the user presses OK else false
+ public bool ShowDialog()
+ {
+ return ShowDialog(IntPtr.Zero);
+ }
+
+ ///
+ /// Shows the dialog
+ ///
+ /// Handle of the control to be parent
+ /// True if the user presses OK else false
+ public bool ShowDialog(IntPtr hWndOwner)
+ {
+ bool flag = false;
+
+ if (Environment.OSVersion.Version.Major >= 6)
+ {
+ var r = new Reflector("System.Windows.Forms");
+
+ uint num = 0;
+ Type typeIFileDialog = r.GetType("FileDialogNative.IFileDialog");
+ object dialog = r.Call(ofd, "CreateVistaDialog");
+ r.Call(ofd, "OnBeforeVistaDialog", dialog);
+
+ uint options = (uint)r.CallAs(typeof(System.Windows.Forms.FileDialog), ofd, "GetOptions");
+ options |= (uint)r.GetEnum("FileDialogNative.FOS", "FOS_PICKFOLDERS");
+ r.CallAs(typeIFileDialog, dialog, "SetOptions", options);
+
+ object pfde = r.New("FileDialog.VistaDialogEvents", ofd);
+ object[] parameters = new object[] { pfde, num };
+ r.CallAs2(typeIFileDialog, dialog, "Advise", parameters);
+ num = (uint)parameters[1];
+ try
+ {
+ int num2 = (int)r.CallAs(typeIFileDialog, dialog, "Show", hWndOwner);
+ flag = 0 == num2;
+ }
+ finally
+ {
+ r.CallAs(typeIFileDialog, dialog, "Unadvise", num);
+ GC.KeepAlive(pfde);
+ }
+ }
+ else
+ {
+ var fbd = new FolderBrowserDialog();
+ fbd.Description = this.Title;
+ fbd.SelectedPath = this.InitialDirectory;
+ fbd.ShowNewFolderButton = false;
+ if (fbd.ShowDialog(new WindowWrapper(hWndOwner)) != DialogResult.OK) return false;
+ ofd.FileName = fbd.SelectedPath;
+ flag = true;
+ }
+
+ return flag;
+ }
+
+ #endregion
+ }
+
+ ///
+ /// Creates IWin32Window around an IntPtr
+ ///
+ public class WindowWrapper : System.Windows.Forms.IWin32Window
+ {
+ ///
+ /// Constructor
+ ///
+ /// Handle to wrap
+ public WindowWrapper(IntPtr handle)
+ {
+ _hwnd = handle;
+ }
+
+ ///
+ /// Original ptr
+ ///
+ public IntPtr Handle
+ {
+ get { return _hwnd; }
+ }
+
+ private IntPtr _hwnd;
+ }
+
+}
diff --git a/cmtviswpf/MainWindow.xaml b/cmtviswpf/MainWindow.xaml
new file mode 100644
index 0000000..3bf6eac
--- /dev/null
+++ b/cmtviswpf/MainWindow.xaml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cmtviswpf/MainWindow.xaml.cs b/cmtviswpf/MainWindow.xaml.cs
new file mode 100644
index 0000000..26a192a
--- /dev/null
+++ b/cmtviswpf/MainWindow.xaml.cs
@@ -0,0 +1,395 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Xml.Linq;
+using System.Xml;
+using System.IO;
+using System.Windows.Threading;
+using System.Windows.Markup;
+
+namespace cmtviswpf
+{
+ ///
+ /// Interaktionslogik für MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ XDocument xdoc = null;
+ string filename = null;
+ string folder = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
+ string pdf = null;
+ GridLength pdfbackup = GridLength.Auto;
+ List answers = new List();
+
+ public MainWindow()
+ {
+ InitializeComponent();
+ openFolder(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory));
+ }
+
+ private void openFolder(string folder)
+ {
+ this.folder = folder;
+ string[] files = Directory.GetFiles(folder, "*.xml");
+ List metainfos = new List();
+ foreach (string file in files)
+ {
+ List fmetainfos = MetaInfo.loadMetaInfos(file);
+ foreach (MetaInfo meta in fmetainfos)
+ {
+ metainfos.Add(meta);
+ }
+ }
+ folderView.ItemsSource = metainfos;
+ if (metainfos.Count < 1)
+ {
+ folderView.Visibility = System.Windows.Visibility.Collapsed;
+ }
+ else
+ {
+ folderView.Visibility = System.Windows.Visibility.Visible;
+ }
+ }
+
+ private void openXML(string fn, string childpaperid)
+ {
+ try
+ {
+ closeXML();
+ rootpanel.Children.Clear();
+ xdoc = XDocument.Load(fn);
+ filename = fn;
+ this.answers.Clear();
+ string conference = xdoc.Root.Attribute("shortName").Value;
+ string deadline = ""; // xdoc.Root.Attribute("ReviewDeadline").Value;
+ var papers = xdoc.Root.Descendants("submission");
+ XElement paperroot = null;
+ if (childpaperid == null)
+ {
+ paperroot = papers.ElementAt(0);
+ }
+ else
+ {
+ foreach (XElement lpaper in papers)
+ {
+ if (lpaper.Attribute("id").Value == childpaperid)
+ {
+ paperroot = lpaper;
+ }
+ }
+ }
+ string paperid = paperroot.Attribute("id").Value;
+ string title = paperroot.Attribute("title").Value;
+ this.Title = String.Format("{0} : {2} ({1})", conference, paperid, title);
+
+ var quests = paperroot.Descendants("question");
+ int count = 0;
+ foreach (XElement question in quests)
+ {
+ int number = Int32.Parse(question.Attribute("number").Value);
+ string text = question.Attribute("text").Value;
+ var answersPresent = question.Descendants("options");
+ IEnumerable answers = null;
+ if (answersPresent.Count() > 0)
+ {
+ answers = answersPresent.Descendants("option");
+ }
+
+ bool ischeckbox = answersPresent.Count() > 0 && answers.Count() == 2 && answers.ElementAt(0).Value == "Yes" && answers.ElementAt(1).Value == "No";
+ Answer myaw = new Answer();
+ StackPanel questpanel = new StackPanel();
+ TextBlock qtext = new TextBlock();
+ qtext.Text = text;
+ qtext.TextWrapping = TextWrapping.Wrap;
+ qtext.Margin = new Thickness(5, 5, 5, 5);
+ qtext.FontWeight = FontWeights.SemiBold;
+ qtext.FontSize = 14;
+ if (ischeckbox)
+ {
+ CheckBox cb = new CheckBox();
+ cb.Margin = new Thickness(5, 5, 5, 5);
+ qtext.Margin = new Thickness(0);
+ cb.Checked += cb_Checked;
+ cb.Content = qtext;
+ questpanel.Children.Add(cb);
+ myaw.checkboxes.Add(cb);
+ }
+ else
+ {
+ questpanel.Children.Add(qtext);
+ }
+ if (((count++) % 2) == 0)
+ {
+ questpanel.Background = new SolidColorBrush(Color.FromArgb(255, 235, 235, 235));
+ }
+ else
+ {
+
+ }
+
+ var answersElem = question.Descendants("answers");
+
+ XElement myanswer = null;
+
+ if (answersElem.Count() > 0)
+ {
+ myanswer = answersElem.Descendants("answer").ElementAt(0);
+ } else
+ {
+ myanswer = question.Descendants("answer").ElementAt(0);
+ }
+
+ myaw.element = myanswer;
+ if (answersPresent.Count() < 1 || answers.Count() < 1)
+ {
+ TextBox tb = new TextBox();
+ tb.TextWrapping = TextWrapping.Wrap;
+ tb.AcceptsReturn = true;
+ tb.Margin = new Thickness(5, 5, 5, 5);
+ tb.FontSize = 13;
+ tb.TextChanged += tb_TextChanged;
+ tb.Language = XmlLanguage.GetLanguage("en-US");
+ tb.SpellCheck.IsEnabled = true;
+
+ questpanel.Children.Add(tb);
+ myaw.textboxes.Add(tb);
+ }
+ else if (!ischeckbox)
+ {
+ StackPanel grouptab = new StackPanel();
+ foreach (XElement answer in answers)
+ {
+ RadioButton rb = new RadioButton();
+ rb.Content = answer.Value;
+ rb.Margin = new Thickness(5, 5, 5, 5);
+ rb.FontSize = 13;
+ rb.Checked += rb_Checked;
+ grouptab.Children.Add(rb);
+ myaw.radiobuttons.Add(rb);
+ }
+ questpanel.Children.Add(grouptab);
+ }
+ rootpanel.Children.Add(questpanel);
+ this.answers.Add(myaw);
+ myaw.setControl();
+ }
+ try
+ {
+ string[] pdfs = Directory.GetFiles(System.IO.Path.GetDirectoryName(filename), "Paper " + paperid + ".pdf");
+ if (pdfs.Length > 0)
+ {
+ pdf = pdfs[0];
+ }
+ else
+ {
+ pdfs = Directory.GetFiles(System.IO.Path.GetDirectoryName(filename), "Paper " + paperid + "(*).pdf");
+ if (pdfs.Length > 0)
+ {
+ pdf = pdfs[0];
+ }
+ else
+ {
+ pdfs = Directory.GetFiles(System.IO.Path.GetDirectoryName(filename) + System.IO.Path.DirectorySeparatorChar + "Assigned Papers", "Paper " + paperid + ".pdf");
+ if (pdfs.Length > 0)
+ {
+ pdf = pdfs[0];
+ }
+ else
+ {
+ pdf = null;
+ }
+ }
+ }
+ }
+ catch (Exception)
+ {
+ pdf = null;
+ }
+
+
+ savebutton.IsEnabled = false;
+ closebutton.IsEnabled = true;
+ pdfbutton.IsEnabled = pdf != null;
+ rootscroll.Visibility = System.Windows.Visibility.Visible;
+ if (pdf != null)
+ {
+ browser.Navigate("file:///" + pdf);
+ if (centergrid.ColumnDefinitions[2].Width.Value < 0.1)
+ {
+ centergrid.ColumnDefinitions[2].Width = pdfbackup;
+ }
+ }
+ else
+ {
+ browser.Navigate("about:blank");
+ pdfbackup = centergrid.ColumnDefinitions[2].Width;
+ centergrid.ColumnDefinitions[2].Width = new GridLength(0);
+ }
+ }
+ catch (Exception e)
+ {
+ closeXML();
+ MessageBox.Show(e.Message);
+ }
+ }
+
+ void cb_Checked(object sender, RoutedEventArgs e)
+ {
+ savebutton.IsEnabled = true;
+ }
+
+ void rb_Checked(object sender, RoutedEventArgs e)
+ {
+ savebutton.IsEnabled = true;
+ }
+
+ void tb_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ savebutton.IsEnabled = true;
+ }
+
+ private void closeXML()
+ {
+ if (savebutton.IsEnabled)
+ {
+ MessageBoxResult mr = MessageBox.Show("Save review form ?", "Unsaved Content.", MessageBoxButton.YesNo);
+ if (mr == MessageBoxResult.Yes)
+ {
+ saveXML();
+ }
+ }
+ if (pdf != null)
+ {
+ pdfbackup = centergrid.ColumnDefinitions[2].Width;
+ }
+ browser.Navigate("about:blank");
+ centergrid.ColumnDefinitions[2].Width = new GridLength(0);
+ xdoc = null;
+ filename = null;
+ pdf = null;
+ rootpanel.Children.Clear();
+ Title = "CMTVIS";
+ savebutton.IsEnabled = false;
+ closebutton.IsEnabled = false;
+ pdfbutton.IsEnabled = false;
+ rootscroll.Visibility = System.Windows.Visibility.Collapsed;
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
+ dlg.Filter = "CMT XML (*.xml)|*.xml";
+
+ if (dlg.ShowDialog() != true)
+ {
+ return;
+ }
+ List metainfos = MetaInfo.loadMetaInfos(dlg.FileName);
+ if (metainfos.Count() < 1)
+ {
+ MessageBox.Show("The file contains no valid review form.");
+ return;
+ }
+ if (metainfos.Count() == 1)
+ {
+ openXML(dlg.FileName, null);
+ return;
+ }
+ closeXML();
+ folderView.ItemsSource = metainfos;
+ MessageBox.Show("The file contains multiple review forms. Please choose your form from the folder view on the left.");
+ }
+
+ private void saveXML()
+ {
+ if (xdoc == null)
+ {
+ return;
+ }
+ foreach (Answer aw in this.answers)
+ {
+ aw.setXML();
+ }
+ xdoc.Save(filename, SaveOptions.None);
+ savebutton.IsEnabled = false;
+ }
+
+ private void Button_Click_2(object sender, RoutedEventArgs e)
+ {
+ saveXML();
+ }
+
+ private void Button_Click_3(object sender, RoutedEventArgs e)
+ {
+ FolderSelect.FolderSelectDialog fdlg = new FolderSelect.FolderSelectDialog();
+ fdlg.Title = "Change Folder";
+ fdlg.InitialDirectory = this.folder;
+
+ if (!fdlg.ShowDialog(IntPtr.Zero))
+ {
+ return;
+ }
+ openFolder(fdlg.FileName);
+ }
+
+ private void folderView_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ MetaInfo item = (MetaInfo)folderView.SelectedValue;
+ if (item == null)
+ {
+ return;
+ }
+ openXML(item.filename, item.paperid);
+ }
+
+ private void Button_Click_4(object sender, RoutedEventArgs e)
+ {
+ closeXML();
+ }
+
+ private void pdfbutton_Click(object sender, RoutedEventArgs e)
+ {
+ if (pdf == null)
+ {
+ return;
+ }
+ System.Diagnostics.Process.Start(pdf);
+ }
+
+ private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ if (savebutton.IsEnabled)
+ {
+ MessageBoxResult mr = MessageBox.Show("Do you want to save your work before closing the app ?", "Unsaved Content.", MessageBoxButton.YesNoCancel);
+ if (mr == MessageBoxResult.Yes)
+ {
+ saveXML();
+ }
+ if (mr == MessageBoxResult.Cancel)
+ {
+ e.Cancel = true;
+ }
+ }
+ }
+
+ private void Button_Click_5(object sender, RoutedEventArgs e)
+ {
+ About about = new About();
+ about.ShowDialog();
+ }
+
+
+
+ }
+}
diff --git a/cmtviswpf/MetaInfo.cs b/cmtviswpf/MetaInfo.cs
new file mode 100644
index 0000000..dcce606
--- /dev/null
+++ b/cmtviswpf/MetaInfo.cs
@@ -0,0 +1,104 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+using System.IO;
+
+namespace cmtviswpf
+{
+ public class MetaInfo
+ {
+ public string filename { get; set; }
+ public string conference { get; set; }
+ public string deadline { get; set; }
+ public string paperid { get; set; }
+ public string title { get; set; }
+ public string purefilename { get; set; }
+ public bool valid { get; set; }
+ public string pdf { get; set; }
+ public string info { get; set; }
+ public string pdfbrowser { get; set; }
+
+ public static List loadMetaInfos(string filename)
+ {
+ List rt = new List();
+ MetaInfo mi = null;
+ try
+ {
+ XDocument xdoc = XDocument.Load(filename);
+ string conference = xdoc.Root.Attribute("shortName").Value;
+ string deadline = ""; // xdoc.Root.Attribute("ReviewDeadline").Value;
+ string purefilename = Path.GetFileNameWithoutExtension(filename);
+ var papers = xdoc.Root.Descendants("submission");
+ foreach (XElement paper in papers)
+ {
+ mi = new MetaInfo();
+ mi.valid = true;
+ mi.filename = filename;
+ mi.conference = conference;
+ mi.deadline = deadline;
+ mi.purefilename = purefilename;
+ mi.paperid = paper.Attribute("id").Value;
+ mi.title = paper.Attribute("title").Value;
+
+ try
+ {
+ string[] pdfs = Directory.GetFiles(System.IO.Path.GetDirectoryName(filename), "Paper " + mi.paperid + ".pdf");
+ if (pdfs.Length > 0)
+ {
+ mi.pdf = pdfs[0];
+ }
+ else
+ {
+ pdfs = Directory.GetFiles(System.IO.Path.GetDirectoryName(filename), "Paper " + mi.paperid + "(*).pdf");
+ if (pdfs.Length > 0)
+ {
+ mi.pdf = pdfs[0];
+ }
+ else
+ {
+ pdfs = Directory.GetFiles(System.IO.Path.GetDirectoryName(filename) + System.IO.Path.DirectorySeparatorChar + "Assigned Papers", "Paper " + mi.paperid + ".pdf");
+ if (pdfs.Length > 0)
+ {
+ mi.pdf = pdfs[0];
+ }
+ else
+ {
+ mi.pdf = null;
+ }
+ }
+ }
+ }
+ catch (Exception)
+ {
+ mi.pdf = null;
+ }
+ if (mi.pdf != null)
+ {
+ mi.info = "PDF";
+ mi.pdfbrowser = "file:///" + mi.pdf;
+ }
+ else
+ {
+ mi.info = "";
+ mi.pdfbrowser = "about:blank";
+ }
+ rt.Add(mi);
+ }
+ }
+ catch (Exception)
+ {
+
+ }
+ return rt;
+ }
+
+ public MetaInfo()
+ {
+
+ }
+
+ }
+}
diff --git a/cmtviswpf/Properties/AssemblyInfo.cs b/cmtviswpf/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..4b4b003
--- /dev/null
+++ b/cmtviswpf/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Allgemeine Informationen über eine Assembly werden über die folgenden
+// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+// die mit einer Assembly verknüpft sind.
+[assembly: AssemblyTitle("cmtviswpf")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("cmtviswpf")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
+// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
+// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
+[assembly: ComVisible(false)]
+
+//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
+//ImCodeVerwendeteKultur in der .csproj-Datei
+//in einer fest. Wenn Sie in den Quelldateien beispielsweise Deutsch
+//(Deutschland) verwenden, legen Sie auf \"de-DE\" fest. Heben Sie dann die Auskommentierung
+//des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile,
+//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
+ //(wird verwendet, wenn eine Ressource auf der Seite
+ // oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
+ ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
+ //(wird verwendet, wenn eine Ressource auf der Seite, in der Anwendung oder einem
+ // designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
+)]
+
+
+// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+//
+// Hauptversion
+// Nebenversion
+// Buildnummer
+// Revision
+//
+// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
+// übernehmen, indem Sie "*" eingeben:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cmtviswpf/Properties/Resources.Designer.cs b/cmtviswpf/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..58ed1b9
--- /dev/null
+++ b/cmtviswpf/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// Dieser Code wurde von einem Tool generiert.
+// Laufzeitversion:4.0.30319.42000
+//
+// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+// der Code erneut generiert wird.
+//
+//------------------------------------------------------------------------------
+
+namespace cmtviswpf.Properties {
+ using System;
+
+
+ ///
+ /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
+ ///
+ // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
+ // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
+ // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
+ // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("cmtviswpf.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
+ /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/cmtviswpf/Properties/Resources.resx b/cmtviswpf/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/cmtviswpf/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/cmtviswpf/Properties/Settings.Designer.cs b/cmtviswpf/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..750c1dc
--- /dev/null
+++ b/cmtviswpf/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// Dieser Code wurde von einem Tool generiert.
+// Laufzeitversion:4.0.30319.42000
+//
+// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+// der Code erneut generiert wird.
+//
+//------------------------------------------------------------------------------
+
+namespace cmtviswpf.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/cmtviswpf/Properties/Settings.settings b/cmtviswpf/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/cmtviswpf/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cmtviswpf/Reflector.cs b/cmtviswpf/Reflector.cs
new file mode 100644
index 0000000..ae0661f
--- /dev/null
+++ b/cmtviswpf/Reflector.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Reflection;
+
+namespace FolderSelect
+{
+ ///
+ /// This class is from the Front-End for Dosbox and is used to present a 'vista' dialog box to select folders.
+ /// Being able to use a vista style dialog box to select folders is much better then using the shell folder browser.
+ /// http://code.google.com/p/fed/
+ ///
+ /// Example:
+ /// var r = new Reflector("System.Windows.Forms");
+ ///
+ public class Reflector
+ {
+ #region variables
+
+ string m_ns;
+ Assembly m_asmb;
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Constructor
+ ///
+ /// The namespace containing types to be used
+ public Reflector(string ns)
+ : this(ns, ns)
+ { }
+
+ ///
+ /// Constructor
+ ///
+ /// A specific assembly name (used if the assembly name does not tie exactly with the namespace)
+ /// The namespace containing types to be used
+ public Reflector(string an, string ns)
+ {
+ m_ns = ns;
+ m_asmb = null;
+ foreach (AssemblyName aN in Assembly.GetExecutingAssembly().GetReferencedAssemblies())
+ {
+ if (aN.FullName.StartsWith(an))
+ {
+ m_asmb = Assembly.Load(aN);
+ break;
+ }
+ }
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Return a Type instance for a type 'typeName'
+ ///
+ /// The name of the type
+ /// A type instance
+ public Type GetType(string typeName)
+ {
+ Type type = null;
+ string[] names = typeName.Split('.');
+
+ if (names.Length > 0)
+ type = m_asmb.GetType(m_ns + "." + names[0]);
+
+ for (int i = 1; i < names.Length; ++i) {
+ type = type.GetNestedType(names[i], BindingFlags.NonPublic);
+ }
+ return type;
+ }
+
+ ///
+ /// Create a new object of a named type passing along any params
+ ///
+ /// The name of the type to create
+ ///
+ /// An instantiated type
+ public object New(string name, params object[] parameters)
+ {
+ Type type = GetType(name);
+
+ ConstructorInfo[] ctorInfos = type.GetConstructors();
+ foreach (ConstructorInfo ci in ctorInfos) {
+ try {
+ return ci.Invoke(parameters);
+ } catch { }
+ }
+
+ return null;
+ }
+
+ ///
+ /// Calls method 'func' on object 'obj' passing parameters 'parameters'
+ ///
+ /// The object on which to excute function 'func'
+ /// The function to execute
+ /// The parameters to pass to function 'func'
+ /// The result of the function invocation
+ public object Call(object obj, string func, params object[] parameters)
+ {
+ return Call2(obj, func, parameters);
+ }
+
+ ///
+ /// Calls method 'func' on object 'obj' passing parameters 'parameters'
+ ///
+ /// The object on which to excute function 'func'
+ /// The function to execute
+ /// The parameters to pass to function 'func'
+ /// The result of the function invocation
+ public object Call2(object obj, string func, object[] parameters)
+ {
+ return CallAs2(obj.GetType(), obj, func, parameters);
+ }
+
+ ///
+ /// Calls method 'func' on object 'obj' which is of type 'type' passing parameters 'parameters'
+ ///
+ /// The type of 'obj'
+ /// The object on which to excute function 'func'
+ /// The function to execute
+ /// The parameters to pass to function 'func'
+ /// The result of the function invocation
+ public object CallAs(Type type, object obj, string func, params object[] parameters)
+ {
+ return CallAs2(type, obj, func, parameters);
+ }
+
+ ///
+ /// Calls method 'func' on object 'obj' which is of type 'type' passing parameters 'parameters'
+ ///
+ /// The type of 'obj'
+ /// The object on which to excute function 'func'
+ /// The function to execute
+ /// The parameters to pass to function 'func'
+ /// The result of the function invocation
+ public object CallAs2(Type type, object obj, string func, object[] parameters) {
+ MethodInfo methInfo = type.GetMethod(func, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+ return methInfo.Invoke(obj, parameters);
+ }
+
+ ///
+ /// Returns the value of property 'prop' of object 'obj'
+ ///
+ /// The object containing 'prop'
+ /// The property name
+ /// The property value
+ public object Get(object obj, string prop)
+ {
+ return GetAs(obj.GetType(), obj, prop);
+ }
+
+ ///
+ /// Returns the value of property 'prop' of object 'obj' which has type 'type'
+ ///
+ /// The type of 'obj'
+ /// The object containing 'prop'
+ /// The property name
+ /// The property value
+ public object GetAs(Type type, object obj, string prop) {
+ PropertyInfo propInfo = type.GetProperty(prop, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+ return propInfo.GetValue(obj, null);
+ }
+
+ ///
+ /// Returns an enum value
+ ///
+ /// The name of enum type
+ /// The name of the value
+ /// The enum value
+ public object GetEnum(string typeName, string name) {
+ Type type = GetType(typeName);
+ FieldInfo fieldInfo = type.GetField(name);
+ return fieldInfo.GetValue(null);
+ }
+
+ #endregion
+
+ }
+}
diff --git a/cmtviswpf/WebBrowserUtility.cs b/cmtviswpf/WebBrowserUtility.cs
new file mode 100644
index 0000000..6ea01b5
--- /dev/null
+++ b/cmtviswpf/WebBrowserUtility.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace cmtviswpf
+{
+ public class WebBrowserUtility
+ {
+ public static readonly DependencyProperty BindableSourceProperty =
+ DependencyProperty.RegisterAttached("BindableSource", typeof(string), typeof(WebBrowserUtility), new UIPropertyMetadata(null, BindableSourcePropertyChanged));
+
+ public static string GetBindableSource(DependencyObject obj)
+ {
+ return (string)obj.GetValue(BindableSourceProperty);
+ }
+
+ public static void SetBindableSource(DependencyObject obj, string value)
+ {
+ obj.SetValue(BindableSourceProperty, value);
+ }
+
+ public static void BindableSourcePropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
+ {
+ WebBrowser browser = o as WebBrowser;
+ if (browser != null)
+ {
+ string uri = e.NewValue as string;
+ browser.Source = uri != null ? new Uri(uri) : null;
+ }
+ }
+
+
+ }
+}
diff --git a/cmtviswpf/cmtviswpf.csproj b/cmtviswpf/cmtviswpf.csproj
new file mode 100644
index 0000000..26a79ca
--- /dev/null
+++ b/cmtviswpf/cmtviswpf.csproj
@@ -0,0 +1,150 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {FD3934D0-7922-46CD-8F60-4BCCBBEAAEF8}
+ WinExe
+ Properties
+ cmtviswpf
+ cmtviswpf
+ v4.5
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ false
+
+ veröffentlichen\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 2
+ 1.0.0.%2a
+ false
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ About.xaml
+
+
+
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+
+ False
+ Microsoft .NET Framework 4.5 %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/cmtviswpf/cmtviswpf.csproj.user b/cmtviswpf/cmtviswpf.csproj.user
new file mode 100644
index 0000000..dced757
--- /dev/null
+++ b/cmtviswpf/cmtviswpf.csproj.user
@@ -0,0 +1,13 @@
+
+
+
+ veröffentlichen\
+
+
+
+
+
+ de-DE
+ false
+
+
\ No newline at end of file