private void btnLocalPreview_Click(object sender, EventArgs e)
        {
            //TODO: We really want to do this as an external process

            var dlg = new MaestroFsPreview.MainForm(_edsvc);

            dlg.FeatureSourceID = _fs.ResourceID;
            dlg.ShowDialog();

            /*
             * string exe = PropertyService.Get(ConfigProperties.LocalFsPreviewPath, string.Empty);
             *
             * if (!File.Exists(exe))
             * {
             *  using (var dlg = DialogFactory.OpenFile())
             *  {
             *      dlg.Title = string.Format(Strings.LocateExecutable, "MaestroFsPreview.exe"); //NOXLATE
             *      dlg.Filter = Strings.FilterExecutables;
             *      if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             *      {
             *          exe = dlg.FileName;
             *          PropertyService.Set(ConfigProperties.LocalFsPreviewPath, exe);
             *      }
             *  }
             * }
             *
             * var procInfo = new ProcessStartInfo(exe);
             * procInfo.WorkingDirectory = Path.GetDirectoryName(exe);
             * var conn = _fs.CurrentConnection;
             * var clonep = conn.CloneParameters;
             *
             * List<string> args = new List<string>();
             * foreach (string key in clonep.Keys)
             * {
             *  args.Add("-" + key + ":" + clonep[key]); //NOXLATE
             * }
             * procInfo.Arguments = string.Join(" ", args.ToArray()); //NOXLATE
             * var proc = Process.Start(procInfo);
             */
        }
Beispiel #2
0
        private void btnLocalPreview_Click(object sender, EventArgs e)
        {
            //TODO: We really want to do this as an external process

            var dlg = new MaestroFsPreview.MainForm(_fsvc, _rsvc);
            dlg.FeatureSourceID = _fs.ResourceID;
            dlg.ShowDialog();

            /*
            string exe = PropertyService.Get(ConfigProperties.LocalFsPreviewPath, string.Empty);

            if (!File.Exists(exe))
            {
                using (var dlg = DialogFactory.OpenFile())
                {
                    dlg.Title = string.Format(Strings.LocateExecutable, "MaestroFsPreview.exe"); //NOXLATE
                    dlg.Filter = Strings.FilterExecutables;
                    if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        exe = dlg.FileName;
                        PropertyService.Set(ConfigProperties.LocalFsPreviewPath, exe);
                    }
                }
            }

            var procInfo = new ProcessStartInfo(exe);
            procInfo.WorkingDirectory = Path.GetDirectoryName(exe);
            var conn = _fs.CurrentConnection;
            var clonep = conn.CloneParameters;

            List<string> args = new List<string>();
            foreach (string key in clonep.Keys)
            {
                args.Add("-" + key + ":" + clonep[key]); //NOXLATE
            }
            procInfo.Arguments = string.Join(" ", args.ToArray()); //NOXLATE
            var proc = Process.Start(procInfo);
             */
        }