// For IContent implementation
        public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
        {
            // Refresh binding
            loginHistoryList.Items.Refresh();

            // Resize columns
            GridView gv = loginHistoryList.View as GridView;

            if (gv != null)
            {
                foreach (var c in gv.Columns)
                {
                    // Same code that is executed when gripper is double clicked
                    if (double.IsNaN(c.Width))
                    {
                        c.Width = c.ActualWidth;
                    }
                    c.Width = double.NaN;
                }
            }

            // Set DisplayDate to current day each time user navigates here
            (this.DataContext as HistoryViewModel).DisplayDate = DateTime.Today;

            return;
        }
Exemple #2
0
        public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
        {
            try
            {
                if (e.NavigationType == FirstFloor.ModernUI.Windows.Navigation.NavigationType.New)
                {
                    if (string.IsNullOrWhiteSpace(Properties.Settings.Default.ServerUri) == false)
                    {
                        projectsUri = new SvnUriTarget(Properties.Settings.Default.ServerUri + "/projects");

                        textBoxWorkSpace.Text = textBoxProjectRoot.Text + @"\";
                        if (backgroundWorkerCheckOut.IsBusy == false)
                        {
                            progressBarMain.Visibility = System.Windows.Visibility.Visible;

                            backgroundWorkerCheckOut.RunWorkerAsync(new CheckOutArguments(JobType.Load));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ModernDialog.ShowMessage(ex.Message, "Error Loading Page", MessageBoxButton.OK);
                logger.Error(ex, "Error Loading Page");
            }
        }
Exemple #3
0
        public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
        {
            if (IDEProject.inst() == null)
            {
                IDEProject.open();
                System.Windows.Forms.FolderBrowserDialog dlg = new System.Windows.Forms.FolderBrowserDialog();
                if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    IDEProject.inst().Settings   = IDESettings.GetOrCreate(dlg.SelectedPath);
                    IDEProject.inst().ProjectDir = dlg.SelectedPath;
                    UserData.inst().AddRecentFile(dlg.SelectedPath);
                }
                else
                {
                    MainWindow.inst().ContentSource = new Uri("Screens/LaunchScreen.xaml", UriKind.Relative);
                    IDEProject.inst().destroy();
                    return;
                }
            }

            if (IDEProject.inst() == null)
            {
                project_ = new IDEProject();
            }
            else
            {
                project_ = IDEProject.inst();
            }
            if (folder_ == null)
            {
                folder_ = new Folder {
                    Path = project_.ProjectDir
                }
            }
            ;
            fileTree.DataContext         = folder_;
            objectTree.DataContext       = IDEProject.inst();
            txtConsole.DataContext       = IDEProject.inst();
            gridErrors.DataContext       = IDEProject.inst();
            errorTabCount.DataContext    = IDEProject.inst();
            stackErrorHeader.DataContext = IDEProject.inst();

            eventsDoc.Tree.DataContext = IDEProject.inst().Documentation.DocumentNode.Children[0];
            eventsDoc.CommandText      = new string[] { "Copy Subscription", "Copy Unsubscription" };
            eventsDoc.CommandFormats   = new string[] { "SubscribeToEvent(\"{0}\",\"Handle{0}\");", "UnsubscribeFromEvent(\"Handle{0}\");" };
            eventsDoc.LowerText        = new string[] { "Copy event getter" };
            eventsDoc.LowerCommands    = new string[] { "eventData[\"{0}\"];" };

            attrDoc.Tree.DataContext   = IDEProject.inst().Documentation.DocumentNode.Children[1];
            scriptDoc.Tree.DataContext = IDEProject.inst().Documentation.DocumentNode.Children[2];
            //eventsDoc.MiddleMenuBuilder = new Controls.EventSubscriptionDocMenu();
            //eventsDoc.BottomMenuBuilder = new Controls.EventDataDocMenu();
            //eventsDoc.Root = IDEProject.inst().Documentation.DocumentNode.Children[0];
            //attrDoc.Shallow = true;
            //attrDoc.MiddleMenuBuilder = new Controls.AttrDocMenu();
            //attrDoc.Root = IDEProject.inst().Documentation.DocumentNode.Children[1];
            //scriptDoc.Shallow = true;
            //scriptDoc.Root = IDEProject.inst().Documentation.DocumentNode.Children[2];
        }
Exemple #4
0
 // Load
 public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     _source          = new CancellationTokenSource();
     _file            = new RunUserControlViewModel();
     this.DataContext = _file;
     _dataTable       = new DataTable();
     SetBusyIndicator(false, "Ready");
 }
 /// <summary>
 /// Called when a this instance becomes the active content in a frame.
 /// </summary>
 /// <param name="e">An object that contains the navigation data.</param>
 public void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Source.OriginalString != null)
     {
         var file = e.Source.OriginalString.Split('=').Last();
         this.DataContext = new DataPagesViewModel(file);
     }
 }
Exemple #6
0
 public override void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     CustomMeetings = new ObservableCollection <LyncMeeting>(ApplicationSettings.CustomMeetings.OrderBy(cm => cm.Description));
     CustomMeetings.CollectionChanged += (sender, args) =>
     {
         ApplicationSettings.CustomMeetings = CustomMeetings.ToList();
         ApplicationSettings.Save();
     };
 }
Exemple #7
0
        public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
        {
            try
            {
                if (e.NavigationType == FirstFloor.ModernUI.Windows.Navigation.NavigationType.New)
                {
                    if (comboBoxProductGroupList.HasItems == false)
                    {
                        comboBoxProductGroupList.Items.Add(Properties.Resources.ProductGroup_Projects);
                        comboBoxProductGroupList.Items.Add(Properties.Resources.ProductGroup_ServiceAsset);
                        comboBoxProductGroupList.Items.Add(Properties.Resources.ProductGroup_Other);
                    }
                    if (comboBoxServerUriList.HasItems == false)
                    {
                        comboBoxServerUriList.Items.Add(Properties.Resources.ServerUri_SriLanka);
                        comboBoxServerUriList.Items.Add(Properties.Resources.ServerUri_Sweden);
                    }

                    if (string.IsNullOrWhiteSpace(Properties.Settings.Default.ServerUri) == false)
                    {
                        if (Properties.Resources.ServerUri_SriLanka.Contains(Properties.Settings.Default.ServerUri))
                        {
                            comboBoxServerUriList.SelectedValue = Properties.Resources.ServerUri_SriLanka;
                        }
                        else if (Properties.Resources.ServerUri_Sweden.Contains(Properties.Settings.Default.ServerUri))
                        {
                            comboBoxServerUriList.SelectedValue = Properties.Resources.ServerUri_Sweden;
                        }
                    }


                    if (string.IsNullOrWhiteSpace(Properties.Settings.Default.SupportPerson) == false)
                    {
                        if (Properties.Settings.Default.SupportPerson == Properties.Resources.SupportPerson_Projects)
                        {
                            comboBoxProductGroupList.SelectedValue = Properties.Resources.ProductGroup_Projects;
                        }
                        else if (Properties.Settings.Default.SupportPerson == Properties.Resources.SupportPerson_ServiceAsset)
                        {
                            comboBoxProductGroupList.SelectedValue = Properties.Resources.ProductGroup_ServiceAsset;
                        }
                        else if (Properties.Settings.Default.SupportPerson == Properties.Resources.SupportPerson_Other)
                        {
                            comboBoxProductGroupList.SelectedValue = Properties.Resources.ProductGroup_Other;
                        }
                    }
                }
            }
            catch (Exception error)
            {
                ModernDialog.ShowMessage(error.Message, "Error Loading", MessageBoxButton.OK);
            }
        }
        public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
        {
            //// This is implemented with DataContext == null on first event ever so we use DataContextChanged instead
            ////Console.WriteLine("OnNavigatedTo with datacontext == null");

            if (DataContext != null)
            {
                var vm = DataContext as LoadUnloadCommands;

                if (vm != null)
                {
                    vm.LoadedCommand();
                }
            }
        }
Exemple #9
0
        public async void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
        {
            try
            {
                using (var channelsService = new ChannelsService())
                {
                    ChannelLoadingProgress.IsActive = true;
                    ChannelsListView.ItemsSource    = await channelsService.GetChannels();

                    ChannelLoadingProgress.IsActive = false;
                }
            }
            catch (Exception ex)
            {
                ModernDialog.ShowMessage(ex.Message, "Error", MessageBoxButton.OK);
            }
        }
Exemple #10
0
 private void Frame_Navigated(object sender, FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     /*
      * ModernFrame control = (ModernFrame)sender;
      * var type = control.Content.GetType();
      * if(type.Name=="SeaReferance")
      * {
      *  var content = (SeaReferance)control.Content;
      *  var vm = (SeaReferanceVM)content.DataContext;
      *  vm.PortType = ModelsShared.Models.PortType.Sea;
      *  viewmodel.SetReferance(vm);
      * }
      * if (type.Name == "AirReferance")
      * {
      *  var content = (AirReferance)control.Content;
      *  content.PortType = ModelsShared.Models.PortType.Sea;
      * }
      */
 }
 void IContent.OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     if (Data.MovieId != -1)
     {
         if (first)
         {
             this.DataContext = new MovieDetailsViewModel(Data.MovieId);
             first            = false;
         }
         else if (Data.MovieId != MovieDetailsViewModel.CurrentId)
         {
             ((MovieDetailsViewModel)this.DataContext).SetNewMovie(Data.MovieId);
         }
     }
     else
     {
         ((ModernWindow)Application.Current.MainWindow).ContentSource = new Uri("/Views/Home.xaml", UriKind.Relative);
         ModernDialog.ShowMessage("Please select a movie first!", "No movie selected!", MessageBoxButton.OK);
     }
 }
 void IContent.OnNavigatedFrom(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
 }
        public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
        {
            if (e.NavigationType == FirstFloor.ModernUI.Windows.Navigation.NavigationType.New)
            {
                if (IDEProject.inst() == null)
                {
                    IDEProject.open();
                    System.Windows.Forms.FolderBrowserDialog dlg = new System.Windows.Forms.FolderBrowserDialog();
                    if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        IDEProject.inst().Settings   = IDESettings.GetOrCreate(dlg.SelectedPath);
                        IDEProject.inst().ProjectDir = dlg.SelectedPath;
                        UserData.inst().AddRecentFile(dlg.SelectedPath);
                    }
                    else
                    {
                        MainWindow.inst().ContentSource = new Uri("Screens/LaunchScreen.xaml", UriKind.Relative);
                        IDEProject.inst().destroy();
                        return;
                    }
                }

                if (IDEProject.inst() == null)
                {
                    project_ = new IDEProject();
                }
                else
                {
                    project_ = IDEProject.inst();
                }
                if (folder_ == null)
                {
                    folder_ = new Folder {
                        Path = project_.ProjectDir
                    }
                }
                ;
                if (fileTree.DataContext == null)
                {
                    fileTree.DataContext = folder_;
                }
                Action <object> searchAction = delegate(object o)
                {
                    if (o == null)
                    {
                        return;
                    }
                    leftSideTabs.SelectedItem = classesTab;
                    objectTree.SelectItemNamed(((PropInfo)o).Type.Name);
                };
                objectTree.DataContext    = IDEProject.inst();
                objectTree.ItemBinding    = new Binding("GlobalTypes.TypeInfo");
                objectTree.CallOnViewType = searchAction;

                globalsTree.DataContext    = IDEProject.inst();
                globalsTree.CallOnViewType = searchAction;
                globalsTree.ItemBinding    = new Binding("GlobalTypes.UIView");

                localsTree.DataContext    = IDEProject.inst();
                localsTree.CallOnViewType = searchAction;
                localsTree.ItemBinding    = new Binding("LocalTypes.AllUIView");

                txtConsole.DataContext       = IDEProject.inst();
                gridErrors.DataContext       = IDEProject.inst();
                errorTabCount.DataContext    = IDEProject.inst();
                stackErrorHeader.DataContext = IDEProject.inst();

                if (infoTabs.Items.Count == 0)
                {
                    foreach (PluginLib.IInfoTab infoTab in PluginManager.inst().InfoTabs)
                    {
                        PluginLib.IExternalControlData data = infoTab.CreateTabContent(IDEProject.inst().ProjectDir);
                        if (data == null)
                        {
                            continue;
                        }
                        TabItem item = new TabItem
                        {
                            Header  = infoTab.GetTabName(),
                            Tag     = data,
                            Content = data.Control
                        };
                        infoTabs.Items.Add(item);
                    }
                }
            }
            else
            {
                infoTabs.Items.Clear();
            }
        }
 public void OnNavigatedFrom(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     ////Console.WriteLine("OnNavigatedFrom");
 }
 public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     App.vm.Department.BeginEdit();
     App.nav.SetLastUri("/Pages/Admin/DepartmentEdit.xaml");
 }
Exemple #16
0
 void IContent.OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     //  throw new NotImplementedException();
 }
 public void OnNavigatedTo(NavigationEventArgs e)
 {
     //throw new NotImplementedException();
 }
Exemple #18
0
 public void OnNavigatedTo(NavigationEventArgs e)
 {
     UpdateSelectedCharacter();
 }
Exemple #19
0
 public void OnNavigatedFrom(NavigationEventArgs e)
 {
 }
Exemple #20
0
 private void Frame_Navigated(object sender, FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     LogMessage("Navigated: [{0}] {1}\r\n", e.NavigationType, e.Source);
 }
Exemple #21
0
        public void OnNavigatedFrom(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
        {
            Window mainWindow = Application.Current.MainWindow;

            mainWindow.Title = mainWindowHeader;
        }
Exemple #22
0
 public void OnNavigatedTo(NavigationEventArgs e)
 {
     UpdateGrid();
 }
Exemple #23
0
 public void OnNavigatedFrom(NavigationEventArgs e)
 {
     return;
 }
 void IContent.OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     //ModernDialog.ShowMessage(e.Frame.ToString(), "Sair", System.Windows.MessageBoxButton.YesNo);
 }
Exemple #25
0
 public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     ScreenExtensions.TryActivate(ViewModel);
 }
Exemple #26
0
 public void OnNavigatedFrom(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
 }
Exemple #27
0
 public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     fregmentNav.BBCode = null;
 }
 public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     _setupUserControlViewModel = new SetupUserControlViewModel(new AlertMessageService(busyIndicator, txtStatus));
     this.DataContext           = _setupUserControlViewModel;
 }
 /// <summary>
 /// The on navigated to.
 /// </summary>
 /// <param name="e">
 /// The e.
 /// </param>
 public void OnNavigatedTo(NavigationEventArgs e)
 {
     Debug.WriteLine("ResourcesControl - OnNavigatedTo");
 }
 public void OnNavigatedFrom(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     //throw new NotImplementedException();
 }
 public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     Console.WriteLine("OnNavigatedTo");
     DG1.DataContext = GetFieldsData();
     DG2.DataContext = GetProductsDetailsData();
 }
Exemple #32
0
 // For IContent implementation
 public void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     return;
 }
Exemple #33
0
 public void OnNavigatedTo(NavigationEventArgs e)
 {
 }
Exemple #34
0
 private void ModernUserControl_NavigatedTo(object sender, FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e)
 {
     Messenger.Default.Send(new object[] { "NavigatedToUser" });
 }