示例#1
0
 public static UnicontaManager GetInstance()
 {
     if (_instance == null)
     {
         _instance = new UnicontaManager();
     }
     return(_instance);
 }
示例#2
0
        private async void LoginBtn_Click(object sender, RoutedEventArgs e)
        {
            var username = UsernameTextbox.Text;
            var password = PasswordTextbox.Password;

            var loggedIn = await UnicontaManager.GetInstance().Login(username, password);

            if (!loggedIn)
            {
                MessageBox.Show("Failed to log in.", "Error");
                return;
            }

            new LoggedInWindow().Show();
            this.Close();
        }
示例#3
0
 public MainWindow()
 {
     InitializeComponent();
     UnicontaManager.GetInstance().Initialize();
 }
        protected override async void OnClosed(EventArgs e)
        {
            await UnicontaManager.GetInstance().Logout();

            base.OnClosed(e);
        }
        public LoggedInWindow()
        {
            InitializeComponent();

            var api = UnicontaManager.GetInstance().CrudAPI;
        }