Esempio n. 1
0
        //Загрузка страницы с авторами
        private void BackWindow()
        {
            ExtensionView window = Application.Current.Windows.OfType <ExtensionView>().FirstOrDefault();

            window.mainGrid.Children.Clear();
            window.mainGrid.Children.Add(new Views.AuthorsView());
        }
Esempio n. 2
0
        /// <summary>
        /// Загрузка нового элемента в основное окно
        /// </summary>
        /// <param name="view"></param>
        private void LoadChild(UserControl view)
        {
            ExtensionView window = Application.Current.Windows.OfType <ExtensionView>().FirstOrDefault();

            window.mainGrid.Children.Clear();
            window.mainGrid.Children.Add(view);
        }
Esempio n. 3
0
        private void NotifyIcon_Click(object sender, System.EventArgs e)
        {
            ExtensionView window = Application.Current.Windows.OfType <ExtensionView>().FirstOrDefault();

            System.Windows.Forms.NotifyIcon icon = (System.Windows.Forms.NotifyIcon)sender;
            window.Show();
            icon.Visible = false;
        }
        void ShowDocumentation(object ob)
        {
            if (docView != null)
            {
                paned.Remove(docView);
                docView.Destroy();
                docView = null;
            }

            ITreeNavigator nav     = tree.GetSelectedNode();
            RegistryInfo   regInfo = (RegistryInfo)nav.GetParentDataItem(typeof(RegistryInfo), true);
            AddinRegistry  reg     = regInfo.CachedRegistry;

            if (ob is AddinDescription)
            {
                AddinView view = new AddinView();
                view.Fill((AddinDescription)ob);
                docView = view;
            }
            else if (ob is ExtensionPoint)
            {
                ExtensionPointView view = new ExtensionPointView();
                view.Fill((ExtensionPoint)ob, reg);
                docView = view;
            }
            else if (ob is Extension)
            {
                ExtensionView view = new ExtensionView();
                view.Fill((Extension)ob, nav);
                docView = view;
            }
            else if (ob is ExtensionNodeInfo)
            {
                ExtensionNodeView view = new ExtensionNodeView();
                view.Fill(((ExtensionNodeInfo)ob).Node);
                docView = view;
            }

            if (docView == null)
            {
                docView = new Gtk.Label();
            }

            docView.ShowAll();
            paned.Add2(docView);
        }
Esempio n. 5
0
 /// <summary>
 /// Обработка закрытия окна
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void OnWindowClosing(object sender, CancelEventArgs e)
 {
     if (NirsSystem.ProgramSettings.IsMinimizeToTray && !isExit)
     {
         ExtensionView view = (ExtensionView)sender;
         view.notifyIcon = new System.Windows.Forms.NotifyIcon();
         view.notifyIcon.BalloonTipTitle = "NirsManager";
         view.notifyIcon.Icon            = new System.Drawing.Icon("data//notifyicon.ico");
         view.notifyIcon.BalloonTipText  = "Окно свернуто, но приложение продолжает работу";
         view.notifyIcon.Text            = "Окно свернуто, но приложение продолжает работу";
         view.notifyIcon.Click          += NotifyIcon_Click;
         view.notifyIcon.Visible         = true;
         view.notifyIcon.ShowBalloonTip(1000);
         view.Hide();
         e.Cancel = true;
         return;
     }
     NirsSystem.Close();
 }
Esempio n. 6
0
 //Выполняется вход в приложение
 private void Enter()
 {
     _status = NirsSystem.Authorization(Login, Password, true);
     OnPropertyChanged("Status");
     OnPropertyChanged("StatusColor");
     if (_status != AuthorizationStatus.AuthOK)
     {
         return;
     }
     try
     {
         ExtensionView extensionView = new ExtensionView(NirsSystem.OpenUserSettings());
         extensionView.Show();
     }
     catch (NirsException exception)
     {
         NirsSystem.ErrorManager.ExecuteException(exception);
     }
     finally
     {
         MainWindow window = Application.Current.Windows.OfType <MainWindow>().FirstOrDefault();
         window.Close();
     }
 }