Ejemplo n.º 1
0
        /// <summary>
        /// Loads all objects from the given file, taking care of file version mismatches.
        /// </summary>
        /// <param name="filename">file to load</param>
        /// <returns>list of loaded objects</returns>
        public static List <AnnoObject> LoadLayout(string filename)
        {
            // try to load file version
            var layoutVersion = LoadFromFile <LayoutVersionContainer>(filename);

            // show message if file versions don't match or if loading of the file version failed
            if (layoutVersion.FileVersion != Constants.FileVersion)
            {
                if (MessageBox.Show(
                        "Try loading anyway?\nThis is very likely to fail or result in strange things happening.",
                        "File version mismatch", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
                {
                    return(null);
                }
            }
            // try to load layout
            var layout = LoadFromFile <SavedLayout>(filename);

            // use fallback for old layouts
            return(layout.Objects ?? LoadFromFile <List <AnnoObject> >(filename));
        }
Ejemplo n.º 2
0
 public void ResetNetwork()
 {
     NetworkFactory.ResetAdHocNetwork(Variables.AdHocStatusFile, App.ActivityLogFileName);
     MessageBox.Show("Gelieve uw computer te herstarten alvorens een nieuwe wedstrijd te starten of een wedstrijd te hervatten!", "Belangrijk", MessageBoxButton.OK, MessageBoxImage.Exclamation);
 }
Ejemplo n.º 3
0
 private void ExportData()
 {
     MessageBox.Show("This feature is yet to be implemented...", "Coming soon");
 }