Esempio n. 1
0
        private void GenerateFileMaskEntry(ref Table table, string name, string label, string val,int xPos,bool enabled,string tooltip)
        {
            xPos = xPos+3;
            Label lblApp = new Label(label);
            lblApp.Xalign = 1;
            lblApp.Yalign = 0.5F;
            lblApp.WidthRequest = 115;
            if(table.Name != "table1")
                lblApp.WidthRequest = 114;

            FileMaskEntry fmEntry = new FileMaskEntry(MainClass.Settings.ProjectMaskDirectory,dpd.Project,parentWindow);
            fmEntry.Name = name;
            fmEntry.IsFolder = false;
            fmEntry.Sensitive = enabled;
            if(!String.IsNullOrEmpty(tooltip))
                fmEntry.TooltipText = tooltip;

            if (!String.IsNullOrEmpty(val)){
                fmEntry.DefaultPath = dpd.Project.ConvertProjectMaskPathToFull(val);
                fmEntry.VisiblePath = val;
            }else {
                string projectPlatform = System.IO.Path.Combine( dpd.Project.AbsolutProjectDir,"Platform");

                if (!Directory.Exists(projectPlatform))
                    fmEntry.SetDefaultPathInvisible(dpd.Project.AbsolutProjectDir);
                else fmEntry.SetDefaultPathInvisible(projectPlatform);
            }

            table.Attach(lblApp,0,1,(uint)(xPos-1),(uint)xPos,AttachOptions.Fill,AttachOptions.Shrink,0,0);
            table.Attach(fmEntry,1,2,(uint)(xPos-1),(uint)xPos,AttachOptions.Expand|AttachOptions.Fill,AttachOptions.Expand,0,0);
        }