コード例 #1
0
ファイル: Editor.cs プロジェクト: jairofloress/ILEditor
        public Editor()
        {
            InitializeComponent();
            TheEditor = this;

            MemberCache.Import();

            this.Text += ' ' + Program.getVersion() + " (" + IBMi.CurrentSystem.GetValue("alias") + ")";
            if (!IBMi.IsConnected())
            {
                this.Text += " - Offline Mode";
            }

            if (IBMi.IsConnected())
            {
                if (IBMi.CurrentSystem.GetValue("lastOffline") == "true")
                {
                    DialogResult result = MessageBox.Show("Looks like your last session was in Offline Mode. Would you like the launch the SPF Push tool?", "Notice", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                    if (result == DialogResult.Yes)
                    {
                        new Forms.PushWindow().ShowDialog();
                    }
                }
            }

            IBMi.CurrentSystem.SetValue("lastOffline", (IBMi.IsConnected() == false).ToString().ToLower());

            DarkMode = (Program.Config.GetValue("darkmode") == "true");

            if (DarkMode)
            {
                dockingPanel.Theme = new VS2015DarkTheme();
            }
            else
            {
                dockingPanel.Theme = new VS2015BlueTheme();
            }

            ApplyControlTheme(toolStrip);
            ApplyControlTheme(menuStrip);
            ApplyControlTheme(statusStrip);

            if (File.Exists(Program.PanelsXML))
            {
                dockingPanel.LoadFromXml(Program.PanelsXML, new DeserializeDockContent(GetContentFromPersistString));
            }
            else
            {
                AddTool(new UserTools.UserToolList(), DockState.DockLeft, true);
            }

            AddTool(new UserTools.Welcome(), DockState.Document, true);

            OutlineView = new UserTools.OutlineView();
            AddTool(OutlineView, DockState.DockRightAutoHide, true);

            dockingPanel.ActiveContentChanged += DockingPanel_ActiveContentChanged;
        }
コード例 #2
0
        public Editor()
        {
            InitializeComponent();
            TheEditor = this;

            MemberCache.Import();

            this.Text += ' ' + Program.getVersion() + " (" + IBMi.CurrentSystem.GetValue("alias") + ")";
            if (!IBMi.IsConnected())
            {
                this.Text += " - Offline Mode";
            }

            if (IBMi.IsConnected())
            {
                if (IBMi.CurrentSystem.GetValue("lastOffline") == "true")
                {
                    DialogResult result = MessageBox.Show("Looks like your last session was in Offline Mode. Would you like the launch the SPF Push tool?", "Notice", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                    if (result == DialogResult.Yes)
                    {
                        new Forms.PushWindow().ShowDialog();
                    }
                }
            }

            IBMi.CurrentSystem.SetValue("lastOffline", (IBMi.IsConnected() == false).ToString().ToLower());

            if (Program.Config.GetValue("darkmode") == "true")
            {
                dockingPanel.Theme = new VS2015DarkTheme();
            }
            else
            {
                dockingPanel.Theme = new VS2015LightTheme();
            }

            AddTool(new UserTools.Welcome());
            AddTool(new UserTools.UserToolList(), DockState.DockLeft);

            OutlineView = new UserTools.OutlineView();
            AddTool(OutlineView, DockState.DockRightAutoHide);
        }