internal FinancialPlanVM(ClientReportVM ContextModel) { _CurrentPRI = ContextModel.RiscLev; _CurrentPortfel = Convert.ToDouble(ClientReportVM.AllPortfelSumminUSD); IsEnabledTextBoxs = true; CurrentPRI = 1; CurrentPortfel = 1000000; Target = 50; TargetTime = 5; MinEtf = new ObservableCollection <model.Chart>(); MaxEtf = new ObservableCollection <model.Chart>(); MiddleEtf = new ObservableCollection <model.Chart>(); GoodScreenAnnotation = string.Empty; NormalScreenAnnotation = string.Empty; BadScreenAnnotation = string.Empty; }
private async void enterClient_Click(object sender, RoutedEventArgs e) { enterClient.IsEnabled = false; rotIMG.Visibility = Visibility.Visible; DoubleAnimation animation = new DoubleAnimation { From = 0, To = 360, Duration = new Duration(TimeSpan.FromSeconds(1)), RepeatBehavior = RepeatBehavior.Forever }; rotate.BeginAnimation(RotateTransform.AngleProperty, animation); await GetClientInfoinDAL(clientLOG.Text, Hash.GetHash(PassBox.Password)); if (Storage.datasetKlient.Tables["ClientInfo"].Rows.Count > 0) { if (savePass.IsChecked == true) { Settings1.Default.Login = clientLOG.Text; Settings1.Default.Password = PassBox.Password; Settings1.Default.Save(); } StartQute(); chat = new ClientChatModel(); reportVM = new ClientReportVM(chat); ClientWindow newClientWindow = new ClientWindow(); //DALs.InterfaceService.Page_Location_Visibly.SetWinVisible(newClientWindow); await ModelCreating(); Hide(); newClientWindow.DataContext = reportVM; newClientWindow.WindowState = WindowState.Maximized; newClientWindow.Show(); } else { errorClient.Visibility = Visibility.Visible; enterClient.IsEnabled = true; } }