Beispiel #1
0
        private void Window_Closing(object sender, CancelEventArgs e)
        {
            var userPrefs = new UserPreferences
            {
                WindowHeight = Height,
                WindowWidth  = Width,
                WindowTop    = Top,
                WindowLeft   = Left,
                WindowState  = WindowState
            };

            userPrefs.Save();
            Settings.Default.role = "";
        }
Beispiel #2
0
        public MainWindow()
        {
            InitializeComponent();
            sp = new SmartCardOperation();

            var userPrefs = new UserPreferences();

            Height      = userPrefs.WindowHeight;
            Width       = userPrefs.WindowWidth;
            Top         = userPrefs.WindowTop;
            Left        = userPrefs.WindowLeft;
            WindowState = userPrefs.WindowState;
            CheckRole();
        }