Exemple #1
0
        private void LoadFileExplorerConfig()
        {
            DC_FileExplorer = new FileExplorerEx();
            DC_FileExplorer.FileDoubleClick += OnFileDoubleClick;

            var root_path = GetScriptRootPath();

            /* スクリプトディレクトリが存在しない場合はテンプレートを出力 */
            if (!Directory.Exists(root_path))
            {
                Directory.CreateDirectory(root_path);
                File.WriteAllText(GetScriptFilePath("SampleScript.gds"), Ratatoskr.Properties.Resources.Sample);
            }

            DC_FileExplorer.RootUrl = root_path;

            DockPanel_Main.AddDockContent(
                "DC_FileExplorer",
                "File Explorer",
                0,
                Icon.FromHandle(Ratatoskr.Resource.Images.memo_32x32.GetHicon()),
                DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockBottom | DockAreas.Float,
                DockState.DockLeft,
                false,
                DC_FileExplorer);
        }
Exemple #2
0
        private void OpenScriptFile(string path)
        {
            var editor = GetOpenedScriptEditor(path);

            if (editor != null)
            {
                DockPanel_Main.SetActiveDocumentControl(editor);
                return;
            }

            editor = new ScriptWindow_CodeEditor();

            editor.BorderStyle = BorderStyle.None;
            editor.Tag         = path;
            editor.ScriptPath  = path;

            editor.EditorStatusUpdated   += OnEditorStatusUpdated;
            editor.ScriptMessageAppended += OnScriptMessageOutput;
            editor.ScriptStatusChanged   += OnScriptStatusChanged;

            /* 新しいタブでテキストを開く */
            DockPanel_Main.AddDockContent(
                "DC_CodeEditor",
                (path != null) ? (Path.GetFileName(path)) : ("(Temp)"),
                0,
                Icon.FromHandle(Ratatoskr.Resource.Images.memo_32x32.GetHicon()),
                DockAreas.Document,
                DockState.Document,
                true,
                editor);
        }
Exemple #3
0
        private void LoadConsoleConfig()
        {
            DC_Console = new ScriptWindow_Console();

            DockPanel_Main.AddDockContent(
                "DC_Console",
                "Output",
                0,
                Icon.FromHandle(Ratatoskr.Resource.Images.program_16x16.GetHicon()),
                DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockBottom | DockAreas.Float,
                DockState.DockBottom,
                false,
                DC_Console);
        }
Exemple #4
0
        private void LoadScriptListConfig()
        {
            DC_ScriptList = new ScriptWindow_ScriptList();

            DC_ScriptList.LoadConfig();

            DockPanel_Main.AddDockContent(
                "DC_ScriptList",
                "Running Script List",
                0,
                Icon.FromHandle(Ratatoskr.Resource.Images.memo_32x32.GetHicon()),
                DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockBottom | DockAreas.Float,
                DockState.DockBottom,
                false,
                DC_ScriptList);
        }
Exemple #5
0
        public void LoadDockPanelConfig()
        {
            DockPanel_Main.ClearDockContents();

            DockPanel_Main.AddDockContent(
                "MFDC_SendDataListPanel_Control",
                ConfigManager.Language.MainUI.MCmdPanel_Title.Value,
                (uint)DockContentsGroup.Fixed,
                Icon.FromHandle(Ratatoskr.Resource.Images.memo_32x32.GetHicon()),
                DockAreas.Document | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockBottom | DockAreas.Float,
                DockState.DockBottomAutoHide,
                false,
                MFDC_SendDataListPanel_Control = new MainWindow_SendDataListPanel());

#if false
//#if DEBUG
            DockPanel_Main.AddDockContent(
                "MFDC_SendTrafficPanel_Control",
                ConfigManager.Language.MainUI.STPanel_Title.Value,
                (uint)DockContentsGroup.Fixed,
                Icon.FromHandle(Ratatoskr.Resource.Images.memo_32x32.GetHicon()),
                DockAreas.Document | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockBottom | DockAreas.Float,
                DockState.Document,
                false,
                MFDC_SendTrafficPanel_Control = new MainWindow_SendTrafficPanel());
#endif

            DockPanel_Main.AddDockContent(
                "MFDC_WatchListPanel",
                ConfigManager.Language.MainUI.WLPanel_Title.Value,
                (uint)DockContentsGroup.Fixed,
                Icon.FromHandle(Ratatoskr.Resource.Images.watch_32x32.GetHicon()),
                DockAreas.Document | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockBottom | DockAreas.Float,
                DockState.DockBottomAutoHide,
                false,
                MFDC_WatchListPanel_Control = new MainWindow_WatchListPanel());

            MFDC_SendDataListPanel_Control.LoadConfig();
#if false
//#if DEBUG
            MFDC_SendTrafficPanel_Control.LoadConfig();
#endif
            MFDC_WatchListPanel_Control.LoadConfig();
        }
Exemple #6
0
        public void AddPacketView(Guid class_id, Guid obj_id, PacketViewProperty viewp, bool init)
        {
            var viewc = FormTaskManager.CreatePacketView(class_id, obj_id, viewp);

            if (viewc == null)
            {
                return;
            }

            /* Graphオブジェクトのレイアウトが何故か復元できないので、とりあえずパケットビューだけ復元対象から外す */
            DockPanel_Main.AddDockContent(
                viewc.Instance.ID.ToString(),
//                                viewc.Instance.ID.ToString() + (new Random()).Next(0, 99999).ToString(),
                viewc.Instance.Class.Name,
                (uint)DockContentsGroup.PacketView,
                Icon.FromHandle(Ratatoskr.Resource.Images.packet_view_16x16.GetHicon()),
                DockAreas.Document,
                DockState.Document,
                true,
                viewc);
        }