コード例 #1
0
ファイル: Controller.cs プロジェクト: codecopy/core-1
        void SetTheme(string themeName)
        {
            Log <Controller> .Debug("Setting theme {0}", themeName);

            LastTheme = themeName;

            Orientation = ControlOrientation.Vertical;

            if ((Screen.Default.IsComposited) && (!Do.Preferences.ForceClassicWindow))
            {
                window = InterfaceManager.MaybeGetInterfaceNamed(themeName) ?? new ClassicWindow();
            }
            else
            {
                window = new ClassicWindow();
            }

            window.Initialize(this);
            window.KeyPressEvent += KeyPressWrap;
            if (window is Gtk.Window)
            {
                (window as Gtk.Window).Title = "Do";
            }

            Reset();
        }
コード例 #2
0
ファイル: Controller.cs プロジェクト: codecopy/core-1
        void UnsetTheme()
        {
            if (window == null)
            {
                return;
            }

            Vanish();
            window.KeyPressEvent -= KeyPressWrap;
            window.Dispose();
            window = null;
        }