Esempio n. 1
0
        public void CreateMLOTasks(IRibbonControl control)
        {
            if (IsSetup())
            {
                var currentPage = oneNoteProvider.CurrentlyViewedPage;
                var pageContent = oneNoteProvider.GetPageContent(currentPage.ID);
                var tagIndex    = oneNoteProvider.GetPageMLOTagDef(pageContent);
                var elements    = oneNoteProvider.GetMLOTaggedElements(pageContent, tagIndex);

                foreach (var element in elements)
                {
                    string taggedItem = oneNoteProvider.GetScript(element) + oneNoteProvider.GetText(element);
                    string linkToTag  = "file:" + oneNoteProvider.GetLinkToTag(currentPage.ID, element.Attribute("objectID").Value);

                    oneNoteProvider.SetTagValue(currentPage.ID, element.Attribute("objectID").Value, tagIndex);

                    SendCommandLine(config_exe,
                                    config_datafile,
                                    config_rootguid,
                                    taggedItem,
                                    linkToTag,
                                    currentPage.Name,
                                    currentPage.SectionName,
                                    currentPage.NotebookName);
                }
            }
            else
            {
                Form setup = new frmSetup();
                setup.ShowDialog();
            }
        }
Esempio n. 2
0
 private void Setup(string barcode = "")
 {
     if (ValidateAdmin() == true)
     {
         frmSetup setup = new frmSetup();
         setup.mBarcode = barcode;
         setup.ShowDialog();
         //UpdateFoodItems();
     }
 }
Esempio n. 3
0
 public void showSetup(IRibbonControl control)
 {
     try
     {
         //MessageBox.Show("Showing JTools AddIn setup", "JTools AddIn", MessageBoxButtons.OK, MessageBoxIcon.Information);
         Form setup = new frmSetup();
         setup.ShowDialog();
     }
     catch (Exception e)
     {
         MessageBox.Show(string.Format("Error in showing setup window: {0}", e.Message), "JTools AddIn", MessageBoxButtons.OK, MessageBoxIcon.Error);
         LogAction(string.Format("Error in showing setup window: {0}", e.Message));
     }
 }
Esempio n. 4
0
        private void cmdSetup_Click(object sender, EventArgs e)
        {
            DialogResult dlgRes;

            try
            {
                dlgRes = cGlobalHandling.Frage_Passwort(
                    this.objWiegung.objSettings.get_ArbeitsplatzName,
                    /*ShoHideScale*/ false,
                    this.objWiegung.objSettings.sServicePasswort,
                    /*TerminalID*/ "",
                    /*ShowServiceMode*/ true);

                if (dlgRes == DialogResult.Ignore)
                {
                    // Invertiere den Status Service Mode
                    cData_Settings_Handling.SetSMTServiceMode(this.objWiegung.objSettings);

                    // Visuelle Anzeige das der Servicemode ein ist
                    this.RefreshServiceModeGui();

                    this.Init_ButtonBar();
                }
                else if (dlgRes == DialogResult.OK)
                {
                    frmSetup f = new frmSetup(ref this.objWiegung);
                    dlgRes = f.ShowDialog();
                    f.Dispose();
                    f = null;

                    if (dlgRes == DialogResult.OK)
                    {
                        cData_Settings_Handling.Load_Settings(this.objWiegung.objSettings);
                        this.dispTopLabelLeft.Text = this.objWiegung.objSettings.get_ArbeitsplatzName;

                        this.RefreshServiceModeGui();

                        this.Init_ButtonBar();
                    }
                }
            }
            catch (Exception ex)
            {
                SiAuto.LogException(ex);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Abre el formulario (modal) que permite configurar el controlador.
        /// </summary>
        /// <remarks>
        /// La nueva configuración tendrá efecto a la siguiente llamada al método Connect().
        /// </remarks>
        public void Setup()
        {
            frmSetup setup = new frmSetup();

            if (setup.ShowDialog() == DialogResult.OK)
            {
                // Recarga la configuración
                _controller.PortName       = _system.GetParameterString(LenzSettings.SETTING_PORT_NAME, "");
                _controller.PortSpeed      = _system.GetParameterInteger(LenzSettings.SETTING_PORT_SPEED, 9600);
                _controller.RequestTimeout = _system.GetParameterInteger(LenzSettings.SETTING_REQUEST_TIMEOUT, 90);

                // Avisa al usuario que reinicie la conexión si se encuentra el sistema conectado
                if (_controller.Connected)
                {
                    MessageBox.Show("La nueva configuración surgirá efecto cuando se abra una nueva conexión al sistema digital.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }