internal void ShowNextPage(PageControl pageControl,
                                   object additionalData             = null,
                                   PageTransitionType transitionType = PageTransitionType.SlideAndFade)
        {
            Log($"{nameof(MainWindowViewModel)}.{nameof(ShowNextPage)}: Start");

            if (pageControl.Equals(Enumerations.PageControl.None))
            {
                Log($"  The page control type \"{pageControl}\" is unhandled.");
            }

            UserControl newPageControl = GetPageUserControl(pageControl, additionalData);

            if (newPageControl is null)
            {
                Log($"  The user control came back null for page type: {pageControl}");

                return;
            }

            Log($"  The page type is \"{pageControl}\".");

            if (CurrentPage.Equals(pageControl) == true)
            {
                return;
            }

            CurrentPage = pageControl;

            // The stack is only really used for going back to a previous page.
            m_PageList.Push(newPageControl);

            m_PageTransition.TransitionType = transitionType;
            m_PageTransition.ShowPage(newPageControl);

            ShowStatusMessage(string.Empty, false);

            Log($"{nameof(MainWindowViewModel)}.{nameof(ShowNextPage)}: End");
        }
        public MainViewModel(DialogService dialogService, ICacheService cacheService)
        {
            _dialogService = dialogService;
            _cacheService  = cacheService;

            CurrentPage = new PageTransition();
            HomeView homeView = new HomeView();

            CurrentPage.ShowPage(homeView);

            Task.Run(async() =>
            {
                List <string> folders = await _cacheService.GetFoldersAsync();
                Folders = new ObservableCollection <string>(folders);
            });
        }
Exemple #3
0
        public Main()
        {
            InitializeComponent();
            LoadDatas();
            PageNavigation.CurrentPage = this; // 페이지 네비게이트 현재페이지 저장용
            ft             = new FileTransferServer();
            pageNavigation = PageNavi;
            if (!ft.Connect("210.118.69.166"))
            {
                MessageBox.Show("서버 아이피 주소가 틀리거나 작동중이지 않습니다.");
            }
            login loginPage = new login();

            pageFade = pageTransitionControl;


            pageFade.ShowPage(loginPage);


            this.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(Main_MouseLeftButtonDown);
        }
        public MainWindow()
        {
            InitializeComponent();
            appSettings = SettingsHelper.LoadAppSettings(false);

            if (appSettings != null && SettingsHelper.LoadUserSettings(false) != null)
            {
                if (appSettings.SaveConnectionSettings)
                {
                    PageTransition.ShowPage(new LaunchButton());
                }
                else
                {
                    PageTransition.ShowPage(new Login());
                }
            }
            else
            {
                PageTransition.ShowPage(new Login());
            }
        }
 private void SettingsWindowButton_OnClick(object sender, RoutedEventArgs e)
 {
     PageTransition.ShowPage(new Settings());
 }
 private void LoginWindowButton_OnClick(object sender, RoutedEventArgs e)
 {
     PageTransition.ShowPage(new Login());
 }
        public AssignmentPage(DataRowView d)
        {
            InitializeComponent();
            data = d;
            PageNavigation.CurrentPage = this; // 페이지 네비게이트 현재페이지 저장용
            cpD = d;                           //연관과제에서 이벤트를 위한 내용 접근용 변수

            //#################연관과제 페이지페이드효과 ####################
            RelationProject rProject = new RelationProject();

            pt = relationPageFade;
            pt.ShowPage(rProject);//연관과제 보여주기 위한 페이지 전환
            // #################페이지페이드효과 ####################

            scon = App.scon;

            ft = Main.ft;
            Main.setAssignPage(this);


            if (d.Row[10].Equals("대기중"))
            {
                relationPageFade.IsEnabled   = false;
                btnAssignmentAgree.IsEnabled = true;
            }
            else if (d.Row[10].Equals("진행중"))
            {
                relationPageFade.IsEnabled   = true;
                btnAssignmentAgree.IsEnabled = false;
            }

            // 서버에 연결해서 경로 탐색 후 파일 이름 가져오기
            // SocketConnection();
            string fileName      = System.IO.Path.GetFileNameWithoutExtension(@d.Row[11].ToString());
            string fileExtension = System.IO.Path.GetExtension(@d.Row[11].ToString());

            // 총 11개
            // 0            1           2           3               4               5               6               7                    8                   9               10        11     12
            // wi_id    ex_pr_name  ex_pr_type  ex_description  ex_start_date   ex_end_date     ex_pr_status    ex_start_file_idx   ex_end_file_idx     ex_platform     ex_is_used(진행OR대기중)  ex_path  ex_data (과제요약)
            name.Content        = d.Row[1];
            type.Content        = d.Row[2];
            description.Content = d.Row[3];
            status.Content      = d.Row[6];

            tool.Content = d.Row[9];

            used.Content = d.Row[10];

            path = d.Row[11].ToString();



            btnDownload.Content = new TextBlock()
            {
                Text         = fileName + fileExtension,
                TextWrapping = TextWrapping.Wrap
            };


            label1.Content = "과제게시판 > 과제 DB > " + d.Row[1];
            Main.relationPage.Change_BtnContent(Main.relationPage.tbCenterText, d.Row[1].ToString()); //중심버튼 이름 바꿔주기

            if (data.Row[10].Equals("진행중"))
            {
                cloud.Run();//태그 구름 동작 메소드
                TagCloud();
                del1.Visibility = Visibility.Visible;
                del2.Visibility = Visibility.Visible;
                del3.Visibility = Visibility.Visible;
                del4.Visibility = Visibility.Visible;
                del5.Visibility = Visibility.Visible;
            }
        }
 public static void CambiarVentana(WpfPageTransitions.PageTransitionType Tipo, UserControl newPage, PageTransition pageTransitionControl)
 {
     pageTransitionControl.TransitionType = Tipo;
     pageTransitionControl.ShowPage(newPage);
 }