Ejemplo n.º 1
0
 public void AddTaskPane()
 {
     tpv = iSwApp.CreateTaskpaneView2("", "FTL VAME Explorer");
     tpv.ShowView();
     tph = tpv.AddControl("TestPane", "");
     tph.getSwApp(iSwApp);
     tph.getSwAddin(this);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Activates the application-level tab of the Task Pane view and makes the view visible.
 /// </summary>
 /// <returns>True if application-level tab of the Task Pane view is visible, false if not</returns>
 public bool ShowView()
 {
     if (EleHost.Child == null)
     {
         AddWPFHostControl();
     }
     return(TaskpaneView.ShowView());
 }
Ejemplo n.º 3
0
        public void CreerTaskpane()
        {
            String     codeBase      = System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
            UriBuilder uri           = new UriBuilder(codeBase);
            String     CheminDossier = Path.GetDirectoryName(Uri.UnescapeDataString(uri.Path));

            String CheminImageOngletLog       = Path.Combine(CheminDossier, "Icon_OngletLog." + ImageFormat.Bmp.ToString().ToLower());
            String CheminImageOngletParametre = Path.Combine(CheminDossier, "Icon_OngletParametre." + ImageFormat.Bmp.ToString().ToLower());
            String CheminImageOngletDessin    = Path.Combine(CheminDossier, "Icon_OngletDessin." + ImageFormat.Bmp.ToString().ToLower());

            Image ImgOngletLog       = "L".eConvertirEnBmp(18, 16);
            Image ImgOngletParametre = "P".eConvertirEnBmp(18, 16);
            Image ImgOngletDessin    = "D".eConvertirEnBmp(18, 16);

            ImgOngletLog.Save(CheminImageOngletLog, ImageFormat.Bmp);
            ImgOngletParametre.Save(CheminImageOngletParametre, ImageFormat.Bmp);
            ImgOngletDessin.Save(CheminImageOngletDessin, ImageFormat.Bmp);

            _TaskpaneOngletParametres = App.Sw.CreateTaskpaneView2(CheminImageOngletParametre, "Parametres");
            _TaskpaneOngletDessin     = App.Sw.CreateTaskpaneView2(CheminImageOngletDessin, "Dessin");
            _TaskpaneOngletLog        = App.Sw.CreateTaskpaneView2(CheminImageOngletLog, "Log");

            _OngletLog        = new OngletLog();
            _OngletParametres = new OngletParametres(App.Sw);
            _OngletDessin     = new OngletDessin(App.Sw);

            _TaskpaneOngletParametres.DisplayWindowFromHandlex64(_OngletParametres.Handle.ToInt64());
            _TaskpaneOngletDessin.DisplayWindowFromHandlex64(_OngletDessin.Handle.ToInt64());
            _TaskpaneOngletLog.DisplayWindowFromHandlex64(_OngletLog.Handle.ToInt64());

            App.Sw.ActiveDocChangeNotify      += _OngletParametres.ActiveDocChange;
            App.Sw.ActiveModelDocChangeNotify += _OngletParametres.ActiveDocChange;
            App.Sw.FileCloseNotify            += _OngletParametres.CloseDoc;

            App.Sw.ActiveDocChangeNotify      += _OngletDessin.ActiveDocChange;
            App.Sw.ActiveModelDocChangeNotify += _OngletDessin.ActiveDocChange;
            App.Sw.FileCloseNotify            += _OngletDessin.CloseDoc;

            App.Sw.ActiveDocChangeNotify      += _OngletParametres.Rechercher_Propriete_Modele;
            App.Sw.ActiveModelDocChangeNotify += _OngletParametres.Rechercher_Propriete_Modele;
            App.Sw.FileCloseNotify            += delegate(String nomFichier, int raison) { return(_OngletParametres.Rechercher_Propriete_Modele()); };

            WindowLog.Text += delegate(String t, Boolean Ajouter)
            {
                if (Ajouter)
                {
                    _OngletLog.Texte.AppendText(t + System.Environment.NewLine);
                }
                else
                {
                    _OngletLog.Texte.Text = t;
                }

                _OngletLog.Texte.SelectionStart = _OngletLog.Texte.TextLength;
                _OngletLog.Texte.ScrollToCaret();
                _OngletLog.Refresh();
            };

            WindowLog.Afficher += delegate()
            {
                _TaskpaneOngletLog.ShowView();
                _OngletLog.Refresh();
            };
        }
Ejemplo n.º 4
0
 public void AddTaskPane()
 {
     tpv = iSwApp.CreateTaskpaneView2("", "FTL VAME Explorer");
     tpv.ShowView();
     tph = tpv.AddControl("TestPane", "");
     tph.getSwApp(iSwApp);
     tph.getSwAddin(this);
 }