示例#1
0
        static void Main(string[] args)
        {
            ConnectionApi.Configure();

            //GetAllNotesTest();
            PostNote();

            Console.ReadKey();
        }
        public MultiNotesMainWindow()
        {
            InitializeComponent();
            ConnectionApi.Configure();
            var vm = new MainWindowViewModel(Close);

            DataContext = vm;

            MinimizeToTray.Enable(this);

            WindowStartupLocation = WindowStartupLocation.CenterScreen;
        }
示例#3
0
        public MultiNotesLoginWindow()
        {
            InitializeComponent();
            ConnectionApi.Configure();
            var vm = new LoginViewModel(Close);

            DataContext = vm;

            // Manually alter window height and width
            SizeToContent = SizeToContent.Manual;
            // Automatically resize height relative to content
            SizeToContent = SizeToContent.Height;

            WindowStartupLocation = WindowStartupLocation.CenterScreen;
        }
示例#4
0
        public async void Register(string email, string password)
        {
            ConnectionApi.Configure();
            var methods = new UserMethod(ConnectionApi.HttpClient);

            try
            {
                await methods.Register(email, password);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            var loginWindow = new MultiNotesLoginWindow();

            loginWindow.Show();
            _closeAction.Invoke();
        }
示例#5
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            ConnectionApi.Configure();

            MakeLoginTask();
        }