Ejemplo n.º 1
0
 ///<summary>Opens the appropriate form to edit the program property.</summary>
 private void PropertyTypeDirector(ProgramProperty prop)
 {
     if (ProgramCur.ProgName == ProgramName.XVWeb.ToString() && prop.PropertyDesc == XVWeb.ProgramProps.ImageCategory)         //imageCategory
     {
         List <Def> listDefs = Defs.GetDefsForCategory(DefCat.ImageCats, true);
         int        idxDef   = listDefs.FindIndex(x => x.DefNum == PIn.Long(prop.PropertyValue));
         InputBox   inputBox = new InputBox("Choose an Image Category", listDefs.Select(x => x.ItemName).ToList(), idxDef);
         inputBox.ShowDialog();
         if (inputBox.DialogResult != DialogResult.OK || inputBox.SelectedIndex == -1)
         {
             return;
         }
         prop.PropertyValue = POut.Long(listDefs[inputBox.SelectedIndex].DefNum);
         ProgramProperties.Update(prop);
     }
     else
     {
         bool propIsPassword        = ProgramCur.ProgName == ProgramName.XVWeb.ToString() && prop.PropertyDesc == XVWeb.ProgramProps.Password;
         FormProgramProperty FormPP = new FormProgramProperty(propIsPassword);
         FormPP.ProgramPropertyCur = prop;
         FormPP.ShowDialog();
         if (FormPP.DialogResult != DialogResult.OK)
         {
             return;
         }
     }
     ProgramProperties.RefreshCache();
     FillGrid();
 }
Ejemplo n.º 2
0
        ///<summary>Opens a form where the user can type in their selection for a program poperty.</summary>
        private void ShowFormProgramProperty(ProgramProperty programProperty)
        {
            bool propIsPassword = ProgramCur.ProgName == ProgramName.XVWeb.ToString() && programProperty.PropertyDesc == XVWeb.ProgramProps.Password;
            FormProgramProperty formProgramProperty = new FormProgramProperty(propIsPassword);

            formProgramProperty.ProgramPropertyCur = programProperty;
            formProgramProperty.ShowDialog();
            if (formProgramProperty.DialogResult != DialogResult.OK)
            {
                return;
            }
            ProgramProperties.RefreshCache();
            FillGrid();
        }
Ejemplo n.º 3
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            FormProgramProperty FormPP = new FormProgramProperty();

            FormPP.ProgramPropertyCur = (ProgramProperty)ProgramPropertiesForProgram[e.Row];
            FormPP.ShowDialog();
            if (FormPP.DialogResult != DialogResult.OK)
            {
                return;
            }
            ProgramProperties.RefreshCache();
            ProgramPropertiesForProgram = ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
            FillGrid();
        }
Ejemplo n.º 4
0
        private void listProperties_DoubleClick(object sender, System.EventArgs e)
        {
            if (listProperties.SelectedIndex == -1)
            {
                return;
            }
            //ProgramProperty ProgramPropertyCur=
            FormProgramProperty FormPP = new FormProgramProperty();

            FormPP.ProgramPropertyCur = (ProgramProperty)ProgramPropertiesForProgram[listProperties.SelectedIndex];
            FormPP.ShowDialog();
            if (FormPP.DialogResult != DialogResult.OK)
            {
                return;
            }
            ProgramProperties.Refresh();
            ProgramPropertiesForProgram = ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
            listProperties.Items.Clear();
            for (int i = 0; i < ProgramPropertiesForProgram.Count; i++)
            {
                listProperties.Items.Add(((ProgramProperty)ProgramPropertiesForProgram[i]).PropertyDesc
                                         + ": " + ((ProgramProperty)ProgramPropertiesForProgram[i]).PropertyValue);
            }
        }
Ejemplo n.º 5
0
 private void gridMain_CellDoubleClick(object sender,OpenDental.UI.ODGridClickEventArgs e)
 {
     FormProgramProperty FormPP=new FormProgramProperty();
     FormPP.ProgramPropertyCur=(ProgramProperty)ProgramPropertiesForProgram[e.Row];
     FormPP.ShowDialog();
     if(FormPP.DialogResult!=DialogResult.OK) {
         return;
     }
     ProgramProperties.RefreshCache();
     ProgramPropertiesForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
     FillGrid();
 }