Exemple #1
0
        void StartMEProcess(ProjectWrapper projectWrapper, string outputFileName, string path)
        {
            try{
                var    fullPath     = projectWrapper.FullPath;
                string assemblyPath = Path.Combine(fullPath, Path.Combine(projectWrapper.OutputPath, outputFileName));
                if (!File.Exists(assemblyPath))
                {
                    MessageBox.Show(String.Format(@"Assembly {0} not found", assemblyPath), null, MessageBoxButtons.OK);
                    return;
                }

                var destFileName = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(assemblyPath) + "", Path.GetFileName(path) + ""));
                KillProcess(destFileName);
                if (path != destFileName)
                {
                    File.Copy(path, destFileName, true);
                }
                string debugMe   = Options.ReadBool(Options.DebugME)?"d":null;
                string arguments = String.Format("{0} \"{1}\" \"{3}\" \"{2}\"", debugMe, Path.GetFullPath(assemblyPath), fullPath, projectWrapper.LocalPath);
                if (File.Exists(destFileName))
                {
                    Process.Start(destFileName, arguments);
                }
                else
                {
                    MessageBox.Show(String.Format("Model editor not found at {0}", destFileName));
                }
            }
            catch (Exception e) {
                MessageBox.Show(e.ToString());
            }
        }
 public void Start(ProjectWrapper projectWrapper) {
     string outputFileName = projectWrapper.OutPutFileName;
     if (outputFileName.ToLower().EndsWith(".exe"))
         outputFileName += ".config";
     
     string path = Options.ReadString(Options.ModelEditorPath);
     if (!String.IsNullOrEmpty(path)) {
         StartMEProcess(projectWrapper, outputFileName, path);
         return;
     }
     const string modeleditorpathPathIsEmpty = "ModelEditorPath path is empty";
     MessageBox.Show(modeleditorpathPathIsEmpty);
     
 }
        void StartMEProcess(ProjectWrapper projectWrapper, string outputFileName, string path) {
            var fullPath = projectWrapper.FullPath;
            string assemblyPath = Path.Combine(fullPath, Path.Combine(projectWrapper.OutputPath, outputFileName));
            if (!File.Exists(assemblyPath)) {
                MessageBox.Show(String.Format(@"Assembly {0} not found", assemblyPath), null, MessageBoxButtons.OK);
                return;
            }

            string arguments = String.Format("\"{0}\" \"{2}\" \"{1}\"", Path.GetFullPath(assemblyPath), fullPath, projectWrapper.LocalPath);
            if (File.Exists(path))
                Process.Start(path, arguments);
            else
                MessageBox.Show(String.Format("Model editor not found at {0}", path));
        }
Exemple #4
0
 public void Start(ProjectWrapper projectWrapper) {
     string outputFileName = projectWrapper.OutPutFileName;
     if (outputFileName.ToLower().EndsWith(".exe"))
         outputFileName += ".config";
     using (var storage = new DecoupledStorage(typeof(Options))) {
         string path = storage.ReadString(Options.GetPageName(), "modelEditorPath");
         if (!String.IsNullOrEmpty(path)) {
             StartMEProcess(projectWrapper, outputFileName, path);
             return;
         }
         const string modeleditorpathPathIsEmpty = "ModelEditorPath path is empty";
         MessageBox.Show(modeleditorpathPathIsEmpty);
     }
 }
Exemple #5
0
        public void Start(ProjectWrapper projectWrapper)
        {
            string outputFileName = projectWrapper.OutPutFileName;

            if (outputFileName.ToLower().EndsWith(".exe"))
            {
                outputFileName += ".config";
            }

            string path = Options.ReadString(Options.ModelEditorPath);

            if (!String.IsNullOrEmpty(path))
            {
                StartMEProcess(projectWrapper, outputFileName, path);
                return;
            }
            const string modeleditorpathPathIsEmpty = "ModelEditorPath path is empty";

            MessageBox.Show(modeleditorpathPathIsEmpty);
        }
Exemple #6
0
        void StartMEProcess(ProjectWrapper projectWrapper, string outputFileName, string path)
        {
            var    fullPath     = projectWrapper.FullPath;
            string assemblyPath = Path.Combine(fullPath, Path.Combine(projectWrapper.OutputPath, outputFileName));

            if (!File.Exists(assemblyPath))
            {
                MessageBox.Show(String.Format(@"Assembly {0} not found", assemblyPath), null, MessageBoxButtons.OK);
                return;
            }

            string arguments = String.Format("\"{0}\" \"{2}\" \"{1}\"", Path.GetFullPath(assemblyPath), fullPath, projectWrapper.LocalPath);

            if (File.Exists(path))
            {
                Process.Start(path, arguments);
            }
            else
            {
                MessageBox.Show(String.Format("Model editor not found at {0}", path));
            }
        }
Exemple #7
0
 void StartMEProcess(ProjectWrapper projectWrapper, string outputFileName, string path) {
     try{
         var fullPath = projectWrapper.FullPath;
         string assemblyPath = Path.Combine(fullPath, Path.Combine(projectWrapper.OutputPath, outputFileName));
         if (!File.Exists(assemblyPath)) {
             MessageBox.Show(String.Format(@"Assembly {0} not found", assemblyPath), null, MessageBoxButtons.OK);
             return;
         }
     
         var destFileName = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(assemblyPath) + "", Path.GetFileName(path) + ""));
         KillProcess(destFileName);
         if (path!=destFileName)
             File.Copy(path, destFileName,true);
         string debugMe = Options.ReadBool(Options.DebugME)?"d":null;
         string arguments = String.Format("{0} \"{1}\" \"{3}\" \"{2}\"", debugMe,Path.GetFullPath(assemblyPath), fullPath, projectWrapper.LocalPath);
         if (File.Exists(destFileName))
             Process.Start(destFileName, arguments);
         else
             MessageBox.Show(String.Format("Model editor not found at {0}", destFileName));
     }
     catch (Exception e){
         MessageBox.Show(e.ToString());
     }
 }
Exemple #8
0
 private void OpenModelEditor(ProjectWrapper projectWrapper) {
     new ModelEditorRunner().Start(projectWrapper);
 }
Exemple #9
0
 private void OpenModelEditor(ProjectWrapper projectWrapper)
 {
     new ModelEditorRunner().Start(projectWrapper);
 }