Exemple #1
0
        public void EditProperties()
        {
            Job job = Job.LoadFromFile(FileObject.DataDiskPath);

            if (EditPropertiesForm.Run(job, true))
            {
                job.SaveToFile(FileObject.DataDiskPath);
            }
        }
Exemple #2
0
        public void EditProperties()
        {
            object macro = XmlTool.DeserializeObject(m_file.DataDiskPath);

            if (EditPropertiesForm.Run(macro, true))
            {
                XmlTool.SerializeObject(m_file.DataDiskPath, macro);
            }
        }
Exemple #3
0
        public void EditProperties()
        {
            IAddonInstance addon = AddonBase.LoadFromFile(m_file.DataDiskPath);

            if (EditPropertiesForm.Run(addon, true))
            {
                //addon.Original = false;
                addon.SaveToFile(m_file.DataDiskPath);
            }
        }
Exemple #4
0
        public void Run()
        {
            Macro macro = Macro.LoadFromFile(m_file.DataDiskPath);
            var   inst  = macro.CreateParamsInstance();

            if (EditPropertiesForm.Run(inst, true))
            {
                macro.Run(MainWindow.Instance.Window, inst.Data);
            }
        }
Exemple #5
0
        public DynamicInstance QueryInstance()
        {
            DynamicInstance res = new DynamicInstance(this);

            if (!Empty)
            {
                if (!EditPropertiesForm.Run(res, true))
                {
                    return(null);
                }
            }
            return(res);
        }
Exemple #6
0
 public void Reformat()
 {
     if (EditPropertiesForm.Run(ReformatProps, true))
     {
         string     sql    = m_editor.Text;
         ISqlParser parser = m_dialect.CreateParser(sql);
         try
         {
             var code = parser.ParseCommand();
             if (!parser.Tokernizer.IsEof)
             {
                 throw new ParseError("DAE-00294 EOF expected");
             }
             string res = m_dialect.GenerateScript(code.GenerateSql, ReformatProps);
             m_editor.SetCodeText(res, true);
         }
         catch (Exception err)
         {
             Errors.Report(err);
         }
     }
 }