Ejemplo n.º 1
0
        public static void SaveMRU(ObservableCollection <CustomMenuItem> _menuitems)
        {
            List <string> _mru = new List <string>();

            foreach (CustomMenuItem mni in _menuitems)
            {
                if (!string.IsNullOrEmpty(mni.HeaderText))
                {
                    _mru.Add(mni.HeaderText);
                }
            }
            ConfigFileManager.WriteJsonList("MRUList", _mru);
        }
Ejemplo n.º 2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            App.Current.Dispatcher.UnhandledException += Dispatcher_UnhandledException;
            FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement),
                                                               new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));

            if (!ConfigFileManager.GetConfigSettings())
            {
                MessageBox.Show("Missing or damaged configuration file", "Configuration File Error", MessageBoxButton.OK, MessageBoxImage.Error);
                Shutdown();
            }
        }
Ejemplo n.º 3
0
        public AboutView()
        {
            InitializeComponent();
            //Use File Version in Application | Assembly Information
            version.Text = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion;

            licensee.Text = ConfigFileManager.ReadJsonValue("Licensee").ToString();

            if (Application.Current.Resources[Constants.eulaccepted].ToString() == "true")
            {
                closebtn.Visibility = Visibility.Visible;
            }
            else
            {
                decline.Visibility = Visibility.Visible;
                accept.Visibility  = Visibility.Visible;
            }
        }
Ejemplo n.º 4
0
 private void Accept_Click(object sender, RoutedEventArgs e)
 {
     Application.Current.Resources[Constants.eulaccepted] = "true";
     ConfigFileManager.WriteJsonValue("EulaAccepted", "true");
     Close();
 }