예제 #1
0
        private void OpenSharedProjectBtn_Click(object sender, RoutedEventArgs e)
        {
            Button b = sender as Button;

            if (b == null)
            {
                return;
            }
            StackPanel s = b.Content as StackPanel;

            if (s == null)
            {
                return;
            }
            ProjectVM pvm = s.DataContext as ProjectVM;

            if (pvm == null)
            {
                return;
            }
            SharedProjectPage mpp = new SharedProjectPage(pvm);

            mpp.Show();
            this.Close();
        }
예제 #2
0
        private void ProfileBtnClick(object sender, RoutedEventArgs e)
        {
            var myWindow = Window.GetWindow(this);

            myWindow.Visibility = Visibility.Collapsed;
            if (Cache.Instance.isManagerOfCurrentProject)
            {
                ManagedProjectPage page = new ManagedProjectPage(Cache.Instance.currentProject);
                page.Show();
            }
            else
            {
                SharedProjectPage page = new SharedProjectPage(Cache.Instance.currentProject);
                page.Show();
            }
            myWindow.Close();
        }