Exemple #1
0
        internal static void Open(AbstractFile file)
        {
            System.WeakReference filep = new WeakReference(file);
            dict.Add(file.filename, filep);

            if (dict.Count % 10 == 0)
            {
                Clean();
            }
        }
Exemple #2
0
        public static bool TryFind(string identify, out AbstractFile file)
        {
            WeakReference fp;

            if (dict.TryGetValue(identify, out fp))
            {
                if (fp.IsAlive)
                {
                    file = dict[identify].Target as AbstractFile;
                    return(true);
                }
                else
                {
                    dict.Remove(identify);
                }
            }
            file = null;
            return(false);
        }
Exemple #3
0
        public void RunDebug()
        {
            if (FileManager.PendingChangesCount >= 1)
            {
                DialogResult result = MessageBox.Show(this, "您已经修改了本工程。在开始调试前是否需要保存呢?", this.Text, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                switch (result)
                {
                case DialogResult.Cancel:
                    return;

                case DialogResult.No:
                    break;

                case DialogResult.Yes:
                    FileManager.ApplyPendingChanges();
                    break;
                }
            }

            System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(System.IO.Path.Combine(ProjectManager.ProjectDir, "Game.exe"));
            //System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo("cmd.exe");
            info.UseShellExecute        = false;
            info.WindowStyle            = System.Diagnostics.ProcessWindowStyle.Normal;
            info.StandardOutputEncoding = Encoding.UTF8;
            info.StandardErrorEncoding  = Encoding.UTF8;
            info.RedirectStandardError  = true;
            info.RedirectStandardInput  = true;
            info.RedirectStandardOutput = true;
            System.Diagnostics.Process proc = System.Diagnostics.Process.Start(info);

            AbstractFile file = (new Debugger.ProcessStandardStreamFile(proc, true));

            file.ShowEditor();
            try
            {
                //TODO: file.Editor.Show(NekoKun.Core.Application.Logger.Editor.Pane, NekoKun.Core.Application.Logger.Editor);
            }
            catch { }
        }
Exemple #4
0
 internal static void RemovePendingChange(AbstractFile file)
 {
     pendingChanges.Remove(file);
     OnPendingChangesStatusChanged();
 }
Exemple #5
0
 internal static void AddPendingChange(AbstractFile file)
 {
     pendingChanges.Add(file);
     OnPendingChangesStatusChanged();
 }
 public AbstractEditor(AbstractFile item)
 {
     this.File = item;
     this.Text = item.ToString();
     this.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document;
 }
Exemple #7
0
 public AbstractEditor(AbstractFile item)
 {
     this.File      = item;
     this.Text      = item.ToString();
     this.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document;
 }
Exemple #8
0
 public NavPoint(AbstractFile file)
 {
     this.FileIdentify = file.filename;
     this.friendlyName = file.ToString();
 }
Exemple #9
0
 internal static void RemovePendingChange(AbstractFile file)
 {
     pendingChanges.Remove(file);
     OnPendingChangesStatusChanged();
 }
Exemple #10
0
        internal static void Open(AbstractFile file)
        {
            System.WeakReference filep = new WeakReference(file);
            dict.Add(file.filename, filep);

            if (dict.Count % 10 == 0)
            {
                Clean();
            }
        }
Exemple #11
0
 internal static void AddPendingChange(AbstractFile file)
 {
     pendingChanges.Add(file);
     OnPendingChangesStatusChanged();
 }
Exemple #12
0
 public static bool TryFind(string identify, out AbstractFile file)
 {
     WeakReference fp;
     if (dict.TryGetValue(identify, out fp))
     {
         if (fp.IsAlive)
         {
             file = dict[identify].Target as AbstractFile;
             return true;
         }
         else
         {
             dict.Remove(identify);
         }
     }
     file = null;
     return false;
 }
Exemple #13
0
 public ScriptFileNavPoint(AbstractFile file) : base(file)
 {
 }
Exemple #14
0
 public NavPoint(AbstractFile file)
 {
     this.FileIdentify = file.filename;
     this.friendlyName = file.ToString();
 }