예제 #1
0
        private void FillForm()
        {
            //this is not refined enough to be called more than once on the form because it will not
            //remember the toolbars that were selected.
            ToolButItems.RefreshCache();
            ProgramProperties.RefreshCache();
            textProgName.Text      = ProgramCur.ProgName;
            textProgDesc.Text      = ProgramCur.ProgDesc;
            checkEnabled.Checked   = ProgramCur.Enabled;
            textPath.Text          = ProgramCur.Path;
            textCommandLine.Text   = ProgramCur.CommandLine;
            textPluginDllName.Text = ProgramCur.PluginDllName;
            textNote.Text          = ProgramCur.Note;
            List <ToolButItem> itemsForProgram = ToolButItems.GetForProgram(ProgramCur.ProgramNum);

            listToolBars.Items.Clear();
            for (int i = 0; i < Enum.GetNames(typeof(ToolBarsAvail)).Length; i++)
            {
                listToolBars.Items.Add(Enum.GetNames(typeof(ToolBarsAvail))[i]);
            }
            for (int i = 0; i < itemsForProgram.Count; i++)
            {
                listToolBars.SetSelected((int)itemsForProgram[i].ToolBar, true);
            }
            if (itemsForProgram.Count > 0)          //the text on all buttons will be the same for now
            {
                textButtonText.Text = itemsForProgram[0].ButtonText;
            }
            FillGrid();
        }
예제 #2
0
        private void FillForm()
        {
            //this is not refined enough to be called more than once on the form because it will not
            //remember the toolbars that were selected.
            ToolButItems.RefreshCache();
            ProgramProperties.RefreshCache();
            textProgName.Text      = ProgramCur.ProgName;
            textProgDesc.Text      = ProgramCur.ProgDesc;
            checkEnabled.Checked   = ProgramCur.Enabled;
            textPath.Text          = ProgramCur.Path;
            textCommandLine.Text   = ProgramCur.CommandLine;
            textPluginDllName.Text = ProgramCur.PluginDllName;
            textNote.Text          = ProgramCur.Note;
            pictureBox.Image       = PIn.Bitmap(ProgramCur.ButtonImage);
            List <ToolButItem> itemsForProgram = ToolButItems.GetForProgram(ProgramCur.ProgramNum);

            listToolBars.Items.Clear();
            for (int i = 0; i < Enum.GetNames(typeof(ToolBarsAvail)).Length; i++)
            {
                listToolBars.Items.Add(Enum.GetNames(typeof(ToolBarsAvail))[i]);
            }
            for (int i = 0; i < itemsForProgram.Count; i++)
            {
                listToolBars.SetSelected((int)itemsForProgram[i].ToolBar, true);
            }
            if (!AllowToolbarChanges)             //As we add more static bridges, we will need to enhance this to show/hide controls as needed.
            {
                listToolBars.ClearSelected();
                listToolBars.Enabled = false;
            }
            if (itemsForProgram.Count > 0)          //the text on all buttons will be the same for now
            {
                textButtonText.Text = itemsForProgram[0].ButtonText;
            }
            FillGrid();
        }