Пример #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();
        }