示例#1
0
        private void OpenMyProjectBtn_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;
            }
            ManagedProjectPage mpp = new ManagedProjectPage(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();
        }